/* Inputs and labels: white fields on the cool background, a navy border and soft navy ring on focus. */
.form-label {
  margin-bottom: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--lb-ink);
}

.form-control,
.form-select {
  padding: var(--lb-input-pad-y) var(--lb-input-pad-x);
  font-size: var(--lb-input-font-size);
  color: var(--lb-ink);
  background-color: var(--lb-surface);
  border-color: var(--lb-border);
  border-radius: var(--lb-radius);
}

.form-control::placeholder { color: #93A0B6; }

.form-control:hover,
.form-select:hover { border-color: #C3D0E2; }

/* Room for the arrow, so long choices ("Senior Software Engineer") never run under it. */
.form-select {
  padding-right: 2.5rem;
  text-overflow: ellipsis;
  background-position: right 1rem center;
  background-size: 12px 12px;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--lb-primary);
  box-shadow: 0 0 0 0.22rem rgba(var(--lb-primary-rgb), 0.12);
}

.form-check-input:checked {
  background-color: var(--lb-accent-strong);
  border-color: var(--lb-accent-strong);
}

.form-check-input:focus {
  border-color: var(--lb-primary);
  box-shadow: 0 0 0 0.22rem rgba(var(--lb-primary-rgb), 0.12);
}

.input-group-text {
  color: var(--lb-muted);
  background: var(--lb-bg);
  border-color: var(--lb-border);
}

/* A titled group of fields inside a long form (e.g. company profile). */
.form-section + .form-section {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--lb-border-soft);
}

.form-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

.form-section-title i { color: var(--lb-muted); }

/* Narrow forms (client feedback): fields about 40% of the old full width, so forms read as a compact column.
   Put it on the <form> (or its card). Phones keep the full width. */
.form-narrow { max-width: 680px; }

/* Field errors (field_errors_controller.js): red outline, a red ✱ after the label, the fix under the field. */
.form-control.is-invalid,
.form-select.is-invalid {
  border-color: var(--lb-danger);
  background-color: #FFFBFA;
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
  border-color: var(--lb-danger);
  box-shadow: 0 0 0 0.2rem rgba(180, 35, 24, 0.15);
}

.field-error-mark { font-weight: 700; color: var(--lb-danger); }

.invalid-feedback {
  margin-top: 0.3rem;
  font-size: 0.78rem;
  color: var(--lb-danger);
}

/* Password box with the eye button (shared/_password_field, password_toggle_controller.js). */
.password-field { position: relative; }
.password-field .form-control { padding-right: 2.9rem; }

.password-toggle {
  position: absolute;
  top: 0;
  right: 0.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.65rem; /* the height of a text box, so errors added below don't move it */
  color: var(--lb-muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
}

.password-toggle:hover,
.password-toggle:focus-visible { color: var(--lb-primary); }


/* Two choices side by side as a segmented pill (Promote / Transfer). */
.type-switch { display: inline-flex; padding: 3px; background: var(--lb-hover); border: 1px solid var(--lb-border); border-radius: 999px; }
.type-switch-option { margin: 0; cursor: pointer; }
.type-switch-option input { position: absolute; opacity: 0; pointer-events: none; }
.type-switch-option span { display: inline-flex; align-items: center; padding: 0.45rem 1.2rem; font-weight: 600; color: var(--lb-muted); border-radius: 999px; transition: background-color 0.15s ease, color 0.15s ease; }
.type-switch-option input:checked + span { color: #fff; background: var(--lb-gradient); box-shadow: 0 1px 3px rgba(var(--lb-primary-rgb), 0.3); }
.type-switch-option input:focus-visible + span { outline: 2px solid var(--lb-accent); outline-offset: 2px; }

/* Inline editing (onboardings/edit): each detail is a row of text that turns into its form when clicked. */
.inline-edit-card { padding: 0 1.25rem; }
.inline-group { padding: 0.9rem 0; border-top: 1px solid var(--lb-border-soft); }
.inline-group:first-child { border-top: 0; }
.inline-title { font-size: 0.8125rem; font-weight: 600; color: var(--lb-muted); }
.inline-value { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: 100%; padding: 0.25rem 0; color: var(--lb-ink); background: none; border: 0; text-align: left; }
.inline-click { border-radius: 8px; cursor: pointer; }
.inline-click i { color: var(--lb-muted); opacity: 0; transition: opacity 0.15s ease; }
.inline-click:hover, .inline-click:focus-visible { background: var(--lb-hover); outline: 0; }
.inline-click:hover i, .inline-click:focus-visible i { opacity: 1; color: var(--lb-primary); }
.inline-lock { font-size: 0.8125rem; color: var(--lb-muted); }
.inline-form { margin-top: 0.4rem; }
.inline-actions { display: flex; gap: 0.5rem; margin-top: 0.75rem; }

/* A number box without the up / down counter. */
.no-spinner { -moz-appearance: textfield; appearance: textfield; }
.no-spinner::-webkit-outer-spin-button, .no-spinner::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }
