/*
 * NOVA normally swaps these areas to display:none while scrolling. Keeping
 * them in layout at an animated height lets the category navigation move to
 * its sticky position without the abrupt jump. The JS class and fixed-navbar
 * selector keep this isolated from other header modes and from checkout.
 */
@media (min-width: 992px) {
    html.sr-smooth-sticky-header #jtl-nav-wrapper.fixed-navbar .hide-navbar {
        display: block !important;
        height: var(--sr-header-brand-height, auto);
        min-height: 0 !important;
        overflow: hidden;
        visibility: visible;
        opacity: 1;
        transition:
            height 220ms cubic-bezier(0.4, 0, 0.2, 1),
            opacity 140ms ease-out,
            visibility 0s linear 0s;
    }

    html.sr-smooth-sticky-header #jtl-nav-wrapper.fixed-navbar .hide-navbar.d-none {
        height: 0 !important;
        pointer-events: none;
        visibility: hidden;
        opacity: 0;
        transition:
            height 220ms cubic-bezier(0.4, 0, 0.2, 1),
            opacity 120ms ease-out,
            visibility 0s linear 220ms;
    }

    html.sr-smooth-sticky-header #jtl-nav-wrapper.fixed-navbar #header-top-bar {
        display: flex !important;
        height: var(--sr-header-topbar-height, auto);
        min-height: 0 !important;
        overflow: hidden;
        visibility: visible;
        opacity: 1;
        transition:
            height 220ms cubic-bezier(0.4, 0, 0.2, 1),
            opacity 140ms ease-out,
            visibility 0s linear 0s;
    }

    html.sr-smooth-sticky-header #jtl-nav-wrapper.fixed-navbar #header-top-bar:not(.d-lg-flex) {
        height: 0 !important;
        pointer-events: none;
        visibility: hidden;
        opacity: 0;
        transition:
            height 220ms cubic-bezier(0.4, 0, 0.2, 1),
            opacity 120ms ease-out,
            visibility 0s linear 220ms;
    }
}

.sr-global-notice {
    --sr-notice-yellow: #fcbf00;
    --sr-notice-yellow-soft: #fff8df;
    --sr-notice-ink: #171b22;
    --sr-notice-muted: #596273;
    position: relative;
    z-index: 1030;
    width: 100%;
    color: var(--sr-notice-ink);
    background: var(--sr-notice-yellow-soft);
    font-family: inherit;
}

.sr-global-notice,
.sr-global-notice * {
    box-sizing: border-box;
    border-radius: 0;
}

.sr-global-notice--sticky_bar {
    position: sticky;
    top: 0;
}

.sr-global-notice--compact_on_scroll {
    position: sticky;
    top: var(--sr-notice-sticky-top, 0px);
    z-index: 1010;
}

.sr-global-notice--popin_on_scroll {
    z-index: 1010;
}

.sr-global-notice__bar {
    width: 100%;
    padding: 0;
    background: var(--sr-notice-yellow-soft);
    border-bottom: 2px solid var(--sr-notice-yellow);
    box-shadow: 0 4px 14px rgba(30, 31, 35, 0.09);
}

.sr-global-notice__inner {
    display: flex;
    width: min(calc(100% - 40px), 1040px);
    min-height: 42px;
    margin: 0 auto;
    padding: 6px 16px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--sr-notice-ink);
    background: transparent;
    border: 0;
    text-align: center;
}

.sr-global-notice__badge {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    place-items: center;
    color: #1f2329;
    background: var(--sr-notice-yellow);
    border: 1px solid #d7a500;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    text-align: center;
}

.sr-global-notice__copy {
    display: flex;
    min-width: 0;
    max-width: 100%;
    flex: 0 1 auto;
    align-items: baseline;
    gap: 9px;
    line-height: 1.35;
    text-align: center;
}

.sr-global-notice__copy strong {
    display: block;
    margin: 0;
    color: #111827;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.25;
}

.sr-global-notice__description {
    display: block;
    margin-top: 0;
    color: var(--sr-notice-muted);
    font-size: 12px;
    line-height: 1.35;
}

.sr-global-notice--compact_on_scroll .sr-global-notice__bar,
.sr-global-notice--compact_on_scroll .sr-global-notice__inner,
.sr-global-notice--compact_on_scroll .sr-global-notice__badge,
.sr-global-notice--compact_on_scroll .sr-global-notice__copy {
    transition:
        min-height 240ms cubic-bezier(0.2, 0.75, 0.3, 1),
        width 240ms cubic-bezier(0.2, 0.75, 0.3, 1),
        height 240ms cubic-bezier(0.2, 0.75, 0.3, 1),
        flex-basis 240ms cubic-bezier(0.2, 0.75, 0.3, 1),
        padding 240ms cubic-bezier(0.2, 0.75, 0.3, 1),
        gap 220ms ease,
        font-size 220ms ease,
        background-color 220ms ease;
}

.sr-global-notice--compact_on_scroll .sr-global-notice__copy strong,
.sr-global-notice--compact_on_scroll .sr-global-notice__description {
    transition: font-size 220ms ease;
}

