/*
 * forms.css — Form controls and button primitives
 *
 * All input, button, and field styles live here.
 * Used by both login.html (single input + button)
 * and settings.html (full form).
 *
 * Design rules: 0.5px borders, no border-radius, no shadows.
 */

/* ── Field wrapper ── */
.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field-label {
  font-family: var(--font-sans);
  font-size: var(--text-eyebrow);
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.field-hint {
  font-family: var(--font-serif);
  font-size: var(--text-small);
  font-style: italic;
  color: var(--muted);
}

/* ── Text inputs ── */
/* Covers all text-like inputs used in settings and login */
.field input[type="text"],
.field input[type="date"],
.field input[type="number"],
.field input[type="password"],
.login-form input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  background: var(--card-bg);
  border: 0.5px solid var(--hairline);
  color: var(--text);
  font-family: var(--font-serif);
  font-size: var(--text-ui);
  font-weight: 300;
  outline: none;
  border-radius: 0;
  -webkit-appearance: none;
  transition: border-color 0.15s;
}

/* Login input is slightly larger */
.login-form input[type="password"] {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  padding: 13px 16px;
}

.field input:focus,
.login-form input[type="password"]:focus { border-color: var(--accent); }

/* ── Color picker ── */
.color-field {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.color-field .field-label { flex: 1; min-width: 80px; }

.color-field input[type="color"] {
  width: 36px;
  height: 36px;
  padding: 2px;
  background: var(--card-bg);
  border: 0.5px solid var(--hairline);
  cursor: pointer;
  border-radius: 0;
  -webkit-appearance: none;
}

.color-hex {
  font-family: monospace;
  font-size: 11px;
  color: var(--muted);
}

/* ── Buttons ── */

/* Primary — filled, inverted colors */
.btn-primary {
  padding: 13px 24px;
  background: var(--text);
  color: var(--bg);
  font-family: var(--font-sans);
  font-size: var(--text-btn);
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  border-radius: 0;
  transition: opacity 0.15s;
}
.btn-primary:hover { opacity: 0.8; }

/* Ghost — muted text link, no background */
.btn-ghost {
  font-family: var(--font-sans);
  font-size: var(--text-eyebrow);
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.15s;
}
.btn-ghost:hover { color: var(--text); }

/* ── Error message ── */
.form-error {
  font-family: var(--font-serif);
  font-size: var(--text-footnote);
  font-style: italic;
  color: #b94040;
}
