/* Variant B — full-bleed truck photo background + glass login panel.
   Loaded only on Account login surfaces (Login, VerifyLoginCode, etc.)
   via the isLoginPage flag in _Layout.cshtml. Overrides site.css inside
   .login-shell so existing form classes (.login-input, .btn-login,
   .mfa-code-input, password-toggle-btn, .login-logo, .brand-logo-lockup)
   keep their JS hooks while gaining the dark glass aesthetic. */

.login-shell {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    color: #ffffff;
    background: #050505;
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

/* Replace the old split layout entirely so body never falls back to
   white-page flash on slow image loads. */
.login-shell,
body:has(> .app-container > .main-wrapper > main > .login-shell) {
    background: #050505;
}

/* ── Photo background + animated sweep ───────────────────────────── */
.login-bg {
    position: absolute;
    inset: 0;
    background-color: #050505;
    background-image: url("../images/login/bee-login-bg.jpg");
    background-image: image-set(
        url("../images/login/bee-login-bg.webp") type("image/webp"),
        url("../images/login/bee-login-bg.jpg") type("image/jpeg"));
    background-size: cover;
    background-position: center;
    transform: scale(1.04);
    animation: login-slow-pan 20s ease-in-out infinite;
}

.login-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.34) 48%, rgba(0, 0, 0, 0.74) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.62));
}

.login-motion-sweep {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.login-motion-sweep::before {
    content: "";
    position: absolute;
    top: -20%;
    left: -35%;
    width: 42%;
    height: 140%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
    transform: skewX(-18deg);
    animation: login-sweep 8s cubic-bezier(.22, .61, .36, 1) infinite;
}

@keyframes login-sweep {
    0%, 18% { transform: translateX(0) skewX(-18deg); opacity: 0; }
    28%     { opacity: .55; }
    54%     { transform: translateX(320%) skewX(-18deg); opacity: 0; }
    100%    { transform: translateX(320%) skewX(-18deg); opacity: 0; }
}

@keyframes login-slow-pan {
    0%, 100% { transform: scale(1.04) translate3d(0, 0, 0); }
    50%      { transform: scale(1.08) translate3d(-1.4%, .8%, 0); }
}

@keyframes login-panel-rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .login-bg,
    .login-motion-sweep::before,
    .login-glass-panel {
        animation: none !important;
        transform: none;
    }
}

/* ── Two-column shell ─────────────────────────────────────────────── */
.login-shell .login-content {
    position: relative;
    z-index: 2;
    display: grid;
    min-height: 100vh;
    grid-template-columns: minmax(320px, 1fr) minmax(380px, 510px);
    /* align-content centres the single row vertically in 100vh.
       align-items: stretch makes each cell fill the row, so the copy's
       headline text and the glass panel's HIVE logo both land at the
       row's top edge. */
    align-content: center;
    align-items: stretch;
    gap: clamp(32px, 7vw, 104px);
    padding: 52px clamp(40px, 7vw, 110px);
}

.login-shell .login-copy {
    color: #ffffff;
    max-width: 720px;
    /* Stretched to row height (set by align-items: stretch on the grid);
       headline text sits at the top of the column, matching the glass
       panel's HIVE logo Y position. */
}

/* HIVE logo lives inside the glass panel only — hide the left-side
   duplicate so the copy column is just headline + subtitle.
   Specificity 0,0,4 (3 classes + class-on-class) so it beats the
   global `.login-shell .brand-logo-lockup.login-logo` rule further
   down the stylesheet. */
.login-shell .login-copy .brand-logo-lockup.login-logo {
    display: none;
}

.login-shell .login-copy h1 {
    margin: 0 0 22px;
    font-size: clamp(48px, 5.6vw, 92px);
    line-height: 1.04;
    color: #ffffff;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.login-shell .login-copy p {
    margin: 0;
    max-width: 560px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 19px;
    line-height: 1.55;
}

/* ── Glass panel wrapping the existing form ───────────────────────── */
.login-shell .login-glass-panel {
    position: relative;
    padding: 34px;
    border: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: 8px;
    background: rgba(8, 8, 8, 0.72);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    animation: login-panel-rise 420ms ease-out both;
    color: #ffffff;
}

/* Glass panel always renders the HIVE lockup at the top — the
   left-side copy column has no logo any more (see .login-copy rule). */
.login-shell .login-panel-logo {
    display: inline-flex;
    margin-bottom: 32px;
}

/* The _Section_ClaimHeader-style logo lockup inside the form wrapper
   is kept hidden — the form wrapper already gets its lockup above
   via .login-panel-logo. */
.login-shell .login-glass-panel .login-form-wrapper > .brand-logo-lockup {
    display: none;
}

/* ── Form colour reskinning (overrides site.css inside the shell) ── */
.login-shell .login-title {
    margin: 0 0 26px;
    color: #ffffff;
    font-size: 34px;
    line-height: 1.06;
}

