/**
 * 1vsM — /members two-column auth layout
 * Overrides member-kit's single-column auth shell to show
 * login + register side-by-side, matching the homepage aesthetic.
 */

/* ── Auth section backdrop ────────────────────────────────────────────── */
.mk-auth {
    min-height: 100vh;
    padding: 5rem 1rem 3rem;
    align-items: flex-start !important;
    justify-content: center;
    background:
        radial-gradient(ellipse at 20% 10%, rgba(212, 175, 55, 0.07) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 90%, rgba(212, 175, 55, 0.04) 0%, transparent 50%),
        var(--bg-dark, #0A0A0A);
}

/* ── Card: wide glassmorphic panel ────────────────────────────────────── */
.mk-auth .mk-auth-card {
    max-width: 900px !important;
    width: 100%;
    padding: 3rem;
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.045) 0%,
        rgba(255, 255, 255, 0.015) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.5rem;
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.03) inset,
        0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

/* ── Hide member-kit's built-in logo + tab nav ────────────────────────── */
.mk-auth .mk-auth-logo,
.mk-auth .mk-auth-nav {
    display: none !important;
}

/* ── Custom auth header (injected by JS) ──────────────────────────────── */
.ovsm-auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.ovsm-auth-logo-img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    margin: 0 auto 1rem;
    filter: drop-shadow(0 6px 20px rgba(212, 175, 55, 0.3));
    display: block;
}

