/* Stylish scrollbars — application-wide (Chrome, Edge, Safari, Firefox) */

:root {
    --ei-scrollbar-size: 10px;
    --ei-scrollbar-track: #e9ecef;
    --ei-scrollbar-thumb: #b58032;
    --ei-scrollbar-thumb-hover: #9a6d2a;
    --ei-scrollbar-thumb-active: #7d5822;
    --ei-scrollbar-thumb-border: #f4f5f7;
}

html.ei-theme-dark {
    --ei-scrollbar-track: #2d323c;
    --ei-scrollbar-thumb: #c99a4a;
    --ei-scrollbar-thumb-hover: #ddb56a;
    --ei-scrollbar-thumb-active: #b58032;
    --ei-scrollbar-thumb-border: #252830;
}

html,
body,
* {
    scrollbar-width: thin;
    scrollbar-color: var(--ei-scrollbar-thumb) var(--ei-scrollbar-track);
}

*::-webkit-scrollbar {
    width: var(--ei-scrollbar-size);
    height: var(--ei-scrollbar-size);
}

*::-webkit-scrollbar-track {
    background: var(--ei-scrollbar-track);
    border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--ei-scrollbar-thumb-hover) 0%, var(--ei-scrollbar-thumb) 100%);
    border-radius: 999px;
    border: 2px solid var(--ei-scrollbar-thumb-border);
    min-height: 48px;
    min-width: 48px;
}

*::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--ei-scrollbar-thumb-hover) 0%, var(--ei-scrollbar-thumb-active) 100%);
}

*::-webkit-scrollbar-thumb:active {
    background: var(--ei-scrollbar-thumb-active);
}

*::-webkit-scrollbar-corner {
    background: var(--ei-scrollbar-track);
}

/* Common scroll containers */
.content-wrapper,
.main-sidebar .sidebar,
.modal-body,
.select2-results__options,
.dataTables_wrapper,
.dropdown-menu,
.control-sidebar,
.card-body,
.table-responsive,
.ui-dialog-content,
.html-print-preview-modal .modal-body.html-print-modal-zoom-body {
    scrollbar-width: thin;
    scrollbar-color: var(--ei-scrollbar-thumb) var(--ei-scrollbar-track);
}
