﻿/* =========================================================
   SCHOOL QUICK ACCESS
   Responsive + overflow protection
   ========================================================= */

.school-navbar-main {
    min-width: 0;
}

.school-quick-access {
    min-width: 0;
    max-width: 100%;
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 2px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

    .school-quick-access::-webkit-scrollbar {
        height: 4px;
    }

    .school-quick-access::-webkit-scrollbar-thumb {
        border-radius: 999px;
        background: rgba(24, 59, 102, .20);
    }

    .school-quick-access::-webkit-scrollbar-track {
        background: transparent;
    }

.school-quick-btn {
    width: 34px;
    height: 34px;
    min-width: 34px;
    flex: 0 0 34px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(24, 59, 102, .10);
    border-radius: 9px;
    color: #526b84;
    background: rgba(255, 255, 255, .88);
    text-decoration: none;
    font-size: .84rem;
    transition: transform .16s ease, background-color .16s ease, color .16s ease, border-color .16s ease, box-shadow .16s ease;
}

    .school-quick-btn:hover,
    .school-quick-btn:focus-visible {
        color: #183b66;
        border-color: rgba(36, 93, 145, .24);
        background: #f3f8fc;
        box-shadow: 0 5px 14px rgba(24, 59, 102, .08);
        transform: translateY(-1px);
    }

    .school-quick-btn.primary {
        color: #fff;
        border-color: transparent;
        background: linear-gradient(135deg, #183b66, #2d6a9f);
    }

    .school-quick-btn.exam {
        color: #5d4c91;
        border-color: #ddd5ef;
        background: #f6f2fb;
    }

        .school-quick-btn.exam:hover,
        .school-quick-btn.exam:focus-visible {
            color: #493879;
            border-color: #cfc2e8;
            background: #f0eaf8;
        }

.school-quick-separator {
    width: 1px;
    height: 21px;
    min-width: 1px;
    flex: 0 0 1px;
    margin: 0 2px;
    background: rgba(24, 59, 102, .13);
}

/* =========================================================
   Desktop
   ========================================================= */

@media (min-width: 1101px) {

    .school-navbar-inner {
        min-width: 0;
    }

    #schoolMainNav.collapse {
        display: flex !important;
        visibility: visible !important;
        height: auto !important;
        min-width: 0;
        flex: 1 1 auto;
    }

    #schoolMainNav.collapsing {
        display: flex !important;
        height: auto !important;
        min-width: 0;
        flex: 1 1 auto;
        transition: none !important;
    }

    .school-navbar-toggle {
        display: none !important;
    }

    .school-navbar-main {
        width: 100%;
        min-width: 0;
        display: flex;
        align-items: center;
    }

    .school-main-links {
        flex: 0 0 auto;
    }

    .school-quick-access {
        flex: 1 1 auto;
    }

    .school-navbar-account {
        flex: 0 0 auto;
    }
}

/* =========================================================
   Mobile / Tablet
   ========================================================= */

@media (max-width: 1100px) {

    .school-navbar-inner {
        flex-wrap: wrap;
    }

    .school-navbar-toggle {
        display: grid !important;
        place-items: center;
        margin-inline-start: auto;
    }

    #schoolMainNav.school-navbar-collapse {
        flex: 0 0 100%;
        width: 100%;
        min-width: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 10px 0 14px;
    }

    #schoolMainNav.collapse:not(.show) {
        display: none !important;
    }

    #schoolMainNav.collapse.show {
        display: block !important;
    }

    #schoolMainNav.collapsing {
        width: 100%;
    }

    .school-navbar-main {
        width: 100%;
        min-width: 0;
        display: grid;
        gap: 10px;
    }

    .school-main-links {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .school-quick-access {
        width: 100%;
        max-width: 100%;
        padding: 7px 2px;
        border-top: 1px solid rgba(24, 59, 102, .08);
        border-bottom: 1px solid rgba(24, 59, 102, .08);
    }

    .school-navbar-account {
        width: 100%;
    }
}

