/* ==========================================================================
   POSTCODEDATA AUTH — brand token overrides

   Structure + Gumo defaults live in static/css/components/auth.css.
   This file only re-declares the --auth-* tokens for the PostcodeData brand
   (near-black card, lime border, lime CTA).
   ========================================================================== */

.auth-section {
    --auth-card-bg: #1a1a1a;         /* matches PostcodeData public navbar surface */
    --auth-card-border: #BCDD13;

    --auth-accent: #E6F793;          /* pastel lime */
    --auth-accent-hover: #BCDD13;    /* deeper lime on hover */
    --auth-accent-contrast: #1a1a1a; /* text on lime = card bg */

    --auth-accent-shadow: rgba(230, 247, 147, 0.4);
    --auth-accent-shadow-strong: rgba(230, 247, 147, 0.55);
    --auth-accent-focus-ring: rgba(188, 221, 19, 0.35);

    --auth-text-primary: #ffffff;
    --auth-text-muted: rgba(255, 255, 255, 0.72);
    --auth-text-subtle: rgba(255, 255, 255, 0.55);
    --auth-border-on-card: rgba(255, 255, 255, 0.15);

    --auth-input-text: #111111;

    --auth-decor-rgb-1: 230, 247, 147;
    --auth-decor-rgb-2: 188, 221, 19;

    --auth-shadow-card: 0 24px 60px -14px rgba(0, 0, 0, 0.45);
}
/* ==========================================================================
   POSTCODEDATA AUTH PAGE
   Design: white page background + dark-grey brand card + lime-green 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 ===== */
.auth-loader,
#loader.loader {
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--pd-accent, #E6F793);
    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 lime-tinted radial decorations
   ========================================================================== */
.auth-section {
    /* PostcodeData brand tokens */
    --pd-card-bg: #0d0d0d;              /* near-black card */
    --pd-accent: #E6F793;                /* pasted lime */
    --pd-accent-dark: #BCDD13;           /* lime border */
    --pd-accent-green: #16a34a;          /* CTA green */
    --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: #111111;
    --color-border-on-dark: rgba(255, 255, 255, 0.15);
    --font-primary: 'Inter', sans-serif;
    --shadow-card: 0 24px 60px -14px rgba(0, 0, 0, 0.45);
    --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(90px);
}

.auth-section::before {
    top: -15%;
    left: -10%;
    width: clamp(360px, 50vw, 720px);
    height: clamp(400px, 55vh, 800px);
    background: radial-gradient(ellipse,
        rgba(230, 247, 147, 0.55) 0%,
        rgba(230, 247, 147, 0.18) 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(188, 221, 19, 0.22) 0%,
        rgba(188, 221, 19, 0.07) 40%,
        rgba(255, 255, 255, 0)   75%);
}

/* ==========================================================================
   CARD — near-black with lime accent border
   ========================================================================== */
.auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 48px 44px;
    background: var(--pd-card-bg);
    border: 1px solid var(--pd-accent-dark);
    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);
}

.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(--pd-accent);
    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.06);
    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: 700;
    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(--pd-accent);
    background: rgba(255, 255, 255, 0.04);
}

.auth-tab.is-active {
    background: var(--pd-accent);
    color: var(--pd-card-bg);
    box-shadow: 0 2px 10px rgba(230, 247, 147, 0.4);
}

.auth-tab:focus-visible {
    outline: 2px solid var(--pd-accent);
    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 the dark 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(--pd-accent-dark);
    box-shadow: 0 0 0 3px rgba(188, 221, 19, 0.35);
}

.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 — lime CTA pops against near-black card ===== */
.auth-form .btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    border-radius: var(--radius-full);
    background: var(--pd-accent) !important;
    color: var(--pd-card-bg) !important;
    border: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    box-shadow: 0 4px 14px rgba(230, 247, 147, 0.4);
}

.auth-form .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(230, 247, 147, 0.55);
    background: var(--pd-accent-dark) !important;
}

.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(--pd-accent);
    border-color: var(--pd-accent);
}

.auth-form .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(230, 247, 147, 0.35);
}

.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(--pd-accent) !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.06);
    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(--pd-accent);
    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: 700;
    font-size: 0.9rem;
    color: var(--pd-card-bg);
    background: var(--pd-accent);
    border-radius: var(--radius-full);
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    box-shadow: 0 4px 14px rgba(230, 247, 147, 0.4);
}

.auth-card .auth-page-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(230, 247, 147, 0.55);
    background: var(--pd-accent-dark);
    color: var(--pd-card-bg);
}

/* ==========================================================================
   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;
    }
}
/* ==========================================================================
   GUMO AUTH PAGE - All styling in one file

   ========================================================================== */

/* Override base_account layout so our auth-section can take over */
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 {
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
    min-height: 100vh;
}

/* ===== LOADER (full-page overlay) ===== */
.auth-loader,
#loader.loader {
    border: 3px solid var(--color-border-light, #f3f4f6);
    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); }
}

/* ===== PASSWORD ERROR & REGISTER BUTTON STATES ===== */
#passwordError {
    font-size: 0.8rem;
    color: #dc2626;
    margin-top: -8px;
    display: none;
}

#registerButton:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#registerButton:enabled {
    opacity: 1;
    cursor: pointer;
}

/* GUMO design tokens (when base.css not loaded) */
.auth-section {
    --primary-color: #1c2d4d;
    --gold-color: #A79479;
    --color-bg: #ffffff;
    --color-text-primary: #1c2d4d;
    --color-text-secondary: #6b7280;
    --color-text-light: #9ca3af;
    --color-text-white: #ffffff;
    --color-border: #e5e7eb;
    --color-border-light: #f3f4f6;
    --font-primary: 'Inter', 'Poppins', sans-serif;
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    padding: 80px 0 100px;
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg, #fff);
    position: relative;
    overflow: visible;
}

