/* Epic splash — almost-white surface with a faint grayscale hero glimpse */

:root {
    --epic-loading-surface: #fcfcfc;
    /* ~88% white wash: near-white with only a faint hero glimpse */
    --epic-loading-veil: rgba(255, 255, 255, 0.88);
    --epic-loading-hero-filter: blur(1.25rem) grayscale(100%) brightness(1.48) contrast(0.65) saturate(0);
    --epic-mobile-safe-top: 24px;
    --epic-mobile-safe-top: calc(24px + env(safe-area-inset-top, 0px));
}

html,
body {
    margin: 0;
    height: 100%;
    background: var(--epic-loading-surface);
}

/* Stable rem during splash + overlay (avoids size jump when root scale runs) */
html:has(.epic-splash),
html:has(.signup-flow-overlay),
html:has(.gaming-ndrp-status) {
    font-size: 16px;
}

#app {
    min-height: 100dvh;
    background: var(--epic-loading-surface);
}

.epic-splash {
    position: fixed;
    inset: 0;
    z-index: 2147483646;
    display: grid;
    overflow: hidden;
    isolation: isolate;
    opacity: 1;
    font-family: "Montserrat", sans-serif;
    color: #0d0d0d;
    transition: opacity 0.45s ease;
}

.epic-splash--dismissed {
    opacity: 0;
    pointer-events: none;
}

.epic-splash__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: var(--epic-loading-surface) url("images/hero-newport.jpg") center 42% / cover no-repeat;
    transform: scale(1.06);
    filter: var(--epic-loading-hero-filter);
}

.epic-splash__scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: var(--epic-loading-veil);
}

.epic-splash__content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-rows: auto 1fr auto;
    align-items: center;
    justify-items: center;
    min-height: 100dvh;
    min-height: 100svh;
    width: 100%;
    max-width: 40rem;
    margin-inline: auto;
    padding: max(2rem, env(safe-area-inset-top, 0px) + 1.25rem) 1.5rem
        max(2rem, env(safe-area-inset-bottom, 0px) + 1rem);
    box-sizing: border-box;
    text-align: center;
    pointer-events: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.epic-splash__header,
.signup-flow-overlay__header {
    display: grid;
    justify-items: center;
    width: min(72vw, 11.5rem);
    min-height: 2.625rem;
}

.epic-splash__logo,
.signup-flow-overlay__logo {
    display: block;
    width: 100%;
    height: auto;
    max-height: 2.625rem;
    object-fit: contain;
}

.epic-splash__main,
.signup-flow-overlay__main {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 0.75rem;
    width: min(88vw, 24rem);
}

.epic-splash__title,
.signup-flow-overlay__title {
    margin: 0.25rem 0 0;
    padding: 0;
    border: none;
    outline: none;
    box-shadow: none;
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #0d0d0d;
    background: transparent;
}

.epic-splash__title:focus,
.epic-splash__title:focus-visible,
.signup-flow-overlay__title:focus,
.signup-flow-overlay__title:focus-visible {
    outline: none;
    box-shadow: none;
}

.epic-splash__title::selection,
.epic-splash__subtitle::selection,
.signup-flow-overlay__title::selection,
.signup-flow-overlay__subtitle::selection {
    background: transparent;
    color: inherit;
}

.epic-splash__subtitle,
.signup-flow-overlay__subtitle {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.45;
    color: #666666;
}

.epic-splash__footer,
.signup-flow-overlay__footer {
    display: grid;
    justify-items: center;
    gap: 0.5rem;
    width: min(72vw, 14rem);
}

.epic-splash__progress,
.signup-flow-overlay__progress {
    width: 100%;
    height: 0.125rem;
    border-radius: 9999px;
    background: #e8e4de;
    overflow: hidden;
}

.epic-splash__progress-bar {
    display: block;
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: #b07a3a;
    transition: width 0.35s ease;
}

.signup-flow-overlay__progress-bar {
    display: block;
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: #b07a3a;
    transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.signup-flow-overlay--exit-up {
    animation: signup-flow-overlay-exit-up 0.72s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    pointer-events: none;
}

@keyframes signup-flow-overlay-exit-up {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-16%);
    }
}

