/* ==========================================================
   TypingTutor.Online
   Scalable Site Navigation v17.4.4
========================================================== */

/* ---------- Main tutor header ---------- */
.mode-navigation {
    overflow: visible;
}

.mode-more,
.test-nav-more {
    position: relative;
    flex: 0 0 auto;
}

.mode-more > summary,
.test-nav-more > summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
}

.mode-more > summary::-webkit-details-marker,
.test-nav-more > summary::-webkit-details-marker {
    display: none;
}

.mode-more-chevron {
    margin-left: 1px;
    font-size: .8em;
    transition: transform .18s ease;
}

.mode-more[open] .mode-more-chevron {
    transform: rotate(180deg);
}

.mode-more-menu,
.test-nav-more-menu {
    position: absolute;
    z-index: 1000;
    top: calc(100% + 10px);
    right: 0;
    min-width: 205px;
    padding: 8px;
    border: 1px solid var(--border, #dbe4f0);
    border-radius: 14px;
    background: var(--surface, #ffffff);
    box-shadow: 0 18px 45px rgba(15, 23, 42, .18);
}

.mode-more-menu .mode-button {
    width: 100%;
    justify-content: flex-start;
    min-height: 42px;
    padding: 10px 12px;
    border-radius: 9px;
}

.mode-more-active > .mode-more-button,
.mode-more[open] > .mode-more-button {
    color: var(--primary, #1769ff);
    background: var(--surface-alt, #eef4ff);
}

.mode-more-menu .mode-button-active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
}

/* ---------- Standalone test headers ---------- */
.test-nav-more > summary {
    min-height: 43px;
    padding: 10px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border-radius: 11px;
    color: var(--text, #0f172a);
    font-weight: 750;
    white-space: nowrap;
}

.test-nav-more > summary:hover,
.test-nav-more[open] > summary {
    color: #ffffff;
    background: var(--primary, #2563eb);
}

.test-nav-more-menu {
    display: grid;
    gap: 4px;
}

.test-nav-more-menu a {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    border-radius: 9px;
    color: var(--text, #0f172a);
    background: transparent;
    text-decoration: none;
    font-weight: 750;
    white-space: nowrap;
}

.test-nav-more-menu a:hover {
    color: #ffffff;
    background: var(--primary, #2563eb);
}

html[data-theme="dark"] .mode-more-menu,
html[data-theme="dark"] .test-nav-more-menu {
    background: #101b2e;
    border-color: #40516a;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .42);
}

@media (prefers-color-scheme: dark) {
    html[data-theme="system"] .mode-more-menu,
    html[data-theme="system"] .test-nav-more-menu {
        background: #101b2e;
        border-color: #40516a;
        box-shadow: 0 18px 48px rgba(0, 0, 0, .42);
    }
}

/* The menu can open outside the horizontal navigation row on desktop. */
@media (min-width: 901px) {
    #modeSwitcher,
    .mode-switcher-inner,
    .mode-navigation,
    .test-header-inner,
    .test-nav {
        overflow: visible;
    }
}

/* Mobile keeps the compact horizontal row; dropdown opens below More. */
@media (max-width: 900px) {
    .mode-navigation,
    .test-nav {
        overflow-x: auto;
        overflow-y: visible;
        scrollbar-width: none;
    }

    .mode-navigation::-webkit-scrollbar,
    .test-nav::-webkit-scrollbar {
        display: none;
    }

    .mode-more-menu,
    .test-nav-more-menu {
        position: fixed;
        top: auto;
        right: 12px;
        left: 12px;
        margin-top: 8px;
        min-width: 0;
    }
}

@media (max-width: 560px) {
    .mode-more > summary.mode-button {
        min-width: 68px;
        min-height: 42px;
        padding: 7px 8px;
        flex-direction: column;
        gap: 3px;
        font-size: 9px;
    }

    .mode-more-chevron {
        display: none;
    }
}
