// See also ./lib/components/notice/notice.less
// TODO deprecate .s-banner (by turning it into a modifier on .s-notice)
// This would reduce the amount of CSS we ship to the client and simplify our codebase
.s-banner {
    --_no-ty-offset: 0;
    --_no-ty: var(--theme-topbar-height, calc(var(--su48) + var(--su8)));
    .construct-notice-component(s-banner);
    
    &--icon {
        //Remove the icon backgound color
        --_no-icon-bg: transparent;
        margin-right: var(--su8);
        align-self: flex-start;
    }

    &[aria-hidden="true"] { // If you want to hide and reveal the banner
        --_no-ty-offset: -1;
        opacity: 0;
        visibility: hidden;
    }

    &[aria-hidden="false"] {
        --_no-ty-offset: 1;
        opacity: 1;
        visibility: visible;

        &.is-pinned { //  If you want to put the banner above the topbar
            --_no-ty-offset: 0;
            z-index: calc(var(--zi-navigation-fixed) + 1);
        }
    }

    &__body-pt {
        padding-top: 93px;
    }

    display: flex;
    align-items: center;
    padding: var(--su16);
    inset: 0 0 auto 0;
    position: fixed;
    transform: translate3d(0, calc(var(--_no-ty) * var(--_no-ty-offset)), 0);
    width: 100%;
    z-index: calc(var(--zi-navigation-fixed) - 1); // Tuck below topbar
}