.epic-splash__note,
.signup-flow-overlay__note {
    margin: 0;
    font-size: 0.6875rem;
    font-weight: 500;
    color: #8a8a8a;
}

@keyframes epic-splash-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (min-width: 48rem) {
    .epic-splash__header,
    .signup-flow-overlay__header {
        width: min(40vw, 13rem);
        min-height: 3rem;
    }

    .epic-splash__logo,
    .signup-flow-overlay__logo {
        max-height: 3rem;
    }

    .epic-splash__title,
    .signup-flow-overlay__title {
        font-size: 1.5rem;
    }

    .epic-splash__subtitle,
    .signup-flow-overlay__subtitle {
        font-size: 0.625rem;
    }

    .epic-splash__footer,
    .signup-flow-overlay__footer {
        width: min(32vw, 15rem);
    }
}

/* In-app loading overlay (global — must fully cover routed page behind) */
.signup-flow-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483645;
    display: block;
    overflow: hidden;
    background-color: var(--epic-loading-surface);
    font-family: "Montserrat", sans-serif;
    color: #0d0d0d;
}

.signup-flow-overlay__scrim {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background-color: var(--epic-loading-surface);
}

.signup-flow-overlay__scrim::before {
    content: "";
    position: absolute;
    inset: -4%;
    z-index: 0;
    background: url("images/hero-newport.jpg") center 42% / cover no-repeat;
    transform: scale(1.06);
    filter: var(--epic-loading-hero-filter);
}

.signup-flow-overlay__scrim::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: var(--epic-loading-veil);
}

.signup-flow-overlay__content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: auto 1fr auto;
    align-items: center;
    justify-items: center;
    min-height: 100dvh;
    min-height: 100svh;
    width: 100%;
    max-width: 40rem;
    margin-inline: auto;
    padding: max(2rem, env(safe-area-inset-top, 0px) + 1.25rem) 1.5rem
        max(2rem, env(safe-area-inset-bottom, 0px) + 1rem);
    box-sizing: border-box;
    text-align: center;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.signup-flow-spinner,
.epic-splash__spinner {
    width: 2.75rem;
    height: 2.75rem;
    border: 0.125rem solid rgba(176, 122, 58, 0.22);
    border-top-color: #b07a3a;
    border-radius: 50%;
    animation: epic-splash-spin 0.85s linear infinite;
}

.epic-splash__note,
.signup-flow-overlay__note {
    margin: 0;
    font-size: 0.6875rem;
    font-weight: 500;
    color: #8a8a8a;
}

/* Gaming shell — child card typography (scoped ::deep does not reach @ChildContent) */
html body #app .gaming-details .gaming-details__header {
    text-align: center;
}

html body #app .gaming-details .gaming-details__title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #000;
}

html body #app .gaming-details .gaming-details__title:focus,
html body #app .gaming-details .gaming-details__title:focus-visible {
    outline: none;
}

html body #app .gaming-details .gaming-details__lead {
    margin: 0.375rem 0 0;
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--epic-surface-text-muted, #666);
}

html body #app .gaming-details .gaming-details__error {
    margin: 0.75rem 0 0;
    padding: 0.625rem 0.75rem;
    border: 0.0625rem solid rgba(220, 38, 38, 0.35);
    border-radius: 0.375rem;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.4;
}

/* NDRP status — child content (scoped ::deep misses MidContent / FooterContent) */
html body #app .gaming-ndrp-status .gaming-ndrp-status__icon {
    display: grid;
    place-items: center;
    width: 4.5rem;
    height: 4.5rem;
    padding: 0.25rem;
    border: 0.0625rem solid #b58e61;
    border-radius: 9999px;
    box-sizing: border-box;
}

html body #app .gaming-ndrp-status .gaming-ndrp-status__icon-fill {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    border-radius: 9999px;
    background: #efe4d4;
}

