﻿/* =========================================================
   SYSTEMSTÖD HEADER
   ========================================================= */

.site-header {
    position: relative;
    z-index: 1000;
    width: 100%;
    max-width: 100%;
    background: #fff;
    border-bottom: 1px solid #ddd;
    font-family: Arial, Helvetica, sans-serif;
}

.site-language-switcher { position: relative; margin-left: 12px; flex: 0 0 auto; font-size: .875rem; }
.site-language-switcher summary { cursor: pointer; padding: .6rem; font-weight: 600; }
.site-language-switcher ul { position: absolute; top: 100%; right: 0; margin: 0; padding: .5rem; list-style: none; min-width: 175px; max-width: calc(100vw - 2rem); background: #fff; border: 1px solid #ddd; box-shadow: 0 4px 12px #0002; z-index: 1010; }
.site-language-switcher a { display: block; padding: .6rem; color: #333; text-decoration: none; }
.site-language-switcher a:hover, .site-language-switcher a:focus-visible { background: #f3f4f5; }
.site-language-switcher a[aria-current="true"] { font-weight: 700; }

.site-header-inner {
    max-width: 1420px;
    min-width: 0;
    height: 82px;
    margin: 0 auto;
    padding: 0 25px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}


/* =========================================================
   LOGO
   ========================================================= */

.site-logo {
    margin-right: auto;
    text-decoration: none;
    flex: 0 0 auto;
}

.site-logo-image {
    display: block;
    width: 185px;
    height: 40px;
    object-fit: contain;
}

.site-menu-toggle,
.submenu-toggle {
    display: none;
}


/* =========================================================
   TOP NAVIGATION
   ========================================================= */

.site-navigation {
    height: 100%;
    min-width: 0;
}

@media (min-width: 1201px) {
    .site-navigation {
        display: flex;
        align-items: center;
    }
}

.site-navigation-list {
    height: 100%;
    display: flex;
    align-items: stretch;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-navigation-item {
    position: relative;
    height: 100%;
    display: flex;
    align-items: stretch;
}

.site-navigation-link {
    height: 100%;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 15px;
    letter-spacing: .025em;
    line-height: 1;
    font-weight: 600;
    white-space: nowrap;
    transition: background-color .12s ease, color .12s ease;
}

.site-navigation-parent {
    cursor: pointer;
}

.site-header a:hover,
.site-header a:focus {
    text-decoration: none;
}

.site-navigation-item:hover > .site-navigation-link {
    background: #f1f1f1;
    color: #111;
}


/* Yellow line under active/hovered menu */

.site-navigation-item.has-submenu:hover > .site-navigation-link {
    box-shadow: inset 0 -2px 0 #e8b900;
}


/* Arrow down */

.nav-arrow-down {
    width: 6px;
    height: 6px;
    margin-left: 8px;
    margin-top: -3px;
    border-right: 1.5px solid #555;
    border-bottom: 1.5px solid #555;
    transform: rotate(45deg);
}


/* =========================================================
   DROPDOWN
   ========================================================= */

.site-header .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    display: none;
    float: none;
    width: min(258px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    margin: 0;
    padding: 0;
    list-style: none;
    background: #fff;
    border-top: 2px solid #e8b900;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .16);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .10s ease, visibility .10s ease;
}


/* First dropdown */

.site-navigation-item.has-submenu:hover > .dropdown-menu,
.site-navigation-item.has-submenu:focus-within > .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


/* =========================================================
   DROPDOWN ITEMS
   ========================================================= */

.site-header .dropdown-item {
    position: relative;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #e9e9e9;
}

    .site-header .dropdown-item:last-child {
        border-bottom: 0;
    }

.site-header .dropdown-link {
    min-height: 46px;
    padding: 0 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    background: #fff;
    color: #555;
    text-decoration: none;
    font-size: 16px;
    line-height: 1.2;
    font-weight: 500;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    transition: background-color .1s ease, color .1s ease;
}

.site-header .dropdown-link > span:first-child {
    min-width: 0;
}

.site-header .dropdown-parent {
    cursor: pointer;
}

.site-header .dropdown-item:hover > .dropdown-link {
    background: #f2f2f2;
    color: #222;
}


/* =========================================================
   ARROW RIGHT
   ========================================================= */

.nav-arrow-right {
    width: 7px;
    height: 7px;
    margin-left: 18px;
    border-top: 1.5px solid #666;
    border-right: 1.5px solid #666;
    transform: rotate(45deg);
}


/* =========================================================
   FLYOUT - LEVEL 2 / 3
   ========================================================= */

.site-header .dropdown-submenu {
    top: -2px;
    left: 100%;
    width: min(310px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    border-top: 2px solid #e8b900;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .16);
}

@media (min-width: 1201px) and (max-width: 1450px) {
    .site-navigation-item:nth-last-child(-n + 3) > .dropdown-menu {
        right: 0;
        left: auto;
    }

    .site-navigation-item:nth-last-child(-n + 3) .dropdown-submenu {
        right: 100%;
        left: auto;
    }
}

.site-header .dropdown-item.has-submenu:hover > .dropdown-submenu,
.site-header .dropdown-item.has-submenu:focus-within > .dropdown-submenu {
    display: block;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1100px) {

    .site-header-inner {
        padding-left: 15px;
        padding-right: 15px;
    }

    .site-navigation-link {
        padding-left: 13px;
        padding-right: 13px;
        font-size: 13px;
    }
}


/* Translated navigation labels need more room than the Swedish labels. */
@media (max-width: 1200px) {

    /* Keep language selection inside the collapsible menu. An in-flow list
       cannot extend left of the viewport or cover the content below it. */
    .site-language-switcher {
        width: 100%;
        min-width: 0;
        margin: .5rem 0 0;
    }

    .site-language-switcher ul {
        position: static;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        margin: .25rem 0 .75rem;
        box-shadow: none;
    }

    .site-language-switcher a {
        overflow-wrap: anywhere;
    }

    .site-header-inner {
        height: auto;
        padding-top: 18px;
        padding-bottom: 18px;
        flex-direction: column;
        align-items: flex-start;
    }

    .site-logo {
        margin-bottom: 0;
    }

    .site-logo-image {
        width: 166px;
        height: auto;
    }

    .site-navigation {
        width: 100%;
        margin-top: 15px;
    }

    html.has-js .site-navigation {
        display: none;
    }

    html.has-js .site-navigation.is-open {
        display: block;
    }

    .site-menu-toggle {
        position: absolute;
        top: 18px;
        right: 15px;
        display: inline-flex;
        align-items: center;
        gap: .65rem;
        min-height: 42px;
        padding: .55rem .75rem;
        color: #333;
        background: #fff;
        border: 1px solid #bbb;
        border-radius: .25rem;
        font: inherit;
        font-weight: 700;
        text-transform: uppercase;
    }

    .site-menu-toggle-icon,
    .site-menu-toggle-icon::before,
    .site-menu-toggle-icon::after {
        display: block;
        width: 20px;
        height: 2px;
        background: currentColor;
        content: "";
    }

    .site-menu-toggle-icon {
        position: relative;
    }

    .site-menu-toggle-icon::before {
        position: absolute;
        top: -6px;
    }

    .site-menu-toggle-icon::after {
        position: absolute;
        top: 6px;
    }

    .site-navigation-list {
        width: 100%;
        height: auto;
        flex-direction: column;
    }

    .site-navigation-item {
        width: 100%;
        height: auto;
        display: block;
    }

    .site-navigation-link {
        width: 100%;
        height: auto;
        padding: 14px 48px 14px 5px;
        justify-content: flex-start;
        box-sizing: border-box;
    }

    .site-header .dropdown-menu,
    .site-header .dropdown-submenu {
        position: static;
        width: 100%;
        border-top: 0;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        display: none;
    }

    .site-navigation-item.has-submenu:hover > .dropdown-menu,
    .site-navigation-item.has-submenu:focus-within > .dropdown-menu,
    .site-header .dropdown-item.has-submenu:hover > .dropdown-submenu,
    .site-header .dropdown-item.has-submenu:focus-within > .dropdown-submenu {
        display: block;
    }

    .site-header .dropdown-link {
        min-height: 42px;
        padding: 10px 48px 10px 20px;
        width: 100%;
        overflow-wrap: normal;
        word-break: normal;
        hyphens: auto;
    }

    .site-header .dropdown-submenu .dropdown-link {
        padding-left: 38px;
    }

    .submenu-toggle {
        position: absolute;
        top: 3px;
        right: 0;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 40px;
        padding: 0;
        color: #444;
        background: transparent;
        border: 0;
    }

    .site-header .dropdown-item > .submenu-toggle {
        top: 3px;
    }

    .site-header .dropdown-item > .submenu-toggle .nav-arrow-right {
        transform: rotate(135deg);
    }

    .site-header .submenu-open > .submenu-toggle .nav-arrow-down,
    .site-header .submenu-open > .submenu-toggle .nav-arrow-right {
        transform: rotate(225deg);
    }

    .site-navigation-item.has-submenu:hover > .dropdown-menu,
    .site-navigation-item.has-submenu:focus-within > .dropdown-menu,
    .site-header .dropdown-item.has-submenu:hover > .dropdown-submenu,
    .site-header .dropdown-item.has-submenu:focus-within > .dropdown-submenu {
        display: none;
    }

    .site-header .submenu-open > .dropdown-menu,
    .site-header .submenu-open:hover > .dropdown-menu,
    .site-header .submenu-open:focus-within > .dropdown-menu,
    .site-header .dropdown-item.has-submenu.submenu-open > .dropdown-submenu {
        display: block;
    }

    .site-menu-toggle:focus-visible,
    .submenu-toggle:focus-visible {
        outline: 3px solid rgb(250 180 0 / 45%);
        outline-offset: 2px;
    }
}
