/**
 * Site Banner (Secret Event campaign)
 * Dismissible notice bar fixed above the header. The inline script in
 * templates/includes/site-banner.html.twig keeps --site-banner-height in sync
 * with the banner's rendered height and resets it to 0 once dismissed.
 *
 * Ported from sw.tza.zugspitzarena. Loaded directly via <link> from the include,
 * not through the Encore build. The header of this project is position: static
 * (see Navbar.vue), so the body padding alone keeps it below the banner. If a
 * fixed/sticky header is added later, give it `top: var(--site-banner-height)`.
 */
:root {
    --site-banner-height: 0px;
}

body {
    padding-top: var(--site-banner-height);
}

.site-banner {
    background-color: #0B3087;
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    /* above the navbar sub menus (z-10), below the job lightbox (z-index: 1000) */
    z-index: 900;
    overflow: hidden;
}

.site-banner__inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    max-width: 1536px;
    margin: 0 auto;
    padding: calc(12rem / 16) calc(40rem / 16) calc(12rem / 16) calc(15rem / 16);
    position: relative;
    text-align: center;
}

.site-banner__mobile-placeholder {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items: center;
}

/* the image is taller than the bar and clipped by .site-banner (overflow: hidden):
   the card at the top stays visible, the hand runs out of the bottom edge */
.site-banner__image {
    height: 6.5rem;
    margin: -0.5rem 0 -3rem;
    object-fit: cover;
}

.site-banner__marked {
    background-color: #F4FB08;
    color: #0B3087;
    padding: 0 0.5rem;
    margin: 0;
    font-size: medium;
    font-weight: 600;
    width: fit-content;
    height: fit-content;
}

.site-banner__text {
    color: white;
    margin: 0;
    font-size: large;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
}

/* responsive text variants (Bootstrap d-none/d-md-* in the source project) */
.site-banner__text--desktop,
.site-banner__link-text {
    display: none;
}

.site-banner__text--mobile {
    display: block;
}

.site-banner__link-icon {
    display: inline-block;
}

@media (min-width: 768px) {
    .site-banner__text--desktop {
        display: block;
    }

    .site-banner__text--mobile,
    .site-banner__link-icon:not(.site-banner__link-icon--always) {
        display: none;
    }

    .site-banner__link-text {
        display: inline;
    }
}

.site-banner__link {
    text-transform: uppercase;
    color: white;
    font-size: large;
    text-decoration: underline;
    word-break: keep-all;
}

/* stretched link: the whole bar is clickable, the close button sits above via z-index */
.site-banner__link::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
}

.site-banner__link:hover {
    color: #F4FB08;
    text-decoration: underline;
}

.site-banner__icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: middle;
    fill: currentColor;
}

.site-banner__icon--arrow {
    width: 1.4em;
}

.site-banner__close {
    position: absolute;
    top: 50%;
    right: calc(10rem / 16);
    transform: translateY(-50%);
    z-index: 2;
    background: transparent;
    border: none;
    color: inherit;
    font-size: calc(22rem / 16);
    line-height: 1;
    cursor: pointer;
    padding: calc(5rem / 16) calc(10rem / 16);
}

.site-banner__close span {
    font-size: x-small;
}

.site-banner__close:hover {
    color: #FC4201;
}

@media (max-width: 768px) {
    .site-banner__image {
        height: 5.5rem;
        margin: -0.5rem 0 -2.5rem;
    }

    .site-banner__inner {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        gap: 1rem;
    }

    .site-banner__marked {
        font-size: small !important;
    }

    .site-banner__text {
        font-size: medium !important;
        text-align: left;
    }

    .site-banner__link {
        font-size: medium !important;
        padding-right: 2rem;
    }

    .site-banner__link .site-banner__link-icon {
        font-size: x-small;
    }
}

@media (max-width: 470px) {
    .site-banner__mobile-placeholder {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        align-items: start;
    }

    .site-banner__image {
        margin: -0.5rem 0 -3.5rem;
        height: 8rem;
    }

    .site-banner__link {
        font-size: medium !important;
        padding-right: 2.5rem;
    }
}
