:root {
    --sticky-header-height: 60px;
}

html {
    scroll-padding-top: calc(var(--sticky-header-height) + 8px);
}

.sticky-category-menu-toggle {
    display: none;
    min-height: 44px;
    padding: 0 16px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid #d7dce2;
    border-radius: 6px;
    background: #fff;
    color: #232323;
    font: inherit;
    font-weight: 500;
    cursor: pointer;
}

.sticky-category-menu-toggle:hover,
.sticky-category-menu-toggle:focus-visible {
    border-color: #ec5252;
    color: #c93636;
    outline: none;
}

.sticky-category-menu-toggle .svg-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}

/* The legacy bundle reveals the logo over the horizontal menu when it becomes fixed. */
.site-header.navbar-stuck .navbar .categories-btn {
    display: none;
}

@media (min-width: 1600px) and (max-width: 1799px) {
    .site-header .site-menu > ul > li > a {
        padding-right: 10px;
        padding-left: 10px;
        font-size: 13px;
    }
}

/* At medium desktop widths the complete taxonomy no longer fits in one row. */
@media (min-width: 992px) and (max-width: 1599px) {
    .site-header .navbar {
        min-height: var(--sticky-header-height);
        padding: 0 20px;
    }

    .site-header .navbar .site-menu {
        display: none;
    }

    .site-header .navbar .categories-btn,
    .site-header.navbar-stuck .navbar .categories-btn {
        position: static;
        display: flex !important;
        width: 100%;
        min-height: var(--sticky-header-height);
        align-items: center;
        justify-content: space-between;
        gap: 20px;
    }

    .site-header .navbar .categories-btn .site-branding {
        padding: 6px 0;
        border: 0;
    }

    .site-header .navbar .categories-btn .site-logo {
        width: 136px;
    }

    .sticky-category-menu-toggle {
        display: inline-flex;
    }

    .site-header .mobile-menu.open {
        display: block;
        top: 100%;
        max-height: calc(100dvh - var(--sticky-header-height));
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .site-header.navbar-stuck .mobile-menu.open {
        position: fixed;
        top: var(--sticky-header-height);
        right: 0;
        left: 0;
        z-index: 1001;
    }
}

.dark-theme .sticky-category-menu-toggle {
    border-color: #555;
    background: #2a2a2a;
    color: #f5f5f5;
}

.dark-theme .sticky-category-menu-toggle:hover,
.dark-theme .sticky-category-menu-toggle:focus-visible {
    border-color: #ec5252;
    color: #ff8b82;
}
