/* Form widgets used by both the public form and the admin dialogs. */

/* Switch (Fresher toggle) */
.switch-row {
  display: flex; align-items: flex-start; gap: 12px; cursor: pointer; padding: 12px 16px; min-height: 48px;
  border: 1px solid var(--divider); border-radius: var(--radius); background: var(--hover);
}
.switch-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track {
  flex: none; position: relative; width: 38px; height: 22px; margin-top: 2px; border-radius: 11px;
  background: var(--line-hover); transition: background 0.15s;
}
.switch-thumb {
  position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35); transition: transform 0.15s;
}
.switch-input:checked + .switch-track { background: var(--primary); }
.switch-input:checked + .switch-track .switch-thumb { transform: translateX(16px); }
.switch-input:focus-visible + .switch-track { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Combobox */
.combo-wrap { position: relative; }
.combo-list {
  position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px 0;
  list-style: none; max-height: 320px; overflow-y: auto; background: var(--paper);
  border: 1px solid var(--divider); border-radius: var(--radius); box-shadow: var(--shadow-3);
}
.combo-group { padding: 8px 16px 4px; font-size: 0.75rem; font-weight: 700; color: var(--text-2); background: var(--paper); position: sticky; top: 0; }
.combo-option { padding: 10px 16px; cursor: pointer; font-size: 0.9375rem; }
.combo-option.active, .combo-option:hover { background: var(--primary-tint); }
.combo-option[aria-selected='true'] { font-weight: 600; color: var(--primary); }
.combo-empty { padding: 12px 16px; color: var(--text-2); }

/* Password field with a show/hide button */
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 52px; }
.pw-wrap .icon-btn { position: absolute; right: 2px; top: 2px; min-width: 44px; min-height: 44px; }
