/* =========================================================
   BAVARIAN KINGS
   Header
   ========================================================= */


/* ---------------------------------------------------------
   Oberste Header-Leiste
   --------------------------------------------------------- */

.site-header {
    position: fixed;
    z-index: 1000;

    top: 0;
    right: 0;
    left: 0;

    height: var(--header-height);

    overflow: visible;

    color: var(--color-text-light);

    background-color: var(--color-royal-blue-dark);
    background-image:
        url("/assets/images/default/backgrounds/background-dark-blue-01.png");
    background-repeat: repeat;
    background-position: center;
    background-size: auto 100%;

    box-shadow:
        0 3px 8px rgb(0 0 0 / 28%);
}


/* ---------------------------------------------------------
   Doppelte Trennlinie Header / Hero
   --------------------------------------------------------- */

.site-header::after {
    content: "";

    position: absolute;
    z-index: 1;

    right: 0;
    bottom: -5px;
    left: 0;

    height: 10px;

    background-image:
        url("/assets/images/default/frames/frame-line-double-01-h.png");
    background-repeat: repeat-x;
    background-position: center;
    background-size: auto 10px;

    pointer-events: none;
}


/* ---------------------------------------------------------
   Innerer Header-Bereich
   --------------------------------------------------------- */

.site-header__inner {
    position: relative;
    z-index: 2;

    display: flex;
    align-items: center;

    width: 100%;
    max-width: var(--content-max-width);
    height: 100%;

    margin: 0 auto;
    padding: 0 150px;

    gap: 28px;
}


/* ---------------------------------------------------------
   Markenbereich links
   --------------------------------------------------------- */

.site-header__brand {
    display: flex;
    align-items: center;

    min-width: 0;

    gap: 7px;
}

.site-header__crown {
    display: block;

    flex: 0 0 auto;

    width: auto;
    height: 52px;

    margin-left: -12px;

    object-fit: contain;

    transform: translateY(-4px);
}

.site-header__brand-text {
    min-width: 0;
}

.site-header__title {
    color: var(--color-gold);

    font-family: Georgia, "Times New Roman", serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.05;

    letter-spacing: 0.22em;

    white-space: nowrap;
}

.site-header__subtitle {
    margin-top: 3px;

    color: var(--color-text-light);

    font-size: 9px;
    font-weight: 700;
    line-height: 1;

    letter-spacing: 0.14em;

    white-space: nowrap;

    opacity: 0.85;
}


/* ---------------------------------------------------------
   Motto
   --------------------------------------------------------- */

.site-header__motto {
    margin-left: auto;

    color: var(--color-gold);

    font-family: Georgia, "Times New Roman", serif;
    font-size: 16px;
    font-style: italic;

    white-space: nowrap;

    transform: rotate(-3deg);
}


/* ---------------------------------------------------------
   Header-Aktionen rechts
   --------------------------------------------------------- */

.site-header__actions {
    display: flex;
    align-items: center;

    flex: 0 0 auto;

    gap: 12px;
}

.site-header__menu-button {
    display: none;
}

.site-header__icon-button {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 34px;
    height: 38px;

    margin: 0;
    padding: 0;

    color: inherit;
    background: transparent;

    border: 0;

    cursor: pointer;
}

.site-header__icon-button img {
    display: block;

    width: auto;
    height: 30px;

    object-fit: contain;

    transition:
        transform 160ms ease,
        filter 160ms ease;
}

.site-header__icon-button:hover img {
    transform: scale(1.08);

    filter: brightness(1.12);
}

.site-header__account {
    position: relative;
}

.site-header__account-button img {
    width: auto;
    height: 34px;
    max-width: 42px;
}

