/* WbamsCms/Draisap header setting bridge.
 * Loaded after generated CSS so saved header settings remain authoritative. */

html[data-mtd-navsticky="1"] .section-header.draisap-header-sticky-enabled #header:not(.sticky) {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    transform: translateZ(0) !important;
    box-shadow: none !important;
    transition: background-color 320ms ease !important;
    animation: none;
}

/* The configured shadow belongs only to the settled sticky state. It stays
 * absent while the original header is at the top and during the slide-down. */
.section-header.draisap-header-shadow .nav-div {
    box-shadow: none !important;
}

.section-header.draisap-header-shadow #header {
    box-shadow: none !important;
    transition: box-shadow 460ms ease, background-color 320ms ease !important;
}

html[data-mtd-navsticky="1"] .section-header.draisap-header-sticky-enabled #header.sticky {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    left: 0 !important;
    width: 100% !important;
    box-shadow: none !important;
    will-change: translate, opacity, filter;
    animation: none;
}

html[data-mtd-navsticky="1"] .section-header.draisap-header-shadow.draisap-header-sticky-enabled #header.sticky.draisap-sticky-settled {
    box-shadow: 0 10px 34px rgba(20, 30, 48, .14) !important;
    will-change: auto;
}

/* Once the sticky header becomes the normal top header, keep its shadow long
 * enough for the layout to settle, then ease the shadow away separately. */
html[data-mtd-navsticky="1"] .section-header.draisap-header-shadow.draisap-header-sticky-enabled #header.draisap-shadow-exit:not(.sticky) {
    box-shadow: 0 10px 34px rgba(20, 30, 48, .14) !important;
    transition: background-color 320ms ease !important;
}

html[data-mtd-navsticky="1"] .section-header.draisap-header-shadow.draisap-header-sticky-enabled #header.draisap-shadow-fading:not(.sticky) {
    box-shadow: none !important;
    transition: box-shadow 620ms ease-out, background-color 320ms ease !important;
}

html[data-mtd-navsticky="0"] .section-header #header,
.section-header.draisap-header-sticky-disabled #header {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    transform: translateZ(0) !important;
    animation: none;
}

@keyframes wbams_cmsDraisapStickyReturn {
    0% {
        translate: 0 -112%;
        opacity: .72;
        filter: blur(2px);
    }

    68% {
        translate: 0 3px;
        opacity: 1;
        filter: blur(0);
    }

    84% {
        translate: 0 -1px;
        opacity: 1;
        filter: blur(0);
    }

    100% {
        translate: 0 0;
        opacity: 1;
        filter: blur(0);
    }
}

/* Only one configured header logo may be visible at a time. */
.section-header.draisap-header-color-0 .navbar-brand.draisap-brand.draisap-brand-has-dark-logo .draisap-brand-logo-light {
    display: block !important;
}

.section-header.draisap-header-color-0 .navbar-brand.draisap-brand.draisap-brand-has-dark-logo .draisap-brand-logo-dark {
    display: none !important;
}

.section-header.draisap-header-color-1 .navbar-brand.draisap-brand.draisap-brand-has-dark-logo .draisap-brand-logo-light,
.section-header.draisap-header-color-2 .navbar-brand.draisap-brand.draisap-brand-has-dark-logo .draisap-brand-logo-light,
body.dark-mode .section-header.draisap-header-color-0 .navbar-brand.draisap-brand.draisap-brand-has-dark-logo .draisap-brand-logo-light {
    display: none !important;
}

.section-header.draisap-header-color-1 .navbar-brand.draisap-brand.draisap-brand-has-dark-logo .draisap-brand-logo-dark,
.section-header.draisap-header-color-2 .navbar-brand.draisap-brand.draisap-brand-has-dark-logo .draisap-brand-logo-dark,
body.dark-mode .section-header.draisap-header-color-0 .navbar-brand.draisap-brand.draisap-brand-has-dark-logo .draisap-brand-logo-dark {
    display: block !important;
}

@media (min-width: 1200px) {
    html[data-mtd-right-nav-icons-only="1"] .section-header .navbar-end .nav-item-right {
        position: relative;
        width: 42px;
        min-width: 42px;
        height: 42px;
        margin-right: 2px;
        margin-left: 2px;
    }

    html[data-mtd-right-nav-icons-only="1"] .section-header .navbar-end .nav-item-right > .nav-link-right,
    html[data-mtd-right-nav-icons-only="1"] .section-header .navbar-end .nav-item-right > .draisap-theme-toggle,
    html[data-mtd-right-nav-icons-only="1"] .section-header .navbar-end .nav-item-right > .serepok-theme-toggle {
        width: 42px;
        min-width: 42px !important;
        height: 42px;
        min-height: 42px !important;
        padding: 0 !important;
    }

    html[data-mtd-right-nav-icons-only="1"] .section-header .navbar-end .nav-item-right > .nav-link-right > span:not(.badge):not(.draisap-theme-toggle-icon):not(.serepok-theme-toggle-icon):not(.d-inline-block),
    html[data-mtd-right-nav-icons-only="1"] .section-header .navbar-end .nav-item-right > .draisap-theme-toggle > span:not(.badge):not(.draisap-theme-toggle-icon):not(.serepok-theme-toggle-icon):not(.d-inline-block),
    html[data-mtd-right-nav-icons-only="1"] .section-header .navbar-end .nav-item-right > .serepok-theme-toggle > span:not(.badge):not(.draisap-theme-toggle-icon):not(.serepok-theme-toggle-icon):not(.d-inline-block) {
        display: none !important;
    }

    html[data-mtd-right-nav-icons-only="1"] .section-header .navbar-end .nav-item-right > .dropdown-toggle::after {
        display: none !important;
        content: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    html[data-mtd-navsticky="1"] .section-header.draisap-header-sticky-enabled #header.sticky {
        animation-duration: 1ms !important;
    }

    .section-header.draisap-header-shadow #header {
        transition-duration: 1ms !important;
    }

    html[data-mtd-navsticky="1"] .section-header.draisap-header-shadow.draisap-header-sticky-enabled #header.draisap-shadow-fading:not(.sticky) {
        transition-duration: 1ms !important;
    }
}
