/* Space Gate Nova+ — Header + Live Catalogue emergency repair
   Loaded last. Repairs cascade regressions without changing page logic. */

:root {
    --nova-home-header-content-h: 64px;
    --nova-landing-header-content-h: 62px;
    --nova-header-inline: clamp(16px, 3vw, 28px);
}

/* HOME -------------------------------------------------------------------
   Later global layers had collapsed the NOVA+ wordmark button to 36px.
   Restore the intended free-floating brand + utility-action composition. */
header.oscar-toolbar.professional-home-toolbar {
    width: 100% !important;
    max-width: none !important;
    height: calc(var(--nova-home-header-content-h) + var(--safe-top, 0px)) !important;
    min-height: calc(var(--nova-home-header-content-h) + var(--safe-top, 0px)) !important;
    margin: 0 !important;
    padding: var(--safe-top, 0px)
        max(var(--nova-header-inline), var(--safe-right, 0px)) 0
        max(var(--nova-header-inline), var(--safe-left, 0px)) !important;
    background: linear-gradient(180deg, rgba(0,0,0,.72) 0%, rgba(0,0,0,.27) 64%, transparent 100%) !important;
    border: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    overflow: visible !important;
}

html.sg-header-scrolled header.oscar-toolbar.professional-home-toolbar {
    background: rgba(2,3,7,.84) !important;
    border-bottom: 1px solid rgba(255,255,255,.06) !important;
    box-shadow: 0 12px 32px rgba(0,0,0,.28) !important;
    backdrop-filter: blur(20px) saturate(1.06) !important;
    -webkit-backdrop-filter: blur(20px) saturate(1.06) !important;
}

.professional-home-toolbar .home-toolbar-shell {
    width: 100% !important;
    min-height: var(--nova-home-header-content-h) !important;
    grid-template-columns: auto minmax(18px,1fr) auto !important;
    gap: clamp(12px, 2vw, 24px) !important;
}

.professional-home-toolbar .home-toolbar-actions {
    gap: clamp(10px, 1.4vw, 16px) !important;
}

.professional-home-toolbar .icon-button.home-header-action {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.professional-home-toolbar .icon-button.home-menu-button {
    width: clamp(116px, 10.5vw, 148px) !important;
    min-width: clamp(116px, 10.5vw, 148px) !important;
    height: 48px !important;
    padding: 2px 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.professional-home-toolbar .home-menu-button .nova-menu-logo {
    width: 100% !important;
    height: auto !important;
    max-height: 45px !important;
    object-fit: contain !important;
    object-position: right center !important;
}

/* ANIME LANDING -----------------------------------------------------------
   The legacy anime reference CSS still hid the shared header after the page
   migrated back to CatalogLandingHeader. Re-enable the unified header. */
.catalog-landing-anime > .catalog-landing-toolbar.nova-native-catalog-header {
    display: flex !important;
    position: fixed !important;
    inset: 0 0 auto 0 !important;
    z-index: 930 !important;
    width: 100% !important;
    max-width: none !important;
    height: calc(var(--nova-landing-header-content-h) + var(--safe-top, 0px)) !important;
    min-height: calc(var(--nova-landing-header-content-h) + var(--safe-top, 0px)) !important;
    margin: 0 !important;
    padding: var(--safe-top, 0px)
        max(var(--nova-header-inline), var(--safe-right, 0px)) 0
        max(var(--nova-header-inline), var(--safe-left, 0px)) !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 14px !important;
    background: linear-gradient(180deg, rgba(0,0,0,.78) 0%, rgba(0,0,0,.24) 68%, transparent 100%) !important;
    border: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

html.sg-header-scrolled .catalog-landing-anime > .catalog-landing-toolbar.nova-native-catalog-header {
    background: rgba(2,3,7,.86) !important;
    border-bottom: 1px solid rgba(255,255,255,.06) !important;
    box-shadow: 0 12px 32px rgba(0,0,0,.30) !important;
    backdrop-filter: blur(20px) saturate(1.06) !important;
    -webkit-backdrop-filter: blur(20px) saturate(1.06) !important;
}

.catalog-landing-anime .nova-native-header-leading {
    min-width: 0 !important;
    flex: 1 1 auto !important;
    justify-content: flex-start !important;
}

.catalog-landing-anime .nova-native-title-copy h1 {
    font-size: clamp(1.25rem, 2.1vw, 1.58rem) !important;
    font-weight: 950 !important;
    letter-spacing: -.025em !important;
}

.catalog-landing-anime .catalog-landing-toolbar-actions {
    flex: 0 0 auto !important;
    gap: 10px !important;
}

.catalog-landing-anime .catalog-landing-toolbar-button {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Hero remains full-bleed beneath the fixed anime header. */
.catalog-landing-anime .catalog-landing-main {
    padding-top: 0 !important;
}

.catalog-landing-anime .catalog-landing-empty,
.catalog-landing-anime > .catalog-landing-motion-loading,
.catalog-landing-anime > .catalog-landing-skeleton {
    padding-top: calc(var(--nova-landing-header-content-h) + var(--safe-top, 0px) + 18px) !important;
}

/* LIVE -------------------------------------------------------------------
   Empty/missing channel artwork is intentional: SafeImage supplies a branded
   fallback. Ensure the fallback reads as a clean channel tile, not an error. */
.nova-live-row-logo {
    background: linear-gradient(155deg, rgba(16,18,25,.90), rgba(5,6,10,.96)) !important;
    border-color: rgba(255,255,255,.075) !important;
    box-shadow: 0 8px 22px rgba(0,0,0,.26) !important;
}

@media (max-width: 700px) {
    :root {
        --nova-home-header-content-h: 58px;
        --nova-landing-header-content-h: 56px;
        --nova-header-inline: 15px;
    }

    .professional-home-toolbar .icon-button.home-header-action {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
    }

    .professional-home-toolbar .home-toolbar-actions {
        gap: 12px !important;
    }

    .professional-home-toolbar .icon-button.home-menu-button {
        width: 108px !important;
        min-width: 108px !important;
        height: 42px !important;
    }

    .catalog-landing-anime .catalog-landing-toolbar-button {
        width: 35px !important;
        height: 35px !important;
        min-width: 35px !important;
    }

    .catalog-landing-anime .nova-native-title-copy h1 {
        font-size: 1.22rem !important;
    }
}

@media (max-width: 380px) {
    .professional-home-toolbar .icon-button.home-menu-button {
        width: 96px !important;
        min-width: 96px !important;
    }
    .professional-home-toolbar .home-toolbar-actions { gap: 8px !important; }
}
