/* ==========================================================
   TypingTutor.Online
   Responsive Mode Navigation v5.5
   File: css/mode-switcher.css
========================================================== */

#modeSwitcher {
    width: 100%;
    min-width: 0;

    background: transparent;
    border: 0;
    box-shadow: none;
}

.mode-switcher-inner {
    width: 100%;
    margin: 0;
    padding: 0;
}

.mode-switcher-heading {
    display: none;
}

.mode-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(4px, 1.1vw, 18px);

    min-width: 0;
}

.mode-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    min-width: 0;
    min-height: 46px;
    padding: 9px clamp(9px, 1.15vw, 17px);

    color: var(--text);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 11px;

    font: 700 clamp(11px, .85vw, 13px)/1.15 inherit;
    white-space: nowrap;

    cursor: pointer;
}

.mode-button:hover {
    color: var(--primary);
    background: var(--surface-alt);
}

.mode-button-active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    box-shadow: 0 8px 20px rgba(23, 105, 255, .22);
}

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

.mode-button-icon {
    flex: 0 0 auto;
    font-size: 16px;
}

.mode-panel[hidden] {
    display: none !important;
}

/* Smaller desktop: hide icons before text becomes cramped */
@media (max-width: 1180px) {

    .mode-navigation {
        gap: 3px;
    }

    .mode-button {
        padding-inline: 10px;
        font-size: 11px;
    }

    .mode-button-icon {
        font-size: 14px;
    }

}

/* Two-row header: navigation scrolls safely instead of overlapping */
@media (max-width: 900px) {

    .mode-navigation {
        justify-content: flex-start;
        overflow-x: auto;

        padding: 2px 0 3px;

        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

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

    .mode-button {
        flex: 0 0 auto;
        min-height: 40px;
    }

}

/* Mobile: compact icons + labels */
@media (max-width: 560px) {

    .mode-button {
        min-width: 68px;
        min-height: 42px;
        padding: 7px 8px;

        flex-direction: column;
        gap: 3px;

        font-size: 9px;
    }

    .mode-button-icon {
        font-size: 14px;
    }

}