.ovsm-auth-title {
    font-family: var(--font-heading, 'Outfit', sans-serif);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 0 0 0.4rem;
    color: var(--gold-400, #D4AF37); /* fallback for browsers without gradient clip */
    background: linear-gradient(135deg, var(--gold-200, #F1D279), var(--gold-400, #D4AF37));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ovsm-auth-subtitle {
    color: var(--text-muted, #A0A0A0);
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0;
}

/* ── Two-column form grid (injected by JS) ────────────────────────────── */
.ovsm-two-col {
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    gap: 0;
    align-items: start;
}

.ovsm-vdivider {
    background: rgba(255, 255, 255, 0.07);
    align-self: stretch;
    min-height: 300px;
    margin: 0 2.5rem;
}

.ovsm-form-col {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ovsm-col-title {
    font-family: var(--font-heading, 'Outfit', sans-serif);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-light, #F5F5F5);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin: 0 0 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary, #D4AF37);
    display: inline-block;
}

/* ── Keep both forms visible (override kit's hidden attr) ─────────────── */
.ovsm-form-col .mk-form {
    display: flex !important;
    flex-direction: column;
    gap: 1.25rem;
}

/* ── Forgot-mode: hide two-col, show forgot form ──────────────────────── */
.mk-auth.ovsm-forgot-mode .ovsm-two-col {
    display: none !important;
}

.mk-auth.ovsm-forgot-mode .ovsm-auth-header {
    display: none;
}

.mk-auth.ovsm-forgot-mode .ovsm-social-section {
    display: none;
}

/* Forgot form — full width when shown */
.mk-auth .mk-form[data-member-action="forgot-password"]:not([hidden]) {
    display: flex !important;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 420px;
    margin: 0 auto;
    padding: 2rem 0;
}

/* ── Field labels ─────────────────────────────────────────────────────── */
.mk-auth .mk-label {
    font-size: 0.825rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--neutral-200, #BDBDBD);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

/* ── Inputs ───────────────────────────────────────────────────────────── */
.mk-auth .mk-input {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: var(--text-light, #F5F5F5) !important;
    border-radius: 0.75rem !important;
    padding: 0.875rem 1rem !important;
    min-height: 48px !important;
    font-size: 1rem !important;
    font-family: var(--font-body, 'Inter', sans-serif) !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
    width: 100%;
    box-sizing: border-box;
}

.mk-auth .mk-input::placeholder {
    color: rgba(255, 255, 255, 0.25) !important;
}

.mk-auth .mk-input:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
}

.mk-auth .mk-input:focus {
    background: rgba(255, 255, 255, 0.07) !important;
    border-color: var(--primary, #D4AF37) !important;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.14) !important;
    outline: none !important;
}

/* ── Primary submit button ────────────────────────────────────────────── */
.mk-auth .mk-btn--primary {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    padding: 0.9rem 2rem !important;
    min-height: 48px !important;
    border: none !important;
    border-radius: 50px !important;
    background: linear-gradient(135deg, var(--gold-400, #D4AF37), var(--gold-300, #E8C84D)) !important;
    color: var(--neutral-950, #050505) !important;
    font-family: var(--font-heading, 'Outfit', sans-serif) !important;
    font-size: 0.875rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    cursor: pointer !important;
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.25) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    margin-top: 0.5rem !important;
}

.mk-auth .mk-btn--primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 28px rgba(212, 175, 55, 0.4) !important;
}

.mk-auth .mk-btn--primary:active {
    transform: translateY(0) !important;
}

.mk-auth .mk-btn--primary:disabled {
    opacity: 0.55 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* ── Ghost/text button (Forgot, Back to Sign In) ──────────────────────── */
.mk-auth .mk-btn--ghost {
    background: none !important;
    border: none !important;
    color: var(--primary, #D4AF37) !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    padding: 0 !important;
    text-decoration: none;
    transition: color 0.15s ease, opacity 0.15s ease !important;
    font-family: inherit !important;
}

.mk-auth .mk-btn--ghost:hover {
    color: var(--gold-300, #E8C84D) !important;
    opacity: 0.85 !important;
}

/* ── Password row (confirm password side-by-side) ─────────────────────── */
.mk-auth .mk-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.875rem;
}

/* ── Form field wrapper ───────────────────────────────────────────────── */
.mk-auth .mk-field {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ── Social login section ─────────────────────────────────────────────── */
.ovsm-social-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.mk-auth .mk-divider {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    font-size: 0.75rem;
    color: var(--text-muted, #A0A0A0);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 0 1rem;
}

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

.mk-auth .mk-social-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.mk-auth .mk-social-btn {
    flex: 1;
    min-width: 140px;
    padding: 0.75rem 1.25rem !important;
    min-height: 44px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 0.75rem !important;
    background: rgba(255, 255, 255, 0.03) !important;
    color: var(--text-light, #F5F5F5) !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease !important;
    text-decoration: none !important;
}

.mk-auth .mk-social-btn:hover {
    background: rgba(212, 175, 55, 0.08) !important;
    border-color: rgba(212, 175, 55, 0.35) !important;
    transform: translateY(-1px) !important;
}

/* ── Alert messages ───────────────────────────────────────────────────── */
.mk-auth .mk-alert {
    padding: 0.75rem 1rem;
    border-radius: 0.625rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* ── Responsive: stack at ≤768px ──────────────────────────────────────── */
@media (max-width: 768px) {
    .mk-auth {
        padding: 5rem 0.75rem 2rem;
    }

    .mk-auth .mk-auth-card {
        padding: 2rem 1.25rem;
        border-radius: 1rem;
    }

    .ovsm-two-col {
        grid-template-columns: 1fr;
    }

    .ovsm-vdivider {
        display: none;
    }

    .ovsm-form-col + .ovsm-form-col {
        margin-top: 2.5rem;
        padding-top: 2rem;
        border-top: 1px solid rgba(255, 255, 255, 0.07);
    }

    .mk-auth .mk-form-row {
        grid-template-columns: 1fr;
    }

    .mk-auth .mk-social-btns {
        flex-direction: column;
    }

    .mk-auth .mk-social-btn {
        min-width: unset;
    }
}

@media (max-width: 480px) {
    .mk-auth .mk-auth-card {
        padding: 1.5rem 1rem;
    }

    .ovsm-auth-title {
        font-size: 1.5rem;
    }

    /* F10: OAuth buttons full-width on mobile */
    .mk-auth .mk-social-btns a,
    .mk-auth .mk-social-btns button,
    .mk-auth .mk-social-btn,
    .mk-btn-social,
    .ovsm-oauth-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ── 640px: single-column stacked (explicit two-col breakpoint) ───────── */
@media (max-width: 640px) {
    .ovsm-two-col {
        grid-template-columns: 1fr;
    }

    .ovsm-vdivider {
        display: none;
    }

    .ovsm-form-col + .ovsm-form-col {
        margin-top: 2rem;
        padding-top: 2rem;
        border-top: 1px solid rgba(255, 255, 255, 0.07);
    }
}

/* ── 320px: tightest mobile (min supported width) ─────────────────────── */
@media (max-width: 320px) {
    .mk-auth {
        padding: 4rem 0.5rem 1.5rem;
    }

    .mk-auth .mk-auth-card {
        padding: 1.25rem 0.75rem;
        border-radius: 0.75rem;
    }

    .ovsm-auth-title {
        font-size: 1.3rem;
    }

    .mk-auth .mk-form-row {
        grid-template-columns: 1fr;
    }

    .mk-auth .mk-social-btn {
        min-width: unset;
        flex: 1 1 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mk-auth .mk-input,
    .mk-auth .mk-btn--primary,
    .mk-auth .mk-social-btn {
        transition: none !important;
    }

    .mk-auth .mk-btn--primary:hover,
    .mk-auth .mk-social-btn:hover {
        transform: none !important;
    }
}

/* ── Skip-to-content link (WCAG 2.4.1) ──────────────────────────────────── */
.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: 10000;
}

.skip-link:focus,
.skip-link:focus-visible {
    left: 0.75rem;
    top: 0.75rem;
    width: auto;
    height: auto;
    overflow: visible;
    padding: 0.625rem 1rem;
    background: var(--primary, #D4AF37);
    color: var(--neutral-950, #050505);
    font-weight: 700;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
