/* ============================================================
   Forms — FormField, Input, Textarea, Select, Checkbox, Radio, Switch
   ============================================================ */
.fcs-field { display: flex; flex-direction: column; gap: 6px; }
.fcs-field__label { font-family: var(--font-body); font-weight: var(--fw-bold); font-size: 13px; color: var(--text-primary); }
.fcs-field__req { color: var(--brand-primary); margin-left: 2px; }
.fcs-field__hint { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.fcs-field__error { font-size: 12px; color: var(--danger-fg); display: inline-flex; align-items: center; gap: 5px; line-height: 1.4; }

/* Text inputs, textarea, select share the shell */
.fcs-input, .fcs-textarea, .fcs-select {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--surface-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  width: 100%;
  transition: var(--transition-colors);
  box-sizing: border-box;
}
.fcs-input { height: var(--control-h-md); padding: 0 12px; }
.fcs-input::placeholder, .fcs-textarea::placeholder { color: var(--text-muted); }
.fcs-input:hover, .fcs-textarea:hover, .fcs-select:hover { border-color: var(--neutral-400); }
.fcs-input:focus, .fcs-textarea:focus, .fcs-select:focus { outline: none; border-color: var(--brand-primary); box-shadow: var(--ring-focus); }
.fcs-input:disabled, .fcs-textarea:disabled, .fcs-select:disabled { background: var(--surface-sunken); color: var(--text-disabled); cursor: not-allowed; }
.fcs-input.is-error, .fcs-textarea.is-error, .fcs-select.is-error { border-color: var(--danger-solid); }
.fcs-input.is-error:focus, .fcs-textarea.is-error:focus, .fcs-select.is-error:focus { box-shadow: 0 0 0 3px var(--danger-bg); }

.fcs-input--sm { height: var(--control-h-sm); font-size: 13px; padding: 0 10px; }
.fcs-input--lg { height: var(--control-h-lg); font-size: 16px; padding: 0 14px; }

/* adornments */
.fcs-input-wrap { position: relative; display: flex; align-items: center; }
.fcs-input-wrap .fcs-input--has-left { padding-left: 38px; }
.fcs-input-wrap .fcs-input--has-right { padding-right: 38px; }
.fcs-input-wrap__icon { position: absolute; color: var(--text-muted); display: inline-flex; pointer-events: none; }
.fcs-input-wrap__icon--left { left: 12px; }
.fcs-input-wrap__icon--right { right: 12px; }

.fcs-textarea { padding: 10px 12px; min-height: 92px; line-height: 1.5; resize: vertical; display: block; }

/* select */
.fcs-select-wrap { position: relative; display: block; }
.fcs-select { height: var(--control-h-md); padding: 0 38px 0 12px; appearance: none; -webkit-appearance: none; cursor: pointer; }
.fcs-select-wrap__chev { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--text-muted); display: inline-flex; }

/* checkbox & radio */
.fcs-check { position: relative; display: inline-flex; align-items: flex-start; gap: 9px; cursor: pointer; font-family: var(--font-body); font-size: 14px; color: var(--text-primary); line-height: 1.35; }
.fcs-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.fcs-check__box {
  width: 18px; height: 18px; flex: none; margin-top: 1px;
  border: 1.5px solid var(--border-strong); border-radius: var(--radius-xs);
  background: var(--surface-card); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  transition: var(--transition-colors);
}
.fcs-check__box .fcs-icon, .fcs-check__box > svg { opacity: 0; transform: scale(0.6); transition: opacity var(--dur-fast), transform var(--dur-fast); }
.fcs-check input:checked + .fcs-check__box { background: var(--brand-primary); border-color: var(--brand-primary); }
.fcs-check input:checked + .fcs-check__box .fcs-icon, .fcs-check input:checked + .fcs-check__box > svg { opacity: 1; transform: scale(1); }
.fcs-check input:focus-visible + .fcs-check__box { box-shadow: var(--ring-focus); border-color: var(--brand-primary); }
.fcs-check input:disabled + .fcs-check__box { background: var(--surface-sunken); border-color: var(--border-default); }
.fcs-check:has(input:disabled) { color: var(--text-disabled); cursor: not-allowed; }

.fcs-check--radio .fcs-check__box { border-radius: var(--radius-full); }
.fcs-check__dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; opacity: 0; transform: scale(0.4); transition: opacity var(--dur-fast), transform var(--dur-fast); }
.fcs-check--radio input:checked + .fcs-check__box { background: var(--brand-primary); border-color: var(--brand-primary); }
.fcs-check--radio input:checked + .fcs-check__box .fcs-check__dot { opacity: 1; transform: scale(1); }

/* switch */
.fcs-switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-family: var(--font-body); font-size: 14px; color: var(--text-primary); }
.fcs-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.fcs-switch__track { width: 40px; height: 22px; flex: none; border-radius: var(--radius-full); background: var(--neutral-300); position: relative; transition: var(--transition-colors); }
.fcs-switch__thumb { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform var(--dur-fast) var(--ease-standard); }
.fcs-switch input:checked + .fcs-switch__track { background: var(--brand-primary); }
.fcs-switch input:checked + .fcs-switch__track .fcs-switch__thumb { transform: translateX(18px); }
.fcs-switch input:focus-visible + .fcs-switch__track { box-shadow: var(--ring-focus); }
.fcs-switch:has(input:disabled) { opacity: 0.5; cursor: not-allowed; }
