/* ========================================
   Custom Scrollbar Design
   Modern, smooth scrollbar styling
   ======================================== */

/* Global scrollbar styling for webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #ffffff;
  border-radius: 10px;
  margin: 2px;
}

::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 10px;
  border: 2px solid #ffffff;
  transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
  border-color: #f9fafb;
}

::-webkit-scrollbar-thumb:active {
  background: #6b7280;
}

/* Firefox scrollbar styling */
* {
  scrollbar-width: thin;
  scrollbar-color: #d1d5db #ffffff;
}

/* Sidebar specific scrollbar - hidden by default, shows on hover */
.sidebar::-webkit-scrollbar {
  width: 0;
}

.sidebar:hover::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-track {
  background: #ffffff;
  border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 10px;
  border: 2px solid #ffffff;
  background-clip: padding-box;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
  background-clip: padding-box;
}

/* Control sidebar scrollbar */
.control-sidebar .control-sidebar-content::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.control-sidebar .control-sidebar-content::-webkit-scrollbar-track {
  background: #ffffff;
  border-radius: 10px;
}

.control-sidebar .control-sidebar-content::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 10px;
  border: 2px solid #ffffff;
  background-clip: padding-box;
}

.control-sidebar .control-sidebar-content::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Content area scrollbar */
.content-wrapper::-webkit-scrollbar {
  width: 10px;
}

.content-wrapper::-webkit-scrollbar-track {
  background: #ffffff;
  border-radius: 10px;
}

.content-wrapper::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 10px;
  border: 2px solid #ffffff;
}

.content-wrapper::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Modal scrollbar */
.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-track {
  background: #ffffff;
  border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 10px;
  border: 2px solid #ffffff;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Table container scrollbar */
.table-responsive::-webkit-scrollbar {
  height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
  background: #ffffff;
  border-radius: 10px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 10px;
  border: 2px solid #ffffff;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Card body scrollbar */
.card-body::-webkit-scrollbar {
  width: 8px;
}

.card-body::-webkit-scrollbar-track {
  background: #ffffff;
  border-radius: 10px;
}

.card-body::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 10px;
  border: 2px solid #ffffff;
}

.card-body::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Smooth scrolling behavior */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar for dark mode (if applicable) */
@media (prefers-color-scheme: dark) {
  ::-webkit-scrollbar-track {
    background: #ffffff;
  }

  ::-webkit-scrollbar-thumb {
    background: #6b7280;
    border-color: #ffffff;
  }

  ::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
  }

  * {
    scrollbar-color: #6b7280 #ffffff;
  }
}
