/* Guest login / MFA split screen (Back & Rosta gallery mockup). */

body:has(.tess-login-screen) {
    background: #fff !important;
    background-image: none !important;
    /* Errors must not introduce a viewport scrollbar — that shrinks width and
       reflows the flex hero, so object-fit cover looks like a jump. */
    overflow: hidden !important;
    scrollbar-gutter: stable;
}

/* Guest login is emitted inside .row.content; Bootstrap pads .row > * and that
   insets a position:fixed screen. Neutralize host + screen for both the
   Theme <center> path and Session::processLogin (no center). */
center:has(.tess-login-screen),
.tess-login-host {
    display: block;
    width: 100%;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left;
}

.tess-page-shell:has(.tess-login-screen),
.box:has(.tess-login-screen) {
    background: #fff;
    min-height: 100vh;
}

.tess-page-shell:has(.tess-login-screen) > .tess-page-header,
.tess-page-shell:has(.tess-login-screen) > .tess-inspinia5-footer,
.tess-page-shell:has(.tess-login-screen) > .brisc-inspinia-footer,
.box:has(.tess-login-screen) > .header,
.box:has(.tess-login-screen) > .footer {
    display: none !important;
}

.tess-page-shell:has(.tess-login-screen) > .tess-main-content,
.box:has(.tess-login-screen) > .content {
    padding: 0 !important;
    margin: 0 !important;
    min-height: 100vh;
}

.tess-login-screen {
    --tess-login-gold: #c4a265;
    --tess-login-ink: #111111;
    --tess-login-muted: #6b7280;
    --tess-login-line: #e8e8e8;
    --tess-login-error: var(--tess-text-error, #ed5565);
    --tess-login-ok: var(--tess-text-success, #1a7f4b);
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: stretch;
    height: 100%;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    background: #fff;
    color: var(--tess-login-ink);
}

.tess-login-hero {
    position: relative;
    flex: 1 1 64%;
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    background: #0b0b0b;
}

.tess-login-hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 34% 80%;
}

.tess-login-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.32) 0%, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.78) 100%);
    pointer-events: none;
}

.tess-login-hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: 40px 48px 28px;
    color: #fff;
}

.tess-login-brand {
    display: flex;
    align-items: flex-start;
    max-width: 280px;
}

.tess-login-brand-logo {
    display: block;
    width: min(260px, 28vw);
    height: auto;
    /* Soft glow padding in the asset; gold ring starts at ~7.33% of image width. */
    transform: translateX(-7.33%);
}

.tess-login-hero-bottom {
    display: flex;
    flex-direction: column;
    gap: 28px;
    max-width: 44rem;
}

.tess-login-hero-copy {
    max-width: 44rem;
}

.tess-login-screen .tess-login-tagline {
    margin: 0 0 16px;
    font-family: "Liberation Serif", "DejaVu Serif", Georgia, "Times New Roman", serif !important;
    font-size: clamp(2.2rem, 4.1vw, 3.5rem) !important;
    font-weight: 400 !important;
    line-height: 1.12 !important;
    letter-spacing: -0.015em;
    color: #fff;
}

.tess-login-tagline-line {
    display: block;
    white-space: nowrap;
}

.tess-login-tagline em {
    font-style: normal;
    color: var(--tess-login-gold);
}

.tess-login-kicker-gold {
    margin: 0;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--tess-login-gold);
}

.tess-login-hero-footer {
    font-size: 11px;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.78);
}

.tess-login-hero-footer span + span::before {
    content: " | ";
    opacity: 0.7;
}

.tess-login-panel {
    position: relative;
    flex: 0 0 36%;
    max-width: 540px;
    width: 36%;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    background: #fff;
    padding: 28px 48px 22px;
}