.login-shell .login-label {
    color: #c8ccd2;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.login-shell .login-input {
    height: 48px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    padding: 0 14px;
    color: #ffffff;
    background: rgba(22, 22, 22, 0.88);
    font-family: inherit;
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.login-shell .login-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.login-shell .login-input:focus {
    border-color: rgba(232, 120, 10, 0.8);
    box-shadow: 0 0 0 3px rgba(232, 120, 10, 0.16);
    background: rgba(28, 28, 28, 0.95);
}

.login-shell .login-password-field {
    position: relative;
}

.login-shell .password-toggle-btn {
    color: rgba(255, 255, 255, 0.6);
}
.login-shell .password-toggle-btn:hover,
.login-shell .password-toggle-btn:focus {
    color: #ffffff;
}

.login-shell .login-link,
.login-shell a.login-link {
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
}
.login-shell .login-link:hover { color: #ffffff; }

.login-shell .btn-login {
    width: 100%;
    height: 50px;
    border: 0;
    border-radius: 8px;
    color: #2a1300;
    background: var(--accent-orange, #E8780A);
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(232, 120, 10, 0.22);
    transition: filter 120ms ease;
}
.login-shell .btn-login:hover:not(:disabled) { filter: brightness(1.08); }
.login-shell .btn-login:disabled { opacity: 0.6; cursor: wait; }

.login-shell .login-validation-alert {
    background: rgba(220, 38, 38, 0.18);
    border: 1px solid rgba(220, 38, 38, 0.5);
    color: #fecaca;
    padding: 10px 14px;
    border-radius: 8px;
    margin: 0 0 16px;
    font-size: 13px;
}

.login-shell .text-danger {
    color: #fca5a5;
    font-size: 12px;
    display: block;
    margin-top: 4px;
}

/* ── MFA inputs reskin ────────────────────────────────────────────── */
.login-shell .mfa-header-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(232, 120, 10, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-orange, #E8780A);
    margin: 0 auto 22px;
}

/* Center the MFA-specific block (icon, title, subtitle, code grid,
   expiry hint, submit button, resend + back) inside the glass panel
   so the envelope icon stops orphaning to the left while everything
   below is already centered. Scoped via :has() so the Login page is
   not affected. */
.login-shell .login-glass-panel:has(.mfa-header-icon-wrap) .login-form-wrapper {
    text-align: center;
}
.login-shell .login-glass-panel:has(.mfa-header-icon-wrap) .login-form-wrapper .mfa-subtitle {
    text-align: center;
}
.login-shell .login-glass-panel:has(.mfa-header-icon-wrap) .login-form-wrapper form {
    text-align: left; /* form fields render LTR even on a centered MFA panel */
}

.login-shell .mfa-subtitle {
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: 22px;
    font-size: 14px;
}
.login-shell .mfa-subtitle strong { color: #ffffff; }

.login-shell .mfa-code-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin: 18px 0 14px;
}
.login-shell .mfa-code-input {
    height: 56px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background: rgba(22, 22, 22, 0.88);
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    outline: none;
}
.login-shell .mfa-code-input:focus {
    border-color: rgba(232, 120, 10, 0.8);
    box-shadow: 0 0 0 3px rgba(232, 120, 10, 0.16);
}
.login-shell .mfa-expiry-text {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    text-align: center;
    margin: 6px 0 18px;
}
.login-shell .mfa-resend-form {
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
    text-align: center;
}
.login-shell .mfa-resend-btn {
    background: none;
    border: 0;
    color: var(--accent-orange, #E8780A);
    cursor: pointer;
    font-weight: 700;
    padding: 0 4px;
}
.login-shell .mfa-resend-btn:hover:not(:disabled) { text-decoration: underline; }
.login-shell .mfa-back-wrap { text-align: center; margin-top: 14px; }
.login-shell .mfa-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
}
.login-shell .mfa-back-link:hover { color: #ffffff; }
.login-shell .mfa-magic-link-banner {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    padding: 10px 12px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    margin: 0 0 16px;
}

/* ── Logo lockup inside the shell ─────────────────────────────────── */
.login-shell .login-logo,
.login-shell .brand-logo-lockup.login-logo {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}
.login-shell .login-logo .bee-logo-icon,
.login-shell .brand-logo-lockup.login-logo .bee-logo-icon {
    width: 64px;
    height: 64px;
    object-fit: contain;
}
.login-shell .login-logo .brand-separator,
.login-shell .brand-logo-lockup.login-logo .brand-separator {
    width: 1px;
    height: 50px;
    background: rgba(255, 255, 255, 0.32);
    border: 0;
}
.login-shell .login-logo .logo-text,
.login-shell .brand-logo-lockup.login-logo .logo-text {
    font-size: 42px;
    line-height: 1;
    letter-spacing: 0.08em;
    color: #ffffff;
    font-weight: 700;
}

/* ── Language switcher pill, top-right ────────────────────────────── */
.login-shell .login-lang-switcher {
    position: fixed;
    top: 24px;
    right: 28px;
    z-index: 20;
}

/* ── Mobile (≤820px): hide copy column, glass panel takes over ──── */
@media (max-width: 820px) {
    .login-shell .login-content {
        display: block;
        padding: 36px 22px;
        min-height: 100vh;
    }
    .login-shell .login-copy {
        display: none;
    }
    .login-shell .login-glass-panel {
        background: rgba(4, 4, 4, 0.86);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        padding: 28px 22px;
    }
    .login-shell .login-panel-logo {
        display: inline-flex;
        margin-bottom: 38px;
    }
    .login-shell .login-title { font-size: 28px; }
    .login-shell .login-copy h1 { font-size: 30px; }
}
