/* ==========================================================================
   GUMO AUTH — brand token overrides

   Gumo is the DEFAULT theme. All structure + the navy/gold token set live in
   static/css/components/auth.css. This file stays intentionally empty so the
   per-brand load slot in base_account.html resolves to a 200 with no CSS.

   To change Gumo's auth styling, edit components/auth.css directly.
   ========================================================================== */
/* ==========================================================================
   GUMO AUTH PAGE
   Design: white page background + navy brand card + gold accents
   Loaded by: auth.html, forgot_password.html, set_password.html,
              password_reset_complete.html, password_reset_done.html
   ========================================================================== */

/* ---- base_account.html wrapper neutralisation (remove after D-9 refactor) */
body > div.d-flex.justify-content-center {
    background: transparent !important;
    min-height: 100vh;
    height: auto !important;
}
body > div .card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    width: 100%;
    max-width: 100%;
}
body > div .card-body { padding: 0; }
body > div .card-body .m-4 { margin: 0 !important; }

html, body {
    overflow-x: hidden;
    min-height: 100vh;
}

/* ===== LOADER (full-page overlay) ===== */
.auth-loader,
#loader.loader {
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--gold-color, #A79479);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    animation: auth-spin 0.8s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    z-index: 100;
}

@keyframes auth-spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

#passwordError {
    font-size: 0.8rem;
    color: #fca5a5;
    margin-top: -8px;
    display: none;
}

#registerButton:disabled { opacity: 0.5; cursor: not-allowed; }
#registerButton:enabled  { opacity: 1;   cursor: pointer; }

/* ==========================================================================
   SECTION — white page with subtle brand-tinted radial decoration
   ========================================================================== */
.auth-section {
    /* Gumo brand tokens (fallback when base.css not loaded) */
    --primary-color: #1c2d4d;
    --gold-color: #A79479;
    --color-bg: #ffffff;
    --color-text-white: #ffffff;
    --color-text-muted-on-dark: rgba(255, 255, 255, 0.72);
    --color-text-subtle-on-dark: rgba(255, 255, 255, 0.55);
    --color-input-bg: #ffffff;
    --color-input-text: #1c2d4d;
    --color-border-on-dark: rgba(255, 255, 255, 0.18);
    --font-primary: 'Inter', 'Poppins', sans-serif;
    --shadow-card: 0 20px 50px -12px rgba(28, 45, 77, 0.35);
    --shadow-input: 0 2px 6px rgba(0, 0, 0, 0.08);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    position: relative;
    overflow: visible;
    padding: 60px 0 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg);
}

.auth-section::before,
.auth-section::after {
    content: '';
    position: absolute;
    pointer-events: none;
    z-index: 0;
    filter: blur(80px);
}

.auth-section::before {
    top: -15%;
    left: -10%;
    width: clamp(360px, 50vw, 720px);
    height: clamp(400px, 55vh, 800px);
    background: radial-gradient(ellipse,
        rgba(204, 226, 252, 0.45) 0%,
        rgba(204, 226, 252, 0.15) 40%,
        rgba(255, 255, 255, 0)    75%);
}

.auth-section::after {
    bottom: -15%;
    right: -10%;
    width: clamp(360px, 50vw, 720px);
    height: clamp(400px, 55vh, 800px);
    background: radial-gradient(ellipse,
        rgba(167, 148, 121, 0.25) 0%,
        rgba(167, 148, 121, 0.08) 40%,
        rgba(255, 255, 255, 0)    75%);
}

/* ==========================================================================
   CARD — brand-coloured hero panel
   ========================================================================== */
.auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 48px 44px;
    background: var(--primary-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    color: var(--color-text-white);
}

.auth-logo-container {
    text-align: center;
    margin-bottom: 28px;
}

.auth-logo-container .logo {
    display: block;
    margin: 0 auto;
    max-height: 96px;
    width: auto;
    filter: brightness(0) invert(1);  /* force logo to white on dark card */
}

.auth-logo-container p,
.auth-logo-container .text-muted {
    color: var(--color-text-muted-on-dark) !important;
    font-size: 0.8rem;
    margin-top: 10px;
    margin-bottom: 0;
}

.auth-logo-container a {
    color: var(--gold-color);
    text-decoration: none;
    font-weight: 500;
}

.auth-logo-container a:hover {
    color: var(--color-text-white);
}

/* ==========================================================================
   TAB TOGGLE — Log in / Register pill switcher
   ========================================================================== */
.top-section { margin-bottom: 24px; }

.auth-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    margin-bottom: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--color-border-on-dark);
    border-radius: var(--radius-full);
}

.auth-tab {
    flex: 1 1 0;
    padding: 10px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font-primary);
    color: var(--color-text-muted-on-dark);
    background: transparent;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.auth-tab:hover:not(.is-active) {
    color: var(--color-text-white);
    background: rgba(255, 255, 255, 0.06);
}

.auth-tab.is-active {
    background: var(--gold-color);
    color: var(--color-text-white);
    box-shadow: 0 2px 8px rgba(167, 148, 121, 0.35);
}

.auth-tab:focus-visible {
    outline: 2px solid var(--gold-color);
    outline-offset: 2px;
}