.auth-section::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -10%;
    width: clamp(400px, 55vw, 800px);
    height: clamp(500px, 60vh, 900px);
    background: radial-gradient(
        ellipse,
        rgba(204, 226, 252, 0.35) 0%,
        rgba(204, 226, 252, 0.18) 25%,
        rgba(204, 226, 252, 0.06) 50%,
        rgba(255, 255, 255, 0) 75%
    );
    pointer-events: none;
    z-index: 0;
    filter: blur(60px);
}

.auth-section::after {
    content: '';
    position: absolute;
    top: -10%;
    right: -10%;
    width: clamp(400px, 55vw, 800px);
    height: clamp(500px, 60vh, 900px);
    background: radial-gradient(
        ellipse,
        rgba(167, 148, 121, 0.15) 0%,
        rgba(204, 226, 252, 0.12) 25%,
        rgba(204, 226, 252, 0.04) 50%,
        rgba(255, 255, 255, 0) 70%
    );
    pointer-events: none;
    z-index: 0;
    filter: blur(60px);
}

.auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 0 20px;
}

.auth-logo-container {
    text-align: center;
    height: 100px;
}

.auth-logo-container .logo {
    display: block;
    margin: 0 auto;
    max-height: 64px;
    width: auto;
}

/* ===== ANCHOR TOGGLE - Register / Login ===== */
.auth-anchors {
    display: flex;
    align-items: baseline;
    gap: 0;
    margin-bottom: 8px;
}

.auth-anchors a {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    word-spacing: -0.15rem;
    color: var(--color-text-secondary);
    transition: color 0.2s ease;
}

.auth-anchors a:hover {
    color: var(--color-text-primary);
}

.auth-anchors a.active {
    color: var(--color-text-primary);
}

.auth-anchors a:not(.active) {
    color: var(--color-text-light);
    margin-left: 8px;
}


.auth-info {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin-top: 8px;
    margin-bottom: 24px;
}

/* ===== FORM INPUTS - Match search bar styling ===== */
.auth-form input:not([type="checkbox"]) {
    width: 100%;
    padding: 14px 20px;
    font-size: 0.95rem;
    font-family: var(--font-primary);
    color: var(--color-text-primary);
    background: var(--color-bg);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 8px rgba(28, 45, 77, 0.06);
    transition: all 0.2s ease;
}

.auth-form input:not([type="checkbox"]):focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(28, 45, 77, 0.12);
}

.auth-form .form-control {
    width: 100%;
    padding: 14px 20px;
    font-size: 0.95rem;
    font-family: var(--font-primary);
    color: var(--color-text-primary);
    background: var(--color-bg);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 8px rgba(28, 45, 77, 0.06);
    transition: all 0.2s ease;
}

.auth-form .form-control:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(28, 45, 77, 0.12);
}

.auth-form .form-control::placeholder {
    color: var(--color-text-light);
}

.auth-form .mb-3 {
    margin-bottom: 16px;
}

.auth-form .form-control.small-input {
    font-size: 0.95rem;
}

/* ===== PASSWORD TOGGLE ===== */
.auth-form .position-relative .form-control {
    padding-right: 48px;
}

.auth-form .password-toggle {
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.auth-form .password-toggle:hover {
    opacity: 1;
}

/* ===== BUTTONS ===== */
.auth-form .btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    background: var(--primary-color);
    color: var(--color-text-white);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-form .btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.auth-form .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ===== CHECKBOX & LINKS ===== */
.auth-form .form-check-input {
    width: 1em;
    height: 1em;
    border-radius: 4px;
    border: 1.5px solid var(--color-border);
}

.auth-form .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.auth-form .form-check-label {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    font-family: var(--font-primary);
}

.auth-form .custom-link {
    font-size: 0.875rem;
    color: var(--primary-color);
    font-weight: 500;
}

.auth-form .custom-link:hover {
    color: var(--gold-color);
}

/* ===== ROW LAYOUT (First/Last Name) ===== */
.auth-form .row {
    --bs-gutter-x: 12px;
}

.auth-form .row .col .form-control {
    width: 100%;
}

/* ===== RECAPTCHA FOOTNOTE ===== */
.auth-form .recaptcha-note {
    font-size: 0.7rem;
    color: var(--color-text-light);
    line-height: 1.6;
    margin-top: 20px;
}

.auth-form .recaptcha-note a {
    color: var(--color-text-secondary);
    text-decoration: underline;
}

.auth-form .recaptcha-note a:hover {
    color: var(--primary-color);
}

/* ===== ALERTS ===== */
.auth-alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.auth-alert.alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.auth-alert .btn-close {
    padding: 0.75rem;
}

/* ===== REGISTRATION CLOSED ===== */
.registration-closed {
    padding: 20px;
    border-radius: var(--radius-md);
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: var(--color-text-primary);
}

.registration-closed .alert-heading {
    font-size: 1rem;
    font-weight: 600;
}

/* ===== AUTH INFO PAGES (forgot password, reset done, etc.) ===== */
.auth-card .auth-page-heading {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 12px;
}

.auth-card .auth-page-text {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.auth-card .auth-page-link {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-text-white);
    background: var(--primary-color);
    border-radius: var(--radius-full);
    transition: all 0.2s ease;
}

.auth-card .auth-page-link:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
    .auth-section {
        padding: 60px 0 80px;
    }

    .auth-anchors a {
        font-size: 1.5rem;
    }
}

@media (max-width: 400px) {
    .auth-section {
        padding: 40px 0 40px;
    }

    .auth-anchors {
        flex-wrap: wrap;
    }

    .auth-anchors a {
        font-size: 1.25rem;
    }

    .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;
    }
}
