/* Form Auto-Grow Utilities
 * Purpose: prevent hidden content in form fields. Long text should be visible.
 * - Textareas grow with content (no inner scrollbar while typing).
 * - Inputs wrap content with a native title tooltip showing the full value on hover.
 * - data-autogrow on <input>: renders as a textarea-like multi-line field that grows.
 */

/* Auto-grow textareas: prevent scrollbar glitch, keep smooth growth */
textarea.form-control,
textarea[data-autogrow] {
  overflow: hidden;
  resize: vertical;
  min-height: calc(1.5em + 0.75rem + 2px);
}

/* Single-line-looking input that actually wraps (based on <textarea rows="1">) */
textarea.form-control-line,
textarea[data-autogrow-line] {
  resize: none;
  overflow: hidden;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.5;
}

/* Visual parity with form-control-lg/sm for textarea wrappers */
textarea.form-control-lg.form-control-line,
textarea.form-control-lg[data-autogrow-line] {
  line-height: 1.5;
}

/* Ensure inputs do not visually hide their value: tooltip fallback handled by JS.
 * Keep native single-line behavior but make the text selectable fully. */
input.form-control[data-has-overflow="1"] {
  /* subtle hint that value is truncated on display */
  background-image: linear-gradient(to left, rgba(13,110,253,.08), transparent 16px);
}
