/**
 * Custom Scrollbar Component
 * ==========================
 * Reużywalny custom scrollbar dla projektów SONE
 * 
 * UŻYCIE:
 * 1. Dodaj HTML w body:
 *    <div class="customScrollbarTrack" id="scrollbarTrack">
 *        <div class="customScrollbarThumb" id="scrollbarThumb"></div>
 *    </div>
 * 
 * 2. Zaimportuj CSS:
 *    @import url(assets/customScrollbar/customScrollbar.css);
 *    lub
 *    <link rel="stylesheet" href="assets/customScrollbar/customScrollbar.css">
 * 
 * 3. Zaimportuj JS (wymaga quickJS.js dla funkcji qs):
 *    <script src="assets/customScrollbar/customScrollbar.js"></script>
 * 
 * KONFIGURACJA CSS Variables (opcjonalne - dodaj do swojego CSS):
 * --scrollbar-track-width: 6px;
 * --scrollbar-track-height: 140px;
 * --scrollbar-track-bg: rgba(255, 255, 255, 0.1);
 * --scrollbar-thumb-bg: #3b82f6;
 * --scrollbar-hover-scale: 1.2;
 * --scrollbar-position-right: 20px;
 */

/* Ukryj natywny scrollbar */
html::-webkit-scrollbar {
  display: none;
}

html {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

/* Custom Scrollbar Track */
.customScrollbarTrack {
  position: fixed;
  width: var(--scrollbar-track-width, 6px);
  height: var(--scrollbar-track-height, 140px);
  background-color: var(--scrollbar-track-bg, rgba(255, 255, 255, 0.1));
  border-radius: 6px;
  padding: 0;
  z-index: 9999;
  right: var(--scrollbar-position-right, 20px);
  top: 50%;
  transform: translateY(-50%);
  transition: all 0.3s ease;
  box-shadow: none;
  cursor: pointer;
}

.customScrollbarTrack:hover {
  transform: translateY(-50%) scale(var(--scrollbar-hover-scale, 1.2));
  box-shadow: 0 6px 16px -2px rgba(0, 0, 0, 0.2);
}

/* Custom Scrollbar Thumb */
.customScrollbarThumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--scrollbar-thumb-bg, #3b82f6);
  border-radius: 3px;
  cursor: grab;
  transition: width 0.3s ease, background-color 0.3s ease;
}

.customScrollbarThumb:hover {
  background-color: var(--scrollbar-thumb-hover-bg, var(--scrollbar-thumb-bg, #60a5fa));
}

.customScrollbarThumb:active {
  cursor: grabbing;
}

/* Opcjonalny dark mode */
@media (prefers-color-scheme: dark) {
  .customScrollbarTrack {
    background-color: var(--scrollbar-track-bg, rgba(255, 255, 255, 0.08));
  }
}
