/* ==========================================================================
   WIRED.DEV — AUTH PAGE STYLES (login / signup / 2FA OTP)
   Mirrors BetterBase login.css layout, adapted to Wired brand
   ========================================================================== */

/* Scale the whole page so 100% browser zoom == former 80% zoom.
   Compensate with 125vh (100 / 0.8) so the zoomed content fills the full
   physical viewport and leaves no gap at the bottom. */
html {
    zoom: 0.8;
    height: 125%;
    overflow: hidden;
    background: #06070a;
}
body {
    margin: 0;
    height: 125vh;
    min-height: 125vh;
    overflow: hidden;
    background: #06070a;
}

/* Page root — full-height split pane */
.auth-page {
    height: 125vh;
    min-height: 125vh;
    display: grid;
    grid-template-columns: 460px 1fr;
    overflow: hidden;
    background: #06070a;
}

/* ==========================================================================
   LEFT PANE (Form Pane)
   ========================================================================== */
.auth-left {
    background: #0a0d16;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    padding: 32px 40px;
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    position: relative;
}

.auth-left::-webkit-scrollbar {
    display: none;
}

/* Logo / Brand mark at top */
.auth-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #f8fafc;
    margin-bottom: 48px;
    width: fit-content;
    text-decoration: none;
    cursor: pointer;
}

.auth-brand-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #ff5722 0%, #ff8f00 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 16px rgba(255, 87, 34, 0.5);
    flex-shrink: 0;
}

.auth-brand-icon svg {
    width: 17px;
    height: 17px;
    fill: #fff;
}

.auth-brand-name {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 40%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-brand-badge {
    font-size: 0.65rem;
    font-family: 'JetBrains Mono', monospace;
    background: rgba(255, 87, 34, 0.15);
    color: #ff8f00;
    border: 1px solid rgba(255, 87, 34, 0.3);
    padding: 2px 6px;
    border-radius: 9999px;
    font-weight: 600;
    -webkit-text-fill-color: #ff8f00;
}

/* Centre form area */
.auth-form-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 380px;
}

.auth-form-container h2 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #f8fafc;
    margin-bottom: 6px;
}

.auth-subtitle {
    color: #64748b;
    font-size: 15px;
    margin-bottom: 32px;
}

/* ==========================================================================
   OAUTH BUTTONS
   ========================================================================== */
.auth-oauth-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.auth-oauth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Inter', sans-serif;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f8fafc;
}

.auth-oauth-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* Guest button — distinct styling so it reads as a bypass option */
.auth-oauth-btn.auth-guest-btn {
    background: rgba(255, 87, 34, 0.07);
    border: 1px solid rgba(255, 87, 34, 0.25);
    color: #ff9800;
    font-size: 13px;
}

.auth-oauth-btn.auth-guest-btn:hover {
    background: rgba(255, 87, 34, 0.14);
    border-color: rgba(255, 87, 34, 0.5);
    color: #ffb74d;
    box-shadow: 0 4px 16px rgba(255, 87, 34, 0.18);
}

.auth-oauth-btn svg {
    flex-shrink: 0;
}

/* ==========================================================================
   OR DIVIDER
   ========================================================================== */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 4px 0 20px;
    color: #475569;
    font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   INLINE STATUS BANNERS (success / warning / error)
   ========================================================================== */
.auth-notice-banner {
    display: none;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 1.5;
    color: #f4f4f5;
    animation: authFadeIn 0.3s ease-out;
}

.auth-notice-banner.show { display: block; }
.auth-notice-banner.warn { background: rgba(245, 158, 11, 0.12); border: 1px solid rgba(245, 158, 11, 0.3); }
.auth-notice-banner.success { background: rgba(16, 185, 129, 0.12); border: 1px solid rgba(16, 185, 129, 0.3); }
.auth-notice-banner.error { background: rgba(244, 63, 94, 0.12); border: 1px solid rgba(244, 63, 94, 0.3); }

.auth-notice-banner-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    margin-bottom: 6px;
}

