/* Sign-in and registration — F07/F08/F09.
 *
 * Reuses the field geometry established in travellin-fields.css rather than
 * inventing a second one: a visitor who has seen the checkout should not feel
 * they have arrived at a different site. Only what a centred single-column
 * panel needs is here.
 */
.travellin-auth { display: flex; justify-content: center; padding: 32px 16px; }

.travellin-auth-panel {
    box-sizing: border-box;
    width: 100%;
    max-width: 480px;
    padding: 28px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 20px 0 rgba(0,0,0,.08), 0 2px 10px 0 rgba(0,0,0,.06);
}

.travellin-auth-title { margin: 0 0 20px; font-size: 24px; font-weight: 700; line-height: 30px; color: var(--travellin-ink,#0f172a); }

.travellin-auth-field { display: block; margin: 0 0 14px; }
.travellin-auth-field > span { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; color: var(--travellin-ink,#0f172a); }
.travellin-auth-field input,
.travellin-auth-field select,
.travellin-auth-field textarea {
    box-sizing: border-box; width: 100%; min-height: 44px; padding: 10px 12px;
    font-size: 15px; line-height: 22px; color: var(--travellin-ink,#0f172a);
    background: #fff; border: 1px solid var(--travellin-border,#cbd5e1); border-radius: 8px;
}
.travellin-auth-field input:focus-visible,
.travellin-auth-field select:focus-visible,
.travellin-auth-field textarea:focus-visible {
    outline: 2px solid var(--travellin-focus,#2563eb); outline-offset: 1px; border-color: transparent;
}

/* Two per row above 480px, one below — a name field at 200px is unusable. */
.travellin-auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 480px) { .travellin-auth-grid { grid-template-columns: 1fr; } }

.travellin-auth-check { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 12px; font-size: 14px; line-height: 20px; color: var(--travellin-ink,#0f172a); }
/* 20px and a matching top offset so the box lines up with the first line of
   text rather than floating against a two-line label. */
.travellin-auth-check input { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 1px; }

.travellin-auth-submit {
    width: 100%; min-height: 48px; margin-top: 8px; padding: 12px 16px;
    font-size: 16px; font-weight: 600; color: #fff;
    background: var(--travellin-primary,#2563eb); border: 0; border-radius: 8px; cursor: pointer;
}
.travellin-auth-submit:disabled { opacity: .6; cursor: progress; }

.travellin-auth-tabs { display: flex; gap: 4px; margin: 0 0 20px; padding: 4px; background: var(--travellin-surface,#f1f5f9); border-radius: 10px; }
.travellin-auth-tab { flex: 1; min-height: 40px; padding: 8px; font-size: 15px; font-weight: 600; color: var(--travellin-muted,#64748b); background: none; border: 0; border-radius: 8px; cursor: pointer; }
.travellin-auth-tab.is-active { color: var(--travellin-ink,#0f172a); background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.travellin-auth-tab:focus-visible { outline: 2px solid var(--travellin-focus,#2563eb); outline-offset: -2px; }

.travellin-auth-partner { padding-top: 4px; }

.travellin-auth-hint { margin: 0 0 16px; font-size: 13px; line-height: 19px; color: var(--travellin-muted,#64748b); }

.travellin-auth-alt { margin: 18px 0 0; font-size: 14px; text-align: center; color: var(--travellin-muted,#64748b); }
.travellin-auth-link { padding: 4px; font-size: 14px; color: var(--travellin-primary,#2563eb); background: none; border: 0; text-decoration: underline; cursor: pointer; }
.travellin-auth-link:focus-visible { outline: 2px solid var(--travellin-focus,#2563eb); outline-offset: 2px; border-radius: 4px; }

/* role="alert" and role="status" already announce; colour is the second
   signal, never the only one — the text says what happened. */
.travellin-auth-error,
.travellin-auth-notice { margin: 0 0 16px; padding: 10px 12px; font-size: 14px; line-height: 20px; border-radius: 8px; }
.travellin-auth-error { color: #7f1d1d; background: #fef2f2; border: 1px solid #fecaca; }
.travellin-auth-notice { color: #14532d; background: #f0fdf4; border: 1px solid #bbf7d0; }

/* Structural classes the script selects on. They carry real rules rather than
 * existing only as hooks — guard.py flags a class with no stylesheet entry,
 * and it is right to: a selector that matches nothing is usually a typo, and
 * the one time it is not, the rule below is what says so. */
.travellin-auth-view { display: block; }
.travellin-auth-view[hidden] { display: none; }

.travellin-auth-form { margin: 0; }
.travellin-auth-form[hidden] { display: none; }

.travellin-auth-conditional { display: block; }
.travellin-auth-conditional[hidden] { display: none; }

/* ── Primary tab bar (Sign in / Create account / Reset password) ─────────
   Reuses .travellin-auth-tab; a touch more breathing room so it reads as the
   page's primary navigation. Hidden by the script during email verification. */
.travellin-auth-tabs-main { margin-bottom: 24px; }
.travellin-auth-tabs-main[hidden] { display: none; }

/* The Traveller/Partner tabs inside "Create account" are one level down, so
   they are rendered a little smaller and quieter than the primary bar to keep
   the hierarchy legible when both rows are visible. */
.travellin-auth-view .travellin-auth-tabs:not(.travellin-auth-tabs-main) {
    max-width: 320px;
    margin-top: -4px;
}
.travellin-auth-view .travellin-auth-tabs:not(.travellin-auth-tabs-main) .travellin-auth-tab {
    min-height: 34px;
    font-size: 14px;
}
