/* ==========================================================================
   Forms — Auth, CRUD, and shared form styles
   Extracted from main.css for modularity (v0.8.0)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Authentication Pages
   -------------------------------------------------------------------------- */
/*
 * ⛔ **THE AUTH CARD LIVED HERE AND IN `marketing-auth.css`, TWICE.** Nine rules
 * each, the same nine class names, 400px against 420px on two token families.
 * Moved to `components/auth-card.css`, which both base templates load — Design
 * 2.0, Batch 10. That file carries the full account.
 */
/* --------------------------------------------------------------------------
   Shared Form Controls
   -------------------------------------------------------------------------- */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    min-height: 44px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--background);
    color: var(--text-color);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(92, 107, 89, 0.1);
}

.form-error {
    color: var(--error);
    font-size: 0.8rem;
}

/* --------------------------------------------------------------------------
   Autosave status line — v0.80.0

   ⭐ TWO SCREENS SHOW THIS: the composer (`.composer__saved`) and focus mode
   (`.journal-footer-left .save-status`). The rules used to live only in
   journal-home.css, unscoped but loaded on exactly one page — so the composer
   could not see them, which is the same shape as the `.emotion-dot` and
   `.writing-prompt-context` bugs. tests/core/test_shared_css_is_actually_loaded.py
   is the register that catches the next one.

   ⛔ `.status-error` MUST stay louder than whatever the page mutes the line
   to. "Save failed" is the only signal that autosave stopped working, and both
   surfaces render the line quiet by default.
   -------------------------------------------------------------------------- */
.save-status {
    font-variant-numeric: tabular-nums;
}

.save-status.status-saving {
    color: var(--text-secondary);
}

.save-status.status-saved {
    color: var(--success);
}

.save-status.status-error {
    color: var(--error);
}

/* ⭐ "Unsaved changes" — quieter than saved, louder than nothing. It is not a
   failure, so it must not read as one; it is also the only thing on screen
   saying the last 29 seconds are not written down yet.
   📐 docs/redesign/composer-flow-review.md, finding 5. */
.save-status.status-unsaved {
    color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   Password visibility toggle — v0.31.0
   Eye-icon button rendered inside a relative-positioned wrapper around a
   password <input>. Paired with the password-toggle Stimulus controller
   at static/js/controllers/password_toggle_controller.js.
   QA closed-test feedback (Testers Community, 2026-05-22) flagged the
   missing show/hide affordance as a usability gap on the login form.
   -------------------------------------------------------------------------- */
/*
 * ⚠️ **THE PASSWORD EYE MOVED TO `components/auth-card.css`** (Batch 11). It
 * was defined here and in `marketing-auth.css`, and the only two templates that
 * carry its wrapper markup — `login.html` and `register.html` — are auth pages.
 * Two definitions for two templates, in files neither of them loaded together.
 */

.form-hint {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* --------------------------------------------------------------------------
   Info Box (login, register)
   -------------------------------------------------------------------------- */
.info-box {
    background: var(--info-bg);
    border: 1px solid var(--info);
    border-radius: var(--border-radius-sm);
    padding: 1rem;
    font-size: 0.85rem;
    margin: 0.5rem 0;
}

.info-box ul {
    margin: 0.5rem 0 0 1.25rem;
    padding: 0;
}

.info-box code {
    background: rgba(0, 0, 0, 0.1);
    padding: 0.15em 0.4em;
    border-radius: 3px;
    font-family: var(--font-mono, monospace);
}

.info-box--warning {
    background: rgba(232, 121, 121, 0.1);
    border-color: rgba(232, 121, 121, 0.3);
}

/* --------------------------------------------------------------------------
   CRUD Form Styles
   -------------------------------------------------------------------------- */
.form-container {
    max-width: 800px;
    margin: 0 auto;
}

.crud-form {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-base);
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-textarea {
    width: 100%;
    min-height: 200px;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-family: inherit;
    font-size: 1rem;
    background: var(--background);
    color: var(--text-color);
    resize: vertical;
}

.form-textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(92, 107, 89, 0.1);
}

.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    min-height: 44px;
    background: var(--background);
    color: var(--text-color);
}

.form-select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(92, 107, 89, 0.1);
}

.form-help {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.form-actions {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-xl);
    padding-top: var(--space-base);
    border-top: 1px solid var(--border-color);
}

/* ⛔ THE CONFIRM-DELETE RULES WERE HERE — `.confirm-delete-container`,
   `.confirm-delete-card` and its three children, and `.delete-form
   .form-actions`. Deleted 2026-08-25 with the centred card they styled; every
   confirmation in the product uses `components/confirm.css` now. See
   docs/features/confirmations.md. */
