/*
© 2025 Sharon Aicler (saichler@gmail.com)

Layer 8 Ecosystem is licensed under the Apache License, Version 2.0.
You may obtain a copy of the License at:

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
/**
 * Layer 8 Shared Scrollbar Styles
 * Consistent scrollbar styling across the application
 */

/* ============================================ */
/* WEBKIT SCROLLBAR (Chrome, Safari, Edge) */
/* ============================================ */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--layer8d-bg-light, #f7fafc);
    border-left: 1px solid var(--layer8d-border, #e2e8f0);
}

::-webkit-scrollbar-thumb {
    background: var(--layer8d-border-dark, #cbd5e0);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--layer8d-primary, #0ea5e9);
}

/* ============================================ */
/* THIN SCROLLBAR VARIANT */
/* ============================================ */

.layer8d-scrollbar-thin::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.layer8d-scrollbar-thin::-webkit-scrollbar-track {
    background: transparent;
}

.layer8d-scrollbar-thin::-webkit-scrollbar-thumb {
    background: var(--layer8d-border, #e2e8f0);
    border-radius: 3px;
}

.layer8d-scrollbar-thin::-webkit-scrollbar-thumb:hover {
    background: var(--layer8d-border-dark, #cbd5e0);
}

/* ============================================ */
/* DARK THEME SCROLLBAR */
/* ============================================ */

.layer8d-scrollbar-dark::-webkit-scrollbar-track {
    background: var(--noc-charcoal, #121212);
    border-left: 1px solid var(--border-emphasis, #333333);
}

.layer8d-scrollbar-dark::-webkit-scrollbar-thumb {
    background: var(--border-emphasis, #333333);
    border-radius: 5px;
}

.layer8d-scrollbar-dark::-webkit-scrollbar-thumb:hover {
    background: var(--noc-cyan, #0ea5e9);
}

/* ============================================ */
/* FIREFOX SCROLLBAR */
/* ============================================ */

* {
    scrollbar-width: thin;
    scrollbar-color: var(--layer8d-border-dark, #cbd5e0) var(--layer8d-bg-light, #f7fafc);
}

.layer8d-scrollbar-dark {
    scrollbar-color: var(--border-emphasis, #333333) var(--noc-charcoal, #121212);
}

/* ============================================ */
/* SCROLLABLE CONTAINER UTILITY */
/* ============================================ */

.layer8d-scroll-y {
    overflow-y: auto;
    overflow-x: hidden;
}

.layer8d-scroll-x {
    overflow-x: auto;
    overflow-y: hidden;
}

.layer8d-scroll-both {
    overflow: auto;
}

/* Auto-hide scrollbar until hover */
.layer8d-scroll-auto {
    overflow: hidden;
}

.layer8d-scroll-auto:hover {
    overflow-y: auto;
}
