/* ============================================================
   Custom scrollbars — Perfect Scrollbar theme (Al-Faisal)
   ============================================================ */

/* Page scroll — native scrollbar styling (PS breaks body scroll) */
html.native-custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: rgba(38, 166, 154, 0.55) transparent;
}

html.native-custom-scrollbar ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

html.native-custom-scrollbar ::-webkit-scrollbar-track {
    background: transparent;
}

html.native-custom-scrollbar ::-webkit-scrollbar-thumb {
    background-color: rgba(38, 166, 154, 0.45);
    border-radius: 999px;
}

html.native-custom-scrollbar ::-webkit-scrollbar-thumb:hover {
    background-color: #26a69a;
}

html.native-custom-scrollbar:has(body.dark-mode) {
    scrollbar-color: rgba(38, 166, 154, 0.65) transparent;
}

html.native-custom-scrollbar:has(body.dark-mode) ::-webkit-scrollbar-thumb {
    background-color: rgba(38, 166, 154, 0.55);
}

html.native-custom-scrollbar:has(body.dark-mode) ::-webkit-scrollbar-thumb:hover {
    background-color: #26a69a;
}

.custom-scrollbar {
    position: relative;
}

.ps__rail-x,
.ps__rail-y {
    opacity: 0;
    transition: opacity 0.2s ease, background-color 0.2s ease;
}

.ps:hover > .ps__rail-x,
.ps:hover > .ps__rail-y,
.ps--focus > .ps__rail-x,
.ps--focus > .ps__rail-y,
.ps--scrolling-x > .ps__rail-x,
.ps--scrolling-y > .ps__rail-y {
    opacity: 1;
}

.ps .ps__rail-x:hover,
.ps .ps__rail-y:hover,
.ps .ps__rail-x:focus,
.ps .ps__rail-y:focus,
.ps .ps__rail-x.ps--clicking,
.ps .ps__rail-y.ps--clicking {
    background-color: rgba(38, 166, 154, 0.1);
    opacity: 1;
}

.ps__thumb-x,
.ps__thumb-y {
    background-color: rgba(38, 166, 154, 0.45);
    border-radius: 999px;
}

.ps__rail-x:hover > .ps__thumb-x,
.ps__rail-x:focus > .ps__thumb-x,
.ps__rail-x.ps--clicking .ps__thumb-x,
.ps__rail-y:hover > .ps__thumb-y,
.ps__rail-y:focus > .ps__thumb-y,
.ps__rail-y.ps--clicking .ps__thumb-y {
    background-color: #26a69a;
}

.dark-mode .ps .ps__rail-x:hover,
.dark-mode .ps .ps__rail-y:hover,
.dark-mode .ps .ps__rail-x:focus,
.dark-mode .ps .ps__rail-y:focus,
.dark-mode .ps .ps__rail-x.ps--clicking,
.dark-mode .ps .ps__rail-y.ps--clicking {
    background-color: rgba(38, 166, 154, 0.18);
}

.dark-mode .ps__thumb-x,
.dark-mode .ps__thumb-y {
    background-color: rgba(38, 166, 154, 0.55);
}

.dark-mode .ps__rail-x:hover > .ps__thumb-x,
.dark-mode .ps__rail-x:focus > .ps__thumb-x,
.dark-mode .ps__rail-x.ps--clicking .ps__thumb-x,
.dark-mode .ps__rail-y:hover > .ps__thumb-y,
.dark-mode .ps__rail-y:focus > .ps__thumb-y,
.dark-mode .ps__rail-y.ps--clicking .ps__thumb-y {
    background-color: #26a69a;
}

/* RTL: vertical rail on the inner edge */
[dir="rtl"] .ps__rail-y {
    right: auto;
    left: 0;
}

[dir="rtl"] .ps__thumb-y {
    right: auto;
    left: 2px;
}

.admin-sidebar__nav.custom-scrollbar {
    padding-left: 4px;
}

.admin-table-wrap.custom-scrollbar {
    padding-bottom: 4px;
}

.big-nav.custom-scrollbar .ps__rail-y {
    z-index: 2;
}
