/* Template editor sections */
#headers_list {
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

#message_content {
  white-space: pre-wrap;
  max-width: 80ch;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Ensure header lines can wrap properly */
#headers_list {
  display: block;
  line-height: 1.5;
  
  /* Add proper wrapping for header lines with inputs */
  input[type="text"] {
    margin-top: 2px !important;
    margin-bottom: 2px !important;
  }
}

/* Form select styling */
.template-select {
  display: inline-block;
  vertical-align: middle;
  width: auto;
  margin: 0 0.25rem;
}

/* Common measurement element */
.measure-span {
  visibility: hidden;
  position: absolute;
  white-space: pre;
}

/* Common styles for inline elements */
.var-input {
  display: inline-block;
  border: 1px solid #ced4da;
  border-radius: 4px;
  padding: 1px 1px 1px 2px;
  font-family: inherit;
  line-height: 1.5;
  background-color: #fff;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  
  &:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgb(13 110 253 / 25%);
  }
  
  &.linked-active {
    border-color: #86b7fe;
    background-color: #fff;
    box-shadow: 0 0 0 0.25rem rgb(13 110 253 / 25%);
  }
}

.insertion-tag {
  border-radius: 4px;
  padding: 0px 4px;
  font-family: inherit;
  line-height: 1.5;
}

/* Insertion tags styling */
.insertion-tag {
  background-color: #f5f5f5;
}

/* Message section styling */
.message-section {
  max-width: 80ch;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: pre-wrap !important;
  line-height: 1.2;
  
  /* Add spacing for lines containing inputs */
  input, select, textarea {
    margin: 0.245em 0 !important;
  }
}

/* Headers and message section inputs */
.message-section input[type="text"].form-control,
#headers_list input[type="text"].form-control {
  width: auto;
  display: inline-block;
  vertical-align: baseline;
  margin: 0 !important;
  font-size: inherit;
  line-height: inherit;
  height: auto;
  min-width: 120px;
}

.message-section textarea.form-control {
  width: 100%;
  min-height: 150px;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 3px;
  padding: 4px;
  font-size: inherit;
  line-height: inherit;
  resize: vertical;
}