@media (max-width: 620px) {

    .school-quick-btn {
        width: 32px;
        height: 32px;
        min-width: 32px;
        flex-basis: 32px;
        border-radius: 8px;
        font-size: .78rem;
    }

    .school-quick-separator {
        height: 18px;
    }
}

/* =========================================================
   READABILITY / USABILITY ENHANCEMENT
   تكبير أزرار الوصول السريع والأيقونات وتحسين اللمس والقراءة
========================================================= */

.school-quick-access {
    gap: 6px;
    padding: 6px 4px;
}

.school-quick-btn {
    width: 42px;
    height: 42px;
    min-width: 42px;
    flex: 0 0 42px;
    border-radius: 11px;
    font-size: 1.05rem;
    font-weight: 900;
}

    .school-quick-btn i {
        font-size: 1.08rem;
    }

    .school-quick-btn:hover,
    .school-quick-btn:focus-visible {
        box-shadow: 0 7px 18px rgba(24, 59, 102, .10);
    }

.school-quick-separator {
    height: 27px;
    margin: 0 3px;
}

/* القائمة الرئيسية والحساب */
.school-main-link {
    min-height: 42px;
    font-size: .92rem;
    font-weight: 850;
}

    .school-main-link i {
        font-size: 1.05rem;
    }

.school-navbar-toggle {
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
}

    .school-navbar-toggle i {
        font-size: 1.3rem;
    }

/* Desktop */
@media (min-width: 1101px) {
    .school-quick-access {
        padding-block: 7px;
    }

    .school-quick-btn {
        width: 43px;
        height: 43px;
        min-width: 43px;
        flex-basis: 43px;
        font-size: 1.08rem;
    }
}

/* Tablet */
@media (max-width: 1100px) {
    .school-quick-access {
        gap: 7px;
        padding: 10px 3px;
    }

    .school-quick-btn {
        width: 44px;
        height: 44px;
        min-width: 44px;
        flex-basis: 44px;
        font-size: 1.08rem;
    }

    .school-main-links {
        gap: 9px;
    }

    .school-main-link {
        min-height: 46px;
        font-size: .94rem;
        font-weight: 900;
    }
}

/* Mobile */
@media (max-width: 620px) {
    .school-quick-access {
        gap: 6px;
        padding: 9px 2px;
    }

    .school-quick-btn {
        width: 42px;
        height: 42px;
        min-width: 42px;
        flex-basis: 42px;
        border-radius: 10px;
        font-size: 1.02rem;
    }

        .school-quick-btn i {
            font-size: 1.05rem;
        }

    .school-quick-separator {
        height: 24px;
    }

    .school-main-link {
        min-height: 45px;
        font-size: .9rem;
    }
}

/* 2K */
@media (min-width: 1800px) {
    .school-quick-access {
        gap: 7px;
    }

    .school-quick-btn {
        width: 47px;
        height: 47px;
        min-width: 47px;
        flex-basis: 47px;
        border-radius: 12px;
        font-size: 1.15rem;
    }

        .school-quick-btn i {
            font-size: 1.18rem;
        }

    .school-quick-separator {
        height: 30px;
    }

    .school-main-link {
        min-height: 46px;
        font-size: .98rem;
    }
}

/* 4K / 8K */
@media (min-width: 3000px) {
    .school-quick-access {
        gap: 9px;
        padding-block: 10px;
    }

    .school-quick-btn {
        width: 56px;
        height: 56px;
        min-width: 56px;
        flex-basis: 56px;
        border-radius: 14px;
        font-size: 1.35rem;
    }

        .school-quick-btn i {
            font-size: 1.4rem;
        }

    .school-quick-separator {
        height: 36px;
        margin-inline: 4px;
    }

    .school-main-link {
        min-height: 54px;
        font-size: 1.12rem;
    }

        .school-main-link i {
            font-size: 1.25rem;
        }

    .school-navbar-toggle {
        width: 54px;
        height: 54px;
    }

        .school-navbar-toggle i {
            font-size: 1.55rem;
        }
}