.site-header__account-menu {
    position: absolute;
    z-index: 30;
    top: calc(100% + 10px);
    right: 0;

    min-width: 210px;
    padding: 12px;

    color: #f5e7bd;
    background: rgba(5, 18, 38, 0.98);
    border: 1px solid rgba(197, 151, 49, 0.9);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.site-header__account-name {
    color: #e5bd56;
    font-weight: 700;
}

.site-header__account-role {
    margin-top: 2px;
    color: #cbbd9a;
    font-size: 11px;
    text-transform: uppercase;
}

.site-header__account-menu form {
    margin-top: 10px;
}

.site-header__account-menu-item {
    display: block;
    width: 100%;
    padding: 8px 10px;

    color: #f5e7bd;
    background: rgba(32, 71, 112, 0.75);
    border: 1px solid rgba(197, 151, 49, 0.55);

    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.site-header__account-menu-item:hover,
.site-header__account-menu-item:focus-visible {
    color: #fff4cb;
    background: rgba(48, 94, 143, 0.95);
}

.site-header__account-menu-item.is-disabled {
    color: #9d9789;
    background: rgba(32, 45, 60, 0.6);
    cursor: default;
    opacity: 0.72;
}


/* ---------------------------------------------------------
   Anmelden-Button
   --------------------------------------------------------- */

.site-header__login-button {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 104px;
    height: 38px;

    margin: 0;
    padding: 0 14px;

    color: var(--color-royal-blue-dark);

    background-color: transparent;
    background-image:
        url("/assets/images/default/buttons/button-gold-01-3x.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 100%;

    border: 0;

    font-size: 11px;
    font-weight: 700;

    letter-spacing: 0.06em;

    cursor: pointer;

    transition:
        transform 160ms ease,
        filter 160ms ease;
}

.site-header__login-button span {
    position: relative;
    z-index: 1;

    transform: translateY(-1px);
}

.site-header__login-button:hover {
    transform: scale(1.025);

    filter: brightness(1.08);
}


/* ---------------------------------------------------------
   Architektur-Säulen
   --------------------------------------------------------- */

.site-header__support {
    position: absolute;
    z-index: 3;

    top: -3px;

    width: 152px;
    height: auto;

    pointer-events: none;
}

.site-header__support--left {
    left: -20px;
}

.site-header__support--right {
    right: -20px;
}


/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1100px) {
    .site-header__motto {
        display: none;
    }

    .site-header__inner {
        padding-right: 145px;
        padding-left: 145px;

        gap: 18px;
    }

    .site-header__actions {
        margin-left: auto;
    }
}

@media (max-width: 760px) {
    .site-header {
        z-index: 2100;
    }

    .site-header__support {
        display: none;
    }

    .site-header__subtitle {
        display: none;
    }

    .site-header__icon-button {
        display: none;
    }

    .site-header__inner {
        padding-right: 12px;
        padding-left: 12px;

        gap: 8px;
    }

    .site-header__title {
        overflow: hidden;

        max-width: 148px;

        font-size: 13px;

        letter-spacing: 0.13em;

        text-overflow: ellipsis;
    }

    .site-header__crown {
        height: 40px;

        margin-left: -6px;
    }

    .site-header__login-button {
        width: 76px;
        height: 34px;

        padding: 0 10px;

        font-size: 9px;
    }

    .site-header__menu-button {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;

        order: 2;

        width: 42px;
        height: 42px;

        padding: 8px;

        color: var(--color-gold);
        background: rgb(0 0 0 / 16%);

        border: 1px solid rgb(176 138 69 / 62%);
        border-radius: 4px;

        cursor: pointer;

        gap: 5px;
    }

    .site-header__menu-button span {
        display: block;

        width: 23px;
        height: 2px;

        background: currentColor;

        transition:
            transform 180ms ease,
            opacity 180ms ease;
    }

    .site-header__menu-button[aria-expanded="true"] span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .site-header__menu-button[aria-expanded="true"] span:nth-child(2) {
        opacity: 0;
    }

    .site-header__menu-button[aria-expanded="true"] span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
}

@media (max-width: 390px) {
    .site-header__crown {
        height: 35px;
    }

    .site-header__title {
        max-width: 108px;

        font-size: 11px;
    }

    .site-header__login-button {
        width: 68px;

        padding-right: 6px;
        padding-left: 6px;
    }
}