.tess-login-panel::before {
    content: "";
    position: absolute;
    top: -18%;
    right: -42%;
    width: min(165%, 820px);
    aspect-ratio: 1;
    pointer-events: none;
    z-index: 0;
    background-color: var(--tess-login-gold);
    opacity: 0.16;
    -webkit-mask-image: var(--tess-petals-mask, url("brand-petals.svg?20261004-2"));
    mask-image: var(--tess-petals-mask, url("brand-petals.svg?20261004-2"));
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.tess-login-panel > * {
    position: relative;
    z-index: 1;
}

.tess-login-panel-lang {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-height: 28px;
}

.tess-login-panel-lang span {
    display: inline-flex;
    align-items: center;
}

.tess-login-panel-lang a {
    padding: 0 10px;
    line-height: 1;
}

.tess-login-panel-lang a + a {
    border-left: 1px solid #d4d4d4;
}

.tess-login-panel-lang img {
    max-height: 18px !important;
    width: auto;
    display: block;
}

.tess-login-panel-main {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
}

.tess-login-heading {
    margin: 0 0 10px;
    font-size: clamp(2rem, 3.4vw, 2.75rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--tess-login-ink);
}

.tess-login-lead {
    margin: 0 0 28px;
    font-size: 15px;
    color: var(--tess-login-muted);
}

.tess-login-lead.is-error {
    color: var(--tess-login-error);
}

.tess-login-lead.is-ok {
    color: var(--tess-login-ok);
}

.tess-login-field {
    position: relative;
    margin-bottom: 14px;
}

.tess-login-field > i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9aa0a6;
    font-size: 14px;
    pointer-events: none;
}

.tess-login-screen .tess-login-field .form-control {
    display: block;
    width: 100%;
    height: 48px;
    padding: 10px 16px 10px 42px;
    border: 1px solid var(--tess-login-line);
    border-radius: 999px;
    background: #fff;
    color: var(--tess-login-ink);
    font-size: 14px;
    box-shadow: none;
}

.tess-login-screen .tess-login-field .form-control:focus {
    border-color: #c9c9c9;
    box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.06);
    outline: 0;
}

.tess-login-screen .tess-login-field .form-control::placeholder {
    color: #9aa0a6;
}

.tess-login-screen font {
    display: block;
    margin: -6px 0 12px 16px;
    font-size: 12px;
    /* Beat legacy <font color="…"> so field errors match .is-error. */
    color: var(--tess-login-error) !important;
}

.tess-login-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 48px;
    margin-top: 8px;
    border: 0;
    border-radius: 999px;
    background: #111;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    box-shadow: none;
}

.tess-login-submit:hover,
.tess-login-submit:focus {
    background: #000;
    color: #fff;
}

.tess-login-submit i {
    font-size: 14px;
}

.tess-login-secondary {
    margin: 18px 0 0;
    text-align: center;
}

.tess-login-secondary a {
    color: #8b8b8b;
    font-size: 13px;
    text-decoration: none;
}

.tess-login-secondary a:hover,
.tess-login-secondary a:focus {
    color: #111;
    text-decoration: underline;
}

.tess-login-panel-meta {
    text-align: right;
    font-size: 11px;
    color: #b0b0b0;
}

.tess-login-panel-meta span,
.tess-login-panel-meta a {
    color: inherit;
    cursor: pointer;
}

.tess-login-actions .btn-default {
    display: block;
    width: 100%;
    margin-top: 10px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid var(--tess-login-line);
    background: #fff;
    color: #333;
}

@media (max-width: 960px) {
    body:has(.tess-login-screen) {
        overflow: auto !important;
    }

    .tess-login-screen {
        position: relative;
        inset: auto;
        height: auto;
        min-height: 100vh;
        overflow: visible;
        flex-direction: column;
    }

    .tess-login-hero {
        flex: 0 0 auto;
        height: auto;
        min-height: 42vh;
    }

    .tess-login-hero-inner {
        height: auto;
        min-height: 42vh;
        padding: 24px 24px 20px;
    }

    .tess-login-hero-copy,
    .tess-login-hero-footer {
        display: none;
    }

    .tess-login-hero-bottom {
        gap: 0;
    }

    .tess-login-tagline {
        font-size: clamp(1.7rem, 7vw, 2.4rem);
    }

    .tess-login-panel {
        flex: 1 1 auto;
        width: 100%;
        max-width: none;
        height: auto;
        min-height: 0;
        overflow: visible;
        padding: 28px 28px 20px;
    }
}

@media (max-width: 560px) {
    .tess-login-hero {
        min-height: 34vh;
    }

    .tess-login-hero-inner {
        min-height: 34vh;
        padding: 18px 18px 14px;
    }

    .tess-login-brand-logo {
        width: min(200px, 62vw);
    }

    .tess-login-panel {
        padding: 22px 20px 16px;
    }
}