.sr-global-notice--compact_on_scroll .sr-global-notice__bar {
    background: rgba(255, 249, 223, 0.97);
    border-top: 2px solid var(--sr-notice-yellow);
    border-bottom: 2px solid var(--sr-notice-yellow);
    transition: background-color 220ms ease, border-width 220ms ease;
}

.sr-global-notice--compact_on_scroll .sr-global-notice__inner {
    min-height: 78px;
    padding: 6px 16px;
    gap: 16px;
}

.sr-global-notice--compact_on_scroll .sr-global-notice__badge {
    width: 50px;
    height: 50px;
    flex-basis: 50px;
    font-size: 16px;
}

.sr-global-notice--compact_on_scroll .sr-global-notice__copy {
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    text-align: left;
}

.sr-global-notice--compact_on_scroll.is-compact .sr-global-notice__bar {
    background: var(--sr-notice-yellow-soft);
    border-width: 0 0 2px;
}

.sr-global-notice--compact_on_scroll.is-compact .sr-global-notice__inner {
    min-height: 38px;
    padding: 4px 16px;
    gap: 9px;
}

.sr-global-notice--compact_on_scroll.is-compact .sr-global-notice__badge {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
    font-size: 10px;
}

.sr-global-notice--compact_on_scroll.is-compact .sr-global-notice__copy {
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
}

.sr-global-notice--compact_on_scroll.is-compact .sr-global-notice__copy strong {
    font-size: 14px;
}

.sr-global-notice--compact_on_scroll.is-compact .sr-global-notice__description {
    margin-top: 0;
    font-size: 12px;
}

.sr-global-notice__popin {
    position: fixed;
    top: var(--sr-notice-popin-top, 12px);
    right: max(16px, calc((100vw - 1250px) / 2));
    z-index: 1010;
    width: min(410px, calc(100vw - 32px));
    padding: 0;
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
    transition:
        visibility 0s linear 160ms,
        opacity 160ms ease-out;
}

.sr-global-notice.is-popin-visible .sr-global-notice__popin {
    visibility: visible;
    opacity: 1;
    transition-delay: 0s;
}

.sr-global-notice__popin-inner {
    display: flex;
    width: 100%;
    min-height: 76px;
    padding: 10px 12px;
    align-items: center;
    gap: 10px;
    color: var(--sr-notice-ink);
    background: #fffdf7;
    border: 2px solid var(--sr-notice-yellow);
    box-shadow: 0 12px 30px rgba(23, 27, 34, 0.16);
}

.sr-global-notice__popin .sr-global-notice__badge {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
    font-size: 15px;
}

.sr-global-notice__popin .sr-global-notice__copy strong {
    font-size: 14px;
}

.sr-global-notice__popin .sr-global-notice__copy {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    text-align: left;
}

.sr-global-notice__popin .sr-global-notice__description {
    font-size: 12px;
}

/* Keep NOVA's own sticky header active and stack variant 01 above it. */
html.sr-global-notice-before-header #jtl-nav-wrapper.sticky-top {
    top: var(--sr-notice-header-offset, 0px) !important;
}

@media (max-width: 767.98px) {
    .sr-global-notice__inner {
        width: 100%;
        min-height: 38px;
        padding: 4px 10px;
        gap: 8px;
    }

    .sr-global-notice__badge {
        width: 27px;
        height: 27px;
        flex-basis: 27px;
        font-size: 9px;
    }

    .sr-global-notice__copy {
        display: block;
        overflow: hidden;
        text-align: left;
    }

    .sr-global-notice__copy strong {
        display: block;
        overflow: hidden;
        font-size: 11px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .sr-global-notice__description {
        display: none;
    }

    .sr-global-notice--compact_on_scroll .sr-global-notice__inner {
        min-height: 64px;
        padding: 5px 10px;
        gap: 10px;
    }

    .sr-global-notice--compact_on_scroll .sr-global-notice__badge {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
        font-size: 11px;
    }

    .sr-global-notice--compact_on_scroll .sr-global-notice__description {
        display: block;
        overflow: hidden;
        font-size: 9px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .sr-global-notice--compact_on_scroll.is-compact .sr-global-notice__inner {
        min-height: 38px;
        padding: 4px 10px;
    }

    .sr-global-notice--compact_on_scroll.is-compact .sr-global-notice__description {
        display: none;
    }

    .sr-global-notice__popin {
        right: 8px;
        width: calc(100vw - 16px);
    }

    .sr-global-notice__popin .sr-global-notice__badge {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
        font-size: 12px;
    }

    .sr-global-notice__popin .sr-global-notice__description {
        display: block;
        margin-top: 2px;
        font-size: 11px;
        white-space: normal;
    }

    .sr-global-notice__popin .sr-global-notice__copy strong {
        font-size: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html.sr-smooth-sticky-header #jtl-nav-wrapper.fixed-navbar .hide-navbar,
    html.sr-smooth-sticky-header #jtl-nav-wrapper.fixed-navbar #header-top-bar,
    .sr-global-notice,
    .sr-global-notice * {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

@media print {
    .sr-global-notice {
        display: none !important;
    }
}
