/* ── Car plate mini-page (/plate/:token) ─────────────────────────────
   The one-field page the open-day details mail links to. Deliberately the
   quietest page on the site: a person arriving here has one thing to type and
   should be done in ten seconds, so it borrows the /sign page's focused
   single-column shell and nothing else. RTL, with the plate itself LTR. */

.plate-page {
    min-height: 100vh;
    padding: 0 var(--space-md) var(--space-2xl);
    background:
        radial-gradient(1100px 520px at 85% -80px, rgba(8, 148, 255, 0.07), transparent 65%),
        radial-gradient(900px 480px at 8% 160px, rgba(189, 50, 214, 0.05), transparent 60%),
        linear-gradient(180deg, #FFFFFF 0%, #F5F9FF 100%);
}

/* ── Header ────────────────────────────────────────────── */

.plate-header {
    max-width: 520px;
    margin: 0 auto;
    padding: var(--space-xl) 0 var(--space-md);
    text-align: center;
}

.plate-header__mark {
    height: 26px;
    display: inline-block;
}

.plate-header__title {
    margin: 14px 0 0;
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 500;
    color: var(--text-color);
}

/* The shared 3-stop hairline, pulled in tight under the title. */
.plate-header__rule {
    margin-block: 18px 0;
}

/* ── The card ──────────────────────────────────────────── */

.plate-card {
    max-width: 520px;
    margin: var(--space-lg) auto 0;
    padding: 26px 28px;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.plate-card--saved {
    text-align: center;
}

.plate-card__greeting {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 600;
    color: var(--text-color);
}

.plate-card__title {
    margin: 12px 0 0;
    font-family: var(--font-display);
    font-size: 21px;
    font-weight: 500;
    color: var(--text-color);
}

.plate-card__note {
    margin: 0 0 14px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.plate-card--saved .plate-card__note {
    margin: 8px 0 20px;
}

.plate-card__when {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 20px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    font-size: 14.5px;
    color: var(--text-color);
}

.plate-card__when i {
    color: var(--text-tertiary);
}

/* ── The field ─────────────────────────────────────────── */

.plate-field__label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
}

.plate-field {
    display: flex;
    gap: 10px;
}

.plate-field__input {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 48px;
    padding: 10px 14px;
    border: 1.5px solid var(--border-default);
    border-radius: var(--radius-md);
    background: #fff;
    font-family: var(--font-body);
    font-size: 17px;
    color: var(--text-color);
    text-align: left;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.plate-field__input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.plate-field__save {
    flex: none;
    min-height: 48px;
    padding: 10px 28px;
}

.plate-field__error {
    margin: 10px 0 0;
    font-size: 14.5px;
    color: #dc2626;
}

/* The saved plate reads left-to-right, matching the admin panel's convention
   and the parking list the number ends up on. */
.plate-saved__value {
    margin: 14px 0 0;
    font-family: var(--font-mono);
    font-size: 26px;
    letter-spacing: 0.06em;
    color: var(--text-color);
}

.plate-edit {
    min-height: 44px;
}

/* ── States (loading, dead link, load failure) ──────────── */

.plate-state {
    max-width: 520px;
    margin: var(--space-lg) auto 0;
    padding: 36px 28px;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.plate-state__icon {
    font-size: 34px;
    color: var(--text-tertiary);
}

.plate-state__icon--ok {
    color: #1d7a3e;
}

.plate-state__title {
    margin: 14px 0 8px;
    font-family: var(--font-display);
    font-size: 21px;
    font-weight: 500;
    color: var(--text-color);
}

.plate-state__text {
    margin: 0 0 18px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.plate-state__spinner {
    width: 30px;
    height: 30px;
    margin: 0 auto 14px;
    border: 2px solid var(--border-default);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: plate-spin 0.8s linear infinite;
}

@keyframes plate-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .plate-state__spinner {
        animation-duration: 2.4s;
    }
}

@media (max-width: 767px) {
    .plate-card,
    .plate-state {
        padding: 22px 18px;
    }

    .plate-header__title {
        font-size: 23px;
    }

    /* The save button drops below the field rather than squeezing it: a plate
       is eight digits and must stay readable while it is typed. */
    .plate-field {
        flex-direction: column;
    }

    .plate-field__save {
        width: 100%;
    }
}