html body #app .gaming-ndrp-status .gaming-ndrp-status__icon-core {
    display: grid;
    place-items: center;
    width: 2.375rem;
    height: 2.375rem;
    border-radius: 9999px;
    background: #b58e61;
    color: #fff;
}

html body #app .gaming-ndrp-status .gaming-ndrp-status__icon-core svg {
    width: 1.25rem;
    height: 1.25rem;
}

html body #app .gaming-ndrp-status .gaming-ndrp-status__title {
    margin: 0.25rem 0 0;
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #0d0d0d;
}

html body #app .gaming-ndrp-status--review .gaming-ndrp-status__title {
    max-width: 100%;
    letter-spacing: 0.05em;
}

@media (max-width: 47.999rem) {
    html body #app .gaming-ndrp-status__main,
    html body #app .gaming-ndrp-status__footer {
        width: 100% !important;
        max-width: none !important;
        justify-self: center !important;
    }

    html body #app .gaming-ndrp-status--review .gaming-ndrp-status__title {
        font-size: clamp(0.6875rem, 3.35vw, 1rem) !important;
        white-space: nowrap;
    }
}

@media (min-width: 48rem) {
    html body #app .gaming-ndrp-status--review .gaming-ndrp-status__title {
        white-space: nowrap;
    }
}

html body #app .gaming-ndrp-status .gaming-ndrp-status__lead {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.45;
    color: #666;
}

html body #app .gaming-ndrp-status .gaming-ndrp-status__notice {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.75rem 1rem;
    border: 0.0625rem solid #e8e8e8;
    border-radius: 0.25rem;
    background: #fff;
}

html body #app .gaming-ndrp-status .gaming-ndrp-status__notice-icon {
    color: #b58e61;
}

html body #app .gaming-ndrp-status .gaming-ndrp-status__notice-text {
    font-size: 0.6875rem;
    font-weight: 600;
    color: #b58e61;
}

html body #app .gaming-ndrp-status .gaming-ndrp-status__link {
    color: #0d0d0d;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 0.2rem;
}

@media (min-width: 48rem) {
    html body #app .gaming-ndrp-status .gaming-ndrp-status__title {
        font-size: 1.5rem;
    }

    html body #app .gaming-ndrp-status--review .gaming-ndrp-status__title {
        font-size: 1.25rem;
    }

    html body #app .gaming-ndrp-status .gaming-ndrp-status__lead {
        font-size: 0.625rem;
    }
}

/* Gaming shell — footer gap (scoped CSS misses @ChildContent on all viewports) */
html body #app .gaming-details .gaming-details__footer {
    margin-top: var(--epic-gaming-footer-gap, 2rem) !important;
    padding-top: 0 !important;
}

/* Mobile notch / island — unlayered, loads before scoped CSS */
.epic-mobile-safe-area {
    display: none;
}

@media (max-width: 47.999rem) {
    /* Splash + in-app overlay: spacer row + drop duplicate top padding */
    .epic-mobile-safe-area {
        display: block;
        width: 100%;
        min-height: 1.5rem;
        height: 1.5rem;
        height: calc(1.5rem + env(safe-area-inset-top, 0px));
        flex-shrink: 0;
        pointer-events: none;
    }

    .epic-splash__content,
    .signup-flow-overlay__content,
    html body #app .gaming-ndrp-status__content {
        grid-template-rows: auto auto 1fr auto;
        padding-top: 0 !important;
    }

    /* Lifestyle shell — safe-area only (spacing below logo lives in *.razor.css) */
    html body #app .lifestyle-signup__panel {
        padding-top: 1.5rem !important;
        padding-top: calc(1.5rem + env(safe-area-inset-top, 0px)) !important;
    }

    /* Gaming / home shells — safe-area top padding */
    html body #app .gaming-details__shell,
    html body #app .gaming-consent__shell,
    html body #app .gaming-success__shell,
    html body #app .lifestyle-dashboard__shell,
    html body #app .lhome-page__content {
        padding-top: 1.5rem !important;
        padding-top: calc(1.5rem + env(safe-area-inset-top, 0px)) !important;
    }

    html body #app .gaming-consent__block--header {
        padding-top: 1.5rem !important;
        padding-top: calc(1.5rem + env(safe-area-inset-top, 0px)) !important;
    }

    html body #app .gaming-details__logo {
        margin-bottom: 1.5rem !important;
    }
}

