
/* =========================================================
   EKOLEARN SIDEBAR TOGGLE
   ========================================================= */

.ekolearn-sidebar-toggle {
    width: 42px;
    height: 42px;
    padding: 0;
    margin: 0 10px 0 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--sh-text, #1f2937);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}

.ekolearn-sidebar-toggle:hover {
    background: rgba(0, 0, 0, .06);
}

.ekolearn-sidebar-toggle:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.ekolearn-sidebar-toggle i {
    font-size: 19px;
}

/* =========================================================
   EKOLEARN SIDEBAR
   ========================================================= */

.ekolearn-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    z-index: 1055;
    background: #fff;
    border-right: 1px solid rgba(0, 0, 0, .08);
    box-shadow: 8px 0 30px rgba(0, 0, 0, .08);
    display: flex;
    flex-direction: column;
    transform: translateX(-105%);
    transition: transform .25s ease;
    overflow-y: auto;
}

.ekolearn-sidebar.is-open {
    transform: translateX(0);
}

.ekolearn-sidebar-header {
    min-height: 72px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0, 0, 0, .06);
}

.ekolearn-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ekolearn-sidebar-brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--sh-primary, #1c3a03);
    color: #fff;
}

.ekolearn-sidebar-brand strong {
    display: block;
    font-size: 15px;
    line-height: 1.2;
}

.ekolearn-sidebar-brand small {
    display: block;
    margin-top: 2px;
    color: #6b7280;
    font-size: 11px;
}

.ekolearn-sidebar-close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #6b7280;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.ekolearn-sidebar-close:hover {
    background: rgba(0, 0, 0, .05);
    color: #111827;
}

.ekolearn-sidebar-nav {
    padding: 14px 10px;
    flex: 1;
}

.ekolearn-sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 46px;
    padding: 9px 12px;
    margin-bottom: 3px;
    border-radius: 10px;
    color: #374151;
    text-decoration: none;
    transition: background .2s ease, color .2s ease;
}

.ekolearn-sidebar-link:hover {
    background: rgba(0, 0, 0, .045);
    color: #111827;
    text-decoration: none;
}

.ekolearn-sidebar-link.is-active {
    background: rgba(28, 58, 3, .09);
    color: var(--sh-primary, #1c3a03);
    font-weight: 600;
}

.ekolearn-sidebar-icon {
    width: 22px;
    text-align: center;
    flex: 0 0 22px;
    color: #6b7280;
}

.ekolearn-sidebar-link:hover .ekolearn-sidebar-icon,
.ekolearn-sidebar-link.is-active .ekolearn-sidebar-icon {
    color: inherit;
}

.ekolearn-sidebar-label {
    font-size: 14px;
    line-height: 1.3;
}

.ekolearn-sidebar-footer {
    padding: 10px;
    border-top: 1px solid rgba(0, 0, 0, .06);
}

.ekolearn-sidebar-logout {
    color: #b42318;
}

.ekolearn-sidebar-logout:hover {
    color: #b42318;
    background: rgba(180, 35, 24, .06);
}

/* =========================================================
   SIDEBAR OVERLAY
   ========================================================= */

.ekolearn-sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 1050;
    background: rgba(0, 0, 0, .35);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
}

.ekolearn-sidebar-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

body.ekolearn-sidebar-open {
    overflow: hidden;
}

.ekolearn-sidebar-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    margin-bottom: 5px;
    border-radius: 10px;
    color: #374151;
    text-decoration: none;
}

.ekolearn-sidebar-profile:hover {
    background: rgba(0,0,0,.045);
    color: #111827;
    text-decoration: none;
}

.ekolearn-sidebar-avatar {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    overflow: hidden;
    border-radius: 50%;
}

.ekolearn-sidebar-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ekolearn-sidebar-user {
    min-width: 0;
    flex: 1;
}

.ekolearn-sidebar-user strong {
    display: block;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ekolearn-sidebar-user small {
    display: block;
    margin-top: 2px;
    color: #6b7280;
    font-size: 11px;
}

.ekolearn-sidebar-profile > .fa {
    color: #9ca3af;
    font-size: 14px;
}

/* =========================================================
   DESKTOP
   ========================================================= */

@media (min-width: 768px) {
    .ekolearn-sidebar-toggle {
        display: inline-flex;
    }

    .ekolearn-sidebar-close {
        display: none;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767.98px) {
    .ekolearn-sidebar {
        width: min(290px, 86vw);
    }

    .ekolearn-sidebar-toggle {
        width: 40px;
        height: 40px;
        margin-right: 4px;
    }

    .ekolearn-sidebar-header {
        min-height: 64px;
    }
}


.studenthub-counter.d-none {
    display: none !important;
}



/* =========================================================
   Topbar Dropdowns
   ========================================================= */

.communication-dropdown {
    width: 380px;
    max-width: calc(100vw - 30px);
}

/* --- Desktop Layout (Screens wider than mobile) --- */
@media (min-width: 576px) {
    .communication-dropdown {
        width: 380px !important;
        max-width: calc(100vw - 30px) !important;
        box-sizing: border-box !important;
        left: auto !important; 
        right: 0 !important;
        transform: none !important;
    }
}

/* --- Mobile Layout (Screens smaller than 576px) --- */
@media (max-width: 575.98px) {
    .communication-dropdown {
        /* 1. Pull the menu back out from the button's right anchor */
        position: fixed !important;
        
        /* 2. Force it perfectly centered or full-width on the viewport */
        left: 15px !important;
        right: 15px !important;
        width: calc(100vw - 30px) !important;
        max-width: none !important;
        
        /* 3. Adjust the distance from the top bar if needed */
        top: 56px !important; /* Matches standard Bootstrap navbar height */
        transform: none !important;
    }
}


.communication-dropdown-item {
    white-space: normal;
}

/*
.communication-dropdown-item:hover {
    background-color: rgba(0,0,0,.04);
}
*/

.communication-dropdown-header {
    min-height: 45px;
}

.min-width-0 {
    min-width: 0;
}

.communication-dropdown-item small {
    font-size: .78rem;
}

.communication-dropdown-item .communication-date {
    font-size: .68rem;
    opacity: .65;
}

.comm-message-unread .comm-message-name,
.comm-message-unread .comm-message-preview {
    font-weight: 700 !important;
    color: var(--bs-body-color) !important;
}