/* auth.css — shared shell for the 17 public auth/status pages (Login, Register, the
   password flows, confirmations, lockout, invalid-token pages…). One copy of the
   split-screen design those pages used to clone into scoped CSS behind per-page
   class prefixes (.login-*, .forgot-*, .lockout-*…).

   Structure every page follows:
     .auth-page > .auth-hero > .auth-content > .auth-left (brand/info panel)
                                             + .auth-right > .auth-card (form/content)

   Everything except the .auth-* structural classes is nested under .auth-page so the
   generic names (.card-header, .form-input, .btn…) cannot leak site-wide. Page-specific
   extras (status icons, benefit lists, waitlist form…) stay in each page's scoped
   .razor.css, which loads AFTER this file (SimplyOnSite.Blazor.styles.css is last in
   App.razor) and therefore wins ties.

   Keyframes: gradientShift / patternFloat / fadeInRight come from marketing.css
   (identical bodies, loaded globally); fadeInLeft is auth-only and lives here.

   Colors ride the marketing --so-* palette (marketing.css) — these pages are the
   public face and stay light-mode by design, like the rest of the marketing family. */

.auth-page {
    min-height: 100vh;
    background: var(--so-hero-gradient);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
    position: relative;
    overflow: hidden;
}

/* Floating plus-pattern overlay */
.auth-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
    animation: patternFloat 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.auth-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.auth-content {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

/* Left side — brand & info panel on the gradient */
.auth-left {
    color: white;
    animation: fadeInLeft 0.8s ease-out;
}

/* Right side — the content card */
.auth-right {
    animation: fadeInRight 0.8s ease-out;
}

.auth-card {
    background: var(--so-surface);
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* ── Corner back button (glassy pill, top-left) ── */
.auth-page .back-to-login,
.auth-page .back-to-home,
.auth-page .back-to-2fa {
    position: absolute;
    top: 2rem;
    left: 2rem;
    z-index: 10;
}

.auth-page .back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.auth-page .back-link svg {
    width: 20px;
    height: 20px;
}

.auth-page .back-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(-5px);
    text-decoration: none;
}

/* ── Brand block (left panel) ── */
.auth-page .brand-section {
    margin-bottom: 3rem;
}

.auth-page .brand-title {
    font-size: 3rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    outline: none;
}

.auth-page .brand-title:focus {
    outline: none;
}

.auth-page .brand-tagline {
    font-size: 1.25rem;
    opacity: 0.9;
    margin: 0;
}

/* Info/welcome copy under the brand (two historical names, one style) */
.auth-page .info-text,
.auth-page .welcome-text {
    margin-bottom: 2.5rem;
}

.auth-page .info-text h2,
.auth-page .welcome-text h2 {
    font-size: 2rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
}

.auth-page .info-text p,
.auth-page .welcome-text p {
    font-size: 1.125rem;
    line-height: 1.7;
    opacity: 0.9;
    margin: 0;
}

/* ── Card header ── (pages that center it add text-align in their scoped CSS) */
.auth-page .card-header {
    margin-bottom: 2rem;
}

.auth-page .card-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--so-ink-strong);
    margin: 0 0 0.5rem 0;
}

.auth-page .card-header p {
    font-size: 1rem;
    color: var(--so-ink-muted);
    margin: 0;
}

/* ── Form vocabulary ── */
.auth-page .form-fields {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.auth-page .form-group {
    display: flex;
    flex-direction: column;
}

.auth-page .form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--so-ink);
    margin-bottom: 0.5rem;
}

.auth-page .form-input {
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--so-border-subtle);
    border-radius: 8px;
    transition: all 0.3s ease;
    width: 100%;
}

.auth-page .form-input:focus {
    outline: none;
    border-color: var(--so-brand);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--so-brand) 12%, transparent);
}

.auth-page .validation-message {
    color: var(--dxds-color-content-danger-default-rest);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* ── Action buttons (status/confirmation pages) ── */
.auth-page .action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.auth-page .btn {
    flex: 1;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.auth-page .btn svg {
    width: 20px;
    height: 20px;
}

.auth-page .btn-primary {
    background: var(--so-brand);
    color: white;
}

.auth-page .btn-primary:hover {
    background: var(--so-brand-deep);
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.3);
}

.auth-page .btn-secondary {
    background: var(--so-surface-alt);
    color: var(--so-ink);
    border: 2px solid #e0e0e0;
}

.auth-page .btn-secondary:hover {
    background: #e9ecef;
    border-color: #cbd5e0;
}

/* ── Info box list internals (the box itself is page-specific) ── */
.auth-page .info-box h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--so-ink-strong);
    margin: 0 0 1rem 0;
}

.auth-page .info-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.auth-page .info-box li {
    font-size: 0.95rem;
    color: var(--so-ink-muted);
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

/* ── Responsive: stack panels (was 968px pre-canon; tablets now stack too) ── */
@media (max-width: 1023.98px) {
    .auth-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .auth-left {
        text-align: center;
        margin-top: 3rem;
        width: 100%;
        margin-bottom: 0;
    }

    .auth-right {
        width: 100%;
        max-width: 500px;
        display: flex;
        justify-content: center;
    }

    .auth-card {
        width: 100%;
    }

    .auth-page .back-to-login,
    .auth-page .back-to-home,
    .auth-page .back-to-2fa {
        top: 1rem;
        left: 1rem;
    }

    .auth-page .brand-title {
        font-size: 2.5rem;
    }

    .auth-page .action-buttons {
        flex-direction: column;
    }

    .auth-page .btn {
        width: 100%;
    }
}

@media (max-width: 639.98px) {
    .auth-hero {
        padding: 1.5rem;
    }

    .auth-card {
        padding: 2rem 1.5rem;
    }

    .auth-page .brand-title {
        font-size: 2rem;
    }

    .auth-page .info-text h2,
    .auth-page .welcome-text h2 {
        font-size: 1.5rem;
    }

    .auth-page .card-header h2 {
        font-size: 1.5rem;
    }
}
