/*
    REM Nutrition – Admin Navigation Sidebar CSS
    Brand: #90DEFF
*/

/* ===== STICKY WRAPPER ===== */

.sticky {
    position: sticky;
    top: 0;
    max-height: 100vh;
    overflow-y: auto;
}

/* ===== TOGGLE BUTTON ===== */

.toggle-nav-sidebar {
    z-index: 20;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 26px;
    width: 26px;
    border-right: 1px solid #daeef8;
    background-color: #ffffff;
    cursor: pointer;
    font-size: 18px;
    color: #3aabdd;
    padding: 0;
    transition: background-color 0.15s ease, color 0.15s ease;
}

[dir="rtl"] .toggle-nav-sidebar {
    border-left: 1px solid #daeef8;
    border-right: 0;
}

.toggle-nav-sidebar:hover,
.toggle-nav-sidebar:focus {
    background-color: #e8f7ff;
    color: #1a7abf;
}

/* ===== SIDEBAR PANEL ===== */

#nav-sidebar {
    z-index: 15;
    flex: 0 0 280px;
    left: -281px;
    margin-left: -281px;
    border-top: 1px solid transparent;
    border-right: 1px solid #daeef8;
    background-color: #ffffff;
    overflow: auto;
    transition: margin-left 0.25s ease, left 0.25s ease;
    box-shadow: 2px 0 10px rgba(144, 222, 255, 0.15);
}

[dir="rtl"] #nav-sidebar {
    border-left: 1px solid #daeef8;
    border-right: 0;
    left: 0;
    margin-left: 0;
    right: -281px;
    margin-right: -281px;
}

/* ===== TOGGLE CHEVRONS ===== */

.toggle-nav-sidebar::before {
    content: '\00BB';
    font-weight: 700;
}

.main.shifted .toggle-nav-sidebar::before {
    content: '\00AB';
}

/* ===== SHIFTED (OPEN) STATE ===== */

.main.shifted > #nav-sidebar {
    left: 27px;
    margin-left: 0;
    box-shadow: 3px 0 14px rgba(144, 222, 255, 0.2);
}

[dir="rtl"] .main.shifted > #nav-sidebar {
    left: 0;
    right: 27px;
    margin-right: 0;
}

/* ===== SIDEBAR TABLE CELLS ===== */

#nav-sidebar .module th {
    width: 100%;
    overflow-wrap: anywhere;
}

#nav-sidebar .module th,
#nav-sidebar .module caption {
    padding-left: 16px;
    background: #e8f7ff;
    color: #2c3e50;
    border-bottom: 2px solid #90DEFF;
    font-size: 0.7rem;
    letter-spacing: 0.6px;
}

#nav-sidebar .module td {
    white-space: nowrap;
}

#nav-sidebar .module td a {
    color: #1a7abf;
    font-weight: 500;
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 5px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

#nav-sidebar .module td a:hover {
    background-color: #e8f7ff;
    color: #0e5286;
    text-decoration: none;
}

[dir="rtl"] #nav-sidebar .module th,
[dir="rtl"] #nav-sidebar .module caption {
    padding-left: 8px;
    padding-right: 16px;
}

/* ===== CURRENT APP/MODEL HIGHLIGHTS ===== */

#nav-sidebar .current-app .section:link,
#nav-sidebar .current-app .section:visited {
    color: #1a1a1a;
    font-weight: 700;
}

#nav-sidebar .current-model {
    background: #e8f7ff;
    border-left: 3px solid #90DEFF;
}

/* ===== CONTENT MAX-WIDTH ===== */

.main > #nav-sidebar + .content {
    max-width: calc(100% - 26px);
}

.main.shifted > #nav-sidebar + .content {
    max-width: calc(100% - 306px);
}

/* ===== MOBILE: HIDE SIDEBAR ===== */

@media (max-width: 767px) {
    #nav-sidebar, #toggle-nav-sidebar {
        display: none;
    }

    .main > #nav-sidebar + .content,
    .main.shifted > #nav-sidebar + .content {
        max-width: 100%;
    }
}
