.c-site-header {
    top: 0;
    right: 0;
    left: 0;
    position: fixed;
    z-index: theme('zIndex.header');
    height: $header-height;
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    transition: background-color $transition-time, height $transition-time;

    .has-overlay & {
        //stylelint-disable;
        top: 0!important;
        //stylelint-enable;
    }

    @screen lg {
        height: $header-height--desktop;
    }
}

.c-site-header--dynamic {
    height: $header-height-dynamic;

    @screen lg {
        height: $header-height-dynamic--desktop;
    }
}

.c-site-header__logo-image--colored {
    position: absolute;
    height: 1px;
    width: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    opacity: 0;
}

.c-site-header__decoration {
    position: absolute;
    right: 0;
    left: 0;
    transition: opacity $transition-time;
    opacity: 0;
}

.c-site-header--filled {
    box-shadow: 0 0 1rem rgba(0, 0, 0, .1);
    background-color: theme('colors.white');
    height: $header-height;
    transition: background-color $transition-time, height $transition-time;

    .c-site-header__logo-image--white {
        position: absolute;
        height: 1px;
        width: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        opacity: 0;
    }

    .c-site-header__logo-image--colored {
        position: relative;
        width: auto;
        height: auto;
        clip: initial;
        white-space: unset;
        opacity: 1;
    }

    .c-site-header__decoration {
        transition: opacity $transition-time;
        opacity: 1;
    }

    @screen lg {
        height: $header-height--desktop;
    }

    // Site Header background color configuration
    &.c-site-header--primary {
        background-color: theme('colors.primary.500');
    }

    &.c-site-header--secondary {
        background-color: theme('colors.secondary.500');
    }

    &.c-site-header--gray {
        background-color: theme('colors.gray.500');
    }

    &.c-site-header--white {
        background-color: #fff;
    }
}

.c-site-header__container {
    max-width: 73rem;
    padding: 0 1rem;
    margin: 0 auto;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.c-site-header__left {
    padding-top: .75rem;
    padding-bottom: .75rem;
    height: 100%;
}

.c-site-header__left--logotop {
    padding-top: 0;
}

.c-site-header__right {
    padding-top: .75rem;
    padding-bottom: .75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: $header-height;

    @screen lg {
        height: $header-height--desktop;
    }
}

.c-site-header__logo {
    position: relative;
    display: flex;
    flex-shrink: 1;
    align-items: center;
    height: 100%;
    max-width: 12rem; // 192px
    z-index: 1;

    @screen lg {
        max-width: 16rem; // 256px
    }
}

.c-site-header__logo-image {
    max-height: 100%;
    max-width: 100%;
    height: auto;
}

.c-custom-icon {
    width: 1.25rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    svg {
        width: 100%;
        height: 100%;
        fill: currentColor;
    }
}

// Site Header Trigger Buttons (e.g. Search Overlay Button, Menu Button)
.c-site-header-trigger__icon-open {
    display: block;
}

.c-site-header-trigger__icon-close {
    display: none;
}

.c-site-header-trigger[aria-expanded="false"] [data-expanded="true"] {
    display: none;
}

.c-site-header-trigger[aria-expanded="true"] [data-expanded="false"] {
    display: none;
}

.c-site-header-trigger[aria-expanded="true"] [data-expanded="true"] {
    display: inline-block;
}

.c-live-toggle__icon  {
    width: 1.5rem;
    height: 1.5rem;
}

.c-site-header-trigger {
    color: #fff;
    font-size: 1.25rem;
    font-weight: bold;
    height: 100%;
    margin-left: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color $transition-time;

    .c-icon {
        top: 0;
    }

    .c-main-navigation--uppercase & {
        text-transform: uppercase;
    }

    &:hover,
    &:focus {
        text-decoration: none;
    }

    // Main Menu Link color configuration (Burger Menu / Live Menu  & Search)
    // Primary
    &.c-main-menu__link--primary {
        &:hover,
        &:focus {
            color: theme('colors.primary.200');
        }

        .c-site-header--filled & {
            color: theme('colors.primary.500');

            &:hover,
            &:focus {
                color: theme('colors.primary.600');
            }
        }
    }

    // Secondary
    &.c-main-menu__link--secondary {
        &:hover,
        &:focus {
            color: theme('colors.secondary.200');
        }

        .c-site-header--filled & {
            color: theme('colors.secondary.500');

            &:hover,
            &:focus {
                color: theme('colors.secondary.600');
            }
        }
    }

    // White
    &.c-main-menu__link--white {
        &:hover,
        &:focus {
            color: theme('colors.primary.200');
        }
    }

    // Gray
    &.c-main-menu__link--gray {
        &:hover,
        &:focus {
            color: theme('colors.gray.200');
        }

        .c-site-header--filled & {
            color: theme('colors.gray.800');

            &:hover,
            &:focus {
                color: theme('colors.gray.600');
            }
        }
    }

    // Dark
    &.c-main-menu__link--dark {
        &:hover,
        &:focus {
            color: theme('colors.dark.200');
        }

        .c-site-header--filled & {
            color: theme('colors.dark.500');

            &:hover,
            &:focus {
                color: theme('colors.dark.600');
            }
        }
    }

    &[aria-expanded=true],
    &.is-target,
    &:target {
        text-decoration: none;

        .c-site-header-trigger__icon-close {
            display: block;
        }

        .c-site-header-trigger__icon-open {
            display: none;
        }
    }

    @screen lg {
        font-size: 1.125rem;

        .c-main-navigation--dropdown & {
            font-size: .875rem;
        }
    }

    @screen xl {
        .c-main-navigation--dropdown & {
            font-size: 1em;
        }
    }
}

.c-site-header-trigger--menu {
    order: 5;

    .c-main-navigation--dropdown & {
        @screen lg {
            display: none;
        }
    }
}

.c-site-header-trigger__text {
    display: none;

    @screen xs {
        display: inline;
        margin-left: .5rem;
    }
}
