/*
    Rouse Refresh burger menu (1024px and below)
    Used by Views/Partials/RouseRefresh/BurgerMenu-new.cshtml and the burger button in header-new.cshtml.

    Figma "Mega Menu - * - Medium" (768) / "Mega Menu - * - Small" (375):
    - Masthead: #F9F9F9, 58px high with 20px sides (Medium), 47px with 16px sides (Small), both including
      the 1px bottom border, so the inner row is 57px / 46px.
      16x16 burger / close icon, 16px gap, 22px logo; 16x16 search icon on the right, all #171245.
    - Menu: #171245, starts 16px under the masthead, 40px bottom padding, 4px between items.
    - Item: 45px, padding 14px 20px, Archivo Medium 16px / 105%, #F9F9F9. Open item: #FFFFFF 5%.
    - Open section: 8px under its item, #FFFFFF 2%, padding 20px, 40px between groups.
    - Group: 4x18 accent bar #6A59FD (radius 2), 8px gap, Archivo Medium 16px title; 16px to the links.
    - Links: 2 columns, 12px column gap, 16px row gap, Noto Sans 14px / 105%, -3% tracking, #F9F9F9 at 80%.
*/

/* ---------- Masthead (header-new at 1024px and below) ---------- */

header.rr-header .rr-header__burger-btn {
    display: none;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin: 0 16px 0 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--rr-header-text);
    cursor: pointer;
}

    header.rr-header .rr-header__burger-btn:focus {
        outline: none;
    }

    header.rr-header .rr-header__burger-btn:focus-visible {
        outline: 2px solid #6A59FD;
        outline-offset: 2px;
    }

header.rr-header .rr-header__burger-icon {
    display: block;
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1;
    stroke-linecap: round;
}

header.rr-header .rr-header__burger-icon--close,
header.rr-header .rr-header__burger-btn[aria-expanded="true"] .rr-header__burger-icon--menu {
    display: none;
}

header.rr-header .rr-header__burger-btn[aria-expanded="true"] .rr-header__burger-icon--close {
    display: block;
}

@media (max-width: 1024px) {
    header.rr-header {
        --rr-header-height: 57px;
        --rr-header-padding-x: 20px;
    }

    header.rr-header .rr-header__burger-btn {
        display: inline-flex;
    }

    header.rr-header #logo img.rr-header__logo-img {
        height: 22px;
    }

    header.rr-header #search-form #search-icon {
        width: 16px;
        height: 16px;
        font-size: 16px;
    }

    /* Open: masthead as in the design. */
    header.rr-header.rr-header--burger-open {
        --rr-header-text: #171245;
        background-color: #F9F9F9;
    }
}

@media (max-width: 767px) {
    header.rr-header {
        --rr-header-height: 46px;
        --rr-header-padding-x: 16px;
    }
}

/* Page behind the open menu does not scroll. */
html.rr-burger-is-open,
html.rr-burger-is-open body {
    overflow: hidden;
}

/* ---------- Menu panel ---------- */

header.rr-header .rr-burger {
    --rr-burger-bg: #171245;
    --rr-burger-text: #F9F9F9;
    --rr-burger-accent: #6A59FD;
    --rr-burger-heading-font: 'Archivo', 'Noto Sans', 'Segoe UI', Arial, sans-serif;
    --rr-burger-font: 'Noto Sans', 'Noto Sans Arabic', 'Noto Sans Khmer', 'Noto Sans Thai', 'Noto Sans SC', 'Segoe UI', Arial, sans-serif;

    position: fixed;
    /* Under the masthead and its 1px border. */
    top: calc(var(--rr-header-height) + 1px);
    left: 0;
    right: 0;
    bottom: 0;
    box-sizing: border-box;
    padding: 16px 0 40px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    background: var(--rr-burger-bg);
    color: var(--rr-burger-text);
    text-align: left;
    z-index: 999;
}

    header.rr-header .rr-burger[hidden] {
        display: none;
    }

/* Never shown with the desktop menu. */
@media (min-width: 1025px) {
    header.rr-header .rr-burger {
        display: none;
    }
}

header.rr-header .rr-burger__list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

header.rr-header .rr-burger__entry {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
}

header.rr-header .rr-burger__item {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
    height: 45px;
    margin: 0;
    padding: 14px 20px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--rr-burger-text);
    font-family: var(--rr-burger-heading-font);
    font-size: 16px;
    font-weight: 500;
    line-height: 105%;
    letter-spacing: 0;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

    header.rr-header .rr-burger__item:hover,
    header.rr-header .rr-burger__item:focus {
        color: var(--rr-burger-text);
        text-decoration: none;
        outline: none;
    }

    header.rr-header .rr-burger__item:focus-visible {
        outline: 2px solid var(--rr-burger-accent);
        outline-offset: -2px;
    }

    header.rr-header .rr-burger__item[aria-expanded="true"] {
        background: rgba(255, 255, 255, 0.05);
    }

/* ---------- Open section ---------- */

header.rr-header .rr-burger__dropdown {
    display: flex;
    flex-direction: column;
    gap: 40px;
    box-sizing: border-box;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
}

    header.rr-header .rr-burger__dropdown[hidden] {
        display: none;
    }

header.rr-header .rr-burger__group {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

header.rr-header .rr-burger__heading {
    display: flex;
    align-items: center;
    gap: 8px;
}

header.rr-header .rr-burger__accent {
    flex: 0 0 4px;
    width: 4px;
    height: 18px;
    border-radius: 2px;
    background: var(--rr-burger-accent);
}

header.rr-header .rr-burger__title {
    display: block;
    color: var(--rr-burger-text);
    font-family: var(--rr-burger-heading-font);
    font-size: 16px;
    font-weight: 500;
    line-height: 105%;
    letter-spacing: 0;
    text-decoration: none;
}

    header.rr-header a.rr-burger__title:hover,
    header.rr-header a.rr-burger__title:focus {
        color: var(--rr-burger-text);
        text-decoration: underline;
    }

header.rr-header .rr-burger__links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

    header.rr-header .rr-burger__links li {
        margin: 0;
        padding: 0;
    }

    header.rr-header .rr-burger__links a {
        display: block;
        color: var(--rr-burger-text);
        opacity: 0.8;
        font-family: var(--rr-burger-font);
        font-size: 14px;
        font-weight: 400;
        line-height: 105%;
        letter-spacing: -0.03em;
        text-decoration: none;
    }

        header.rr-header .rr-burger__links a:hover,
        header.rr-header .rr-burger__links a:focus {
            color: var(--rr-burger-text);
            opacity: 1;
            text-decoration: underline;
        }

        header.rr-header .rr-burger__links a.rr-burger__link--bold {
            font-weight: 700;
        }

/* Suryomurcito language list (IPEx/BurgerLanguage) inherits the menu colours. */
header.rr-header .rr-burger__dropdown--language,
header.rr-header .rr-burger__dropdown--language a {
    color: var(--rr-burger-text);
}