/* Gaming verification shell — shared layout for What you need / Sumsub / Questions / Review / ID */
@media (min-width: 48rem) {
    html body #app .gaming-details.gaming-what-you-need .gaming-details__shell,
    html body #app .gaming-details.gaming-compliance .gaming-details__shell,
    html body #app .gaming-details.gaming-review .gaming-details__shell,
    html body #app .gaming-details.gaming-id-upload .gaming-details__shell,
    html body #app .gaming-details__shell {
        align-items: start !important;
        padding-top: var(--epic-gaming-shell-pad-top, 1.5rem) !important;
        padding-bottom: 2rem !important;
    }

    html body #app .gaming-details.gaming-what-you-need .gaming-details__stack,
    html body #app .gaming-details.gaming-compliance .gaming-details__stack,
    html body #app .gaming-details.gaming-review .gaming-details__stack,
    html body #app .gaming-details.gaming-id-upload .gaming-details__stack,
    html body #app .gaming-details__stack {
        max-width: var(--epic-gaming-stack-max-desktop, 39rem) !important;
        padding-top: 0 !important;
    }

    html body #app .gaming-details.gaming-what-you-need .gaming-details__logo,
    html body #app .gaming-details.gaming-compliance .gaming-details__logo,
    html body #app .gaming-details.gaming-review .gaming-details__logo,
    html body #app .gaming-details.gaming-id-upload .gaming-details__logo,
    html body #app .gaming-details__logo {
        margin-bottom: var(--epic-gaming-logo-gap, 3.5rem) !important;
    }

    html body #app .gaming-details.gaming-what-you-need .gaming-details__card,
    html body #app .gaming-details.gaming-what-you-need .gaming-what-you-need__card--sumsub,
    html body #app .gaming-details.gaming-compliance .gaming-details__card,
    html body #app .gaming-details.gaming-review .gaming-details__card,
    html body #app .gaming-details.gaming-id-upload .gaming-details__card,
    html body #app .gaming-details .gaming-details__card {
        display: flex;
        flex-direction: column;
        width: 100%;
        box-sizing: border-box;
        padding: 2.5rem;
        border: 0.0625rem solid #c9b08f;
        background: #fff;
    }

    html body #app .gaming-details .gaming-verification-progress {
        width: 100%;
    }
}

/* Sumsub — prevent horizontal scroll on mobile liveness */
@media (max-width: 47.999rem) {
    html:has(.gaming-what-you-need__card--sumsub),
    html:has(.gaming-what-you-need__card--sumsub) body,
    html:has(.gaming-what-you-need__card--sumsub) #app {
        overflow-x: clip;
        max-width: 100%;
    }

    html body #app .gaming-details:has(.gaming-what-you-need__card--sumsub) .gaming-details__shell {
        padding-inline: 0 !important;
        overflow-x: clip;
    }

    html body #app .gaming-details:has(.gaming-what-you-need__card--sumsub) .gaming-details__stack {
        overflow-x: clip;
        max-width: 100%;
        min-width: 0;
    }

    html body #app .gaming-details:has(.gaming-what-you-need__card--sumsub) .gaming-details__logo,
    html body #app .gaming-details:has(.gaming-what-you-need__card--sumsub) .gaming-verification-progress {
        padding-inline: 1.25rem;
        box-sizing: border-box;
    }

    html body #app .gaming-details.gaming-what-you-need .gaming-what-you-need__card--sumsub {
        padding: 0 !important;
        border-inline: none !important;
        border-radius: 0 !important;
        overflow-x: clip;
    }

    html body #app .gaming-details.gaming-what-you-need .gaming-what-you-need__footer--sumsub {
        padding-inline: 1.25rem;
        box-sizing: border-box;
    }
}