.auth-info {
    font-size: 0.875rem;
    color: var(--color-text-muted-on-dark);
    line-height: 1.5;
    margin: 0 0 4px;
}

/* ==========================================================================
   FORMS — white pills floating on brand card
   ========================================================================== */
.auth-form input:not([type="checkbox"]),
.auth-form .form-control {
    width: 100%;
    padding: 13px 18px;
    font-size: 0.95rem;
    font-family: var(--font-primary);
    color: var(--color-input-text);
    background: var(--color-input-bg);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-input);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.auth-form input:not([type="checkbox"]):focus,
.auth-form .form-control:focus {
    outline: none;
    border-color: var(--gold-color);
    box-shadow: 0 0 0 3px rgba(167, 148, 121, 0.25);
}

.auth-form .form-control::placeholder {
    color: #9ca3af;
}

.auth-form .mb-3 { margin-bottom: 14px; }
.auth-form .form-control.small-input { font-size: 0.95rem; }

/* Password eye toggle */
.auth-form .position-relative .form-control { padding-right: 48px; }

.auth-form .password-toggle {
    cursor: pointer;
    opacity: 0.55;
    transition: opacity 0.2s;
}

.auth-form .password-toggle:hover { opacity: 1; }

/* ===== BUTTONS — gold CTA stands out on navy card ===== */
.auth-form .btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    border-radius: var(--radius-full);
    background: var(--gold-color) !important;
    color: var(--color-text-white) !important;
    border: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
    box-shadow: 0 4px 12px rgba(167, 148, 121, 0.35);
}

.auth-form .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(167, 148, 121, 0.45);
    opacity: 0.96;
}

.auth-form .btn:active { transform: translateY(0); }

.auth-form .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ===== CHECKBOX + INLINE LINKS ===== */
.auth-form .form-check-input {
    width: 1em;
    height: 1em;
    border-radius: 4px;
    border: 1.5px solid var(--color-border-on-dark);
    background-color: transparent;
}

.auth-form .form-check-input:checked {
    background-color: var(--gold-color);
    border-color: var(--gold-color);
}

.auth-form .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(167, 148, 121, 0.3);
}

.auth-form .form-check-label,
.auth-form label {
    font-size: 0.85rem;
    color: var(--color-text-muted-on-dark) !important;
    font-family: var(--font-primary);
}

.auth-form .custom-link {
    font-size: 0.85rem;
    color: var(--gold-color) !important;
    font-weight: 500;
    text-decoration: none;
}

.auth-form .custom-link:hover {
    color: var(--color-text-white) !important;
}

.auth-form .row { --bs-gutter-x: 12px; }
.auth-form .row .col .form-control { width: 100%; }

.auth-form .recaptcha-note {
    font-size: 0.7rem;
    color: var(--color-text-subtle-on-dark);
    line-height: 1.6;
    margin-top: 18px;
}

.auth-form .recaptcha-note a { color: var(--color-text-muted-on-dark); text-decoration: underline; }
.auth-form .recaptcha-note a:hover { color: var(--color-text-white); }

/* ==========================================================================
   ALERTS & MESSAGES
   ========================================================================== */
.auth-alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 18px;
    font-size: 0.875rem;
}

.auth-alert.alert-danger {
    background: rgba(252, 165, 165, 0.15);
    border: 1px solid rgba(252, 165, 165, 0.35);
    color: #fecaca;
}

.auth-alert .btn-close {
    padding: 0.6rem;
    filter: invert(1) brightness(1.5);
}

.registration-closed {
    padding: 18px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--color-border-on-dark);
    color: var(--color-text-white);
}

.registration-closed .alert-heading {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-white);
}

.registration-closed p,
.registration-closed i {
    color: var(--color-text-muted-on-dark);
}

/* ==========================================================================
   AUTH INFO PAGES — forgot password, reset done, etc.
   ========================================================================== */
.auth-card .auth-page-heading {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-text-white);
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.auth-card .auth-page-text {
    font-size: 0.95rem;
    color: var(--color-text-muted-on-dark);
    line-height: 1.6;
    margin-bottom: 14px;
}

.auth-card .auth-page-text a {
    color: var(--gold-color);
    text-decoration: none;
    font-weight: 500;
}

.auth-card .auth-page-text a:hover {
    color: var(--color-text-white);
}

.auth-card .auth-page-link {
    display: inline-flex;
    align-items: center;
    padding: 12px 28px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-text-white);
    background: var(--gold-color);
    border-radius: var(--radius-full);
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 4px 12px rgba(167, 148, 121, 0.35);
}

.auth-card .auth-page-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(167, 148, 121, 0.45);
    color: var(--color-text-white);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 640px) {
    .auth-section { padding: 40px 16px 60px; }
    .auth-card    { padding: 36px 28px; }
    .auth-anchors a { font-size: 1.35rem; }
}

@media (max-width: 400px) {
    .auth-section { padding: 24px 12px 40px; }
    .auth-card    { padding: 28px 20px; }
    .auth-anchors { flex-wrap: wrap; }
    .auth-anchors a { font-size: 1.15rem; }

    .auth-form .row { flex-direction: column; }
    .auth-form .row > .col {
        width: 100%;
        margin-bottom: 12px;
    }
    .auth-form .mb-4.d-flex {
        flex-wrap: wrap;
        gap: 8px;
    }
}