.auth-notice-banner.warn .auth-notice-banner-title { color: #fbbf24; }
.auth-notice-banner.success .auth-notice-banner-title { color: #34d399; }
.auth-notice-banner.error .auth-notice-banner-title { color: #fb7185; }

/* ==========================================================================
   FORM FIELDS
   ========================================================================== */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-field label {
    font-size: 13px;
    font-weight: 500;
    color: #f8fafc;
}

.auth-field-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.auth-forgot-link {
    font-size: 12px;
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s;
}

.auth-forgot-link:hover { color: #ff9800; }

.auth-field input {
    width: 100%;
    padding: 11px 14px;
    background: #060810;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #f8fafc;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.auth-field input:focus {
    border-color: #ff5722;
    box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.12);
}

.auth-field input::placeholder {
    color: #475569;
}

/* Password wrapper + toggle eye */
.auth-pw-wrapper {
    position: relative;
}

.auth-pw-wrapper input {
    padding-right: 42px;
}

.auth-pw-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.auth-pw-toggle:hover { color: #f8fafc; }

/* Submit button */
.auth-submit-btn {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', sans-serif;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #ff5722 0%, #ff7828 100%);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 2px 14px rgba(255, 87, 34, 0.4);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(255, 87, 34, 0.6);
}

.auth-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Spinner for loading state */
.auth-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: none;
}

.auth-submit-btn.loading .auth-spinner { display: block; }
.auth-submit-btn.loading .auth-btn-label { display: none; }

/* Toggle sign-in/sign-up link */
.auth-toggle-link {
    font-size: 13px;
    color: #64748b;
    text-align: center;
    margin-top: 8px;
}

.auth-toggle-link a {
    color: #ff9800;
    text-decoration: none;
    font-weight: 600;
}

.auth-toggle-link a:hover { text-decoration: underline; }

.auth-terms {
    font-size: 11px;
    color: #475569;
    text-align: center;
    line-height: 1.6;
    margin-top: 24px;
    opacity: 0.8;
}

.auth-terms a {
    color: inherit;
    text-decoration: underline;
}

/* ==========================================================================
   OTP / 2FA STEP
   ========================================================================== */
.auth-otp-code-input {
    letter-spacing: 0.4em;
    font-size: 1.4rem !important;
    font-weight: 800 !important;
    text-align: center !important;
    font-family: 'JetBrains Mono', monospace !important;
}

.auth-otp-actions {
    margin-top: 20px;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.auth-otp-actions a {
    color: #ff9800;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

.auth-otp-actions a.back-link {
    color: #64748b;
    font-weight: 400;
}

/* ==========================================================================
   RIGHT PANE (Quote / Testimonial Panel)
   ========================================================================== */
.auth-right {
    position: relative;
    background: #06070a;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Subtle grid overlay */
.auth-right-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 87, 34, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 87, 34, 0.035) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
    z-index: 0;
}

/* Ambient radial glow */
.auth-right::before {
    content: '';
    position: absolute;
    width: 620px;
    height: 620px;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(255, 87, 34, 0.08) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* Quote container */
.auth-quote-container {
    position: relative;
    z-index: 1;
    max-width: 520px;
    padding: 40px;
}

.auth-quote-mark {
    font-size: 96px;
    font-family: Georgia, serif;
    line-height: 1;
    color: #ff5722;
    opacity: 0.25;
    user-select: none;
    margin-bottom: -16px;
}

.auth-quote-text {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 26px;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: -0.3px;
    color: #f8fafc;
    border: none;
    padding: 0;
    margin: 0 0 32px;
}

.auth-quote-author {
    display: flex;
    align-items: center;
    gap: 14px;
}

.auth-quote-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff5722 0%, #ff8f00 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 0 20px rgba(255, 87, 34, 0.4);
}

.auth-quote-author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.auth-quote-author-name {
    font-size: 15px;
    font-weight: 600;
    color: #f8fafc;
}

.auth-quote-author-role {
    font-size: 13px;
    color: #64748b;
}

/* Feature badges strip underneath the quote */
.auth-feature-strip {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #94a3b8;
    font-size: 14px;
}

.auth-feature-item svg {
    width: 16px;
    height: 16px;
    color: #ff9800;
    flex-shrink: 0;
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
@keyframes authFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 900px) {
    .auth-page {
        grid-template-columns: 1fr;
    }
    .auth-right {
        display: none;
    }
    .auth-left {
        padding: 24px;
    }
    .auth-form-container {
        max-width: 100%;
    }
}
