/* ============================================================
   Fields
   Labels, hints, and the two text controls (input, textarea)
   that share one box style. Size modifiers come after
   the base rules — they match on specificity and win by order.
   ============================================================ */

.field {
  margin-bottom: var(--space-12);
}

.field__label {
  display: block;
  font-size: var(--fs-base);
  font-weight: var(--fw-medium);
  margin-bottom: var(--space-4);
}

.field__label--tight {
  margin-bottom: var(--space-1);
}

/* Required marker */
.req {
  color: var(--accent);
}

.hint {
  font-size: var(--fs-sm);
  color: var(--text-4);
  margin: 0 0 var(--space-5);
}

.hint--tight {
  margin: var(--space-4) 0 0;
}

.hint--below {
  margin: var(--space-4) 0 0;
}

/* Label on the left, a "browse"/"select all" affordance pushed to the right */
.field__row {
  display: flex;
  align-items: baseline;
  gap: var(--space-6);
  margin-bottom: var(--space-1);
}

.field__row > .field__label {
  margin-bottom: 0;
}

.field__row > :last-child {
  margin-left: auto;
}

/* The row is tight because a hint usually follows it; this is for the rows
   where the control comes straight after. */
.field__row--loose {
  margin-bottom: var(--space-5);
}

/* ---------- Controls ---------- */

.input:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.input,
.textarea {
  width: 100%;
  background: var(--field);
  border: 1px solid var(--border-3);
  border-radius: var(--r);
  color: var(--text);
  font: inherit;
  font-size: var(--fs-lg);
  padding: var(--space-4) var(--space-7);
  outline: none;
  transition: border-color var(--dur), box-shadow var(--dur);
}

.input:focus,
.textarea:focus {
  border-color: var(--focus-border);
  box-shadow: none;
}

.textarea {
  resize: vertical;
  min-height: 76px;
}

/* Dropdowns are .combo, not <select> — see css/components/combo.css */

/* ---------- Small variant ---------- */

.label-sm {
  display: block;
  font-size: var(--fs-base);
  font-weight: var(--fw-medium);
  margin-bottom: var(--space-4);
}

.input--sm {
  font-size: var(--fs-md);
  padding: var(--space-4) var(--space-6);
  border-radius: 4px;
}

/* ---------- Dashed variant ---------- */

/* "Add another option" rows: dashed until focused, then a solid near-white edge. */
.input--dashed {
  background: var(--field);
  border: 1px dashed var(--border-3);
  border-radius: 4px;
  color: var(--text-2);
  font-size: var(--fs-base);
  padding: var(--space-4) var(--space-6);
}

.input--dashed:focus {
  border-color: var(--focus-border);
  border-style: solid;
  box-shadow: none;
}

/* ---------- Range ---------- */

.range {
  width: 100%;
  accent-color: var(--select);
  cursor: pointer;
}
