/* ═══════════════════════════════════════════════════════════════════════════
 * Professional Scrollbar Styles
 * ═══════════════════════════════════════════════════════════════════════════
 * Modern, minimal scrollbars matching the QRS teal/cyan theme.
 * Apply globally OR to specific containers.
 *
 * Usage:
 *   1. Global (recommended): import this file in app/layout.tsx or globals.css
 *   2. Targeted: add `className={styles.proScrollbar}` to specific divs
 * ═══════════════════════════════════════════════════════════════════════════ */

/* ───── GLOBAL APPLICATION (default) ─────────────────────────────────── */
* {
  scrollbar-width: thin;                  /* Firefox: thin track */
  scrollbar-color: #065f46 transparent;   /* Firefox: thumb track */
}

/* ───── WEBKIT BROWSERS (Chrome, Safari, Edge) ───────────────────────── */
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 8px;
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #065f46 0%, #065f46 100%);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
  transition: background 0.2s;
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #94a3b8 0%, #64748b 100%);
  background-clip: padding-box;
  border: 2px solid transparent;
}

*::-webkit-scrollbar-thumb:active {
  background: linear-gradient(180deg, #64748b 0%, #475569 100%);
  background-clip: padding-box;
  border: 2px solid transparent;
}

*::-webkit-scrollbar-corner {
  background: transparent;
}


/* ═══════════════════════════════════════════════════════════════════════════
 * SIDEBAR-SPECIFIC SCROLLBAR (teal accent, more compact)
 * ═══════════════════════════════════════════════════════════════════════════
 * Apply with: <aside className="sidebar-scroll">
 * ═══════════════════════════════════════════════════════════════════════════ */
.sidebar-scroll {
  /* Firefox */
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 118, 110, 0.4) transparent;

  /* Smooth scrolling */
  scroll-behavior: smooth;

  /* Hide scrollbar when not hovering — premium look */
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-scroll::-webkit-scrollbar {
  width: 6px;
}

.sidebar-scroll::-webkit-scrollbar-track {
  background: transparent;
  margin: 8px 0;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #14b8a6 0%, #0f766e 100%);
  border-radius: 99px;
  opacity: 0.4;
  transition: all 0.25s ease;
}

.sidebar-scroll::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #0d9488 0%, #115e59 100%);
  width: 8px;
}

/* Show scrollbar only on hover for sleek look */
.sidebar-scroll::-webkit-scrollbar-thumb {
  opacity: 0;
}

.sidebar-scroll:hover::-webkit-scrollbar-thumb {
  opacity: 1;
}


/* ═══════════════════════════════════════════════════════════════════════════
 * MODAL / FORM SCROLLBAR (subtle, no border)
 * ═══════════════════════════════════════════════════════════════════════════
 * Apply with: <div className="modal-scroll">
 * ═══════════════════════════════════════════════════════════════════════════ */
.modal-scroll {
  scrollbar-width: thin;
  scrollbar-color: #e5e7eb transparent;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.modal-scroll::-webkit-scrollbar {
  width: 8px;
}

.modal-scroll::-webkit-scrollbar-track {
  background: #f9fafb;
  border-radius: 4px;
}

.modal-scroll::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
  transition: background 0.2s;
}

.modal-scroll::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}


/* ═══════════════════════════════════════════════════════════════════════════
 * TABLE SCROLLBAR (matches table border style)
 * ═══════════════════════════════════════════════════════════════════════════
 * Apply with: <div className="table-scroll">
 * ═══════════════════════════════════════════════════════════════════════════ */
.table-scroll {
  scrollbar-width: thin;
  scrollbar-color: #99f6e4 #f0fdfa;
  overflow: auto;
}

.table-scroll::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.table-scroll::-webkit-scrollbar-track {
  background: #f0fdfa;
  border-radius: 0;
  border-left: 1px solid #e5e7eb;
}

.table-scroll::-webkit-scrollbar-thumb {
  background: #5eead4;
  border-radius: 99px;
  border: 2px solid #f0fdfa;
  background-clip: padding-box;
}

.table-scroll::-webkit-scrollbar-thumb:hover {
  background: #14b8a6;
  background-clip: padding-box;
  border: 2px solid #f0fdfa;
}


/* ═══════════════════════════════════════════════════════════════════════════
 * HIDE SCROLLBAR (utility class)
 * ═══════════════════════════════════════════════════════════════════════════
 * Apply with: <div className="hide-scroll">
 * Useful for horizontal scroll lists, tabs, etc.
 * ═══════════════════════════════════════════════════════════════════════════ */
.hide-scroll {
  scrollbar-width: none;       /* Firefox */
  -ms-overflow-style: none;    /* IE 10+ */
}

.hide-scroll::-webkit-scrollbar {
  display: none;               /* Chrome, Safari, Edge */
}


/* ═══════════════════════════════════════════════════════════════════════════
 * SMOOTH FADE-IN EFFECT (optional)
 * Hides scrollbar until user scrolls or hovers
 * ═══════════════════════════════════════════════════════════════════════════ */
.fade-scroll::-webkit-scrollbar-thumb {
  background-color: transparent;
  transition: background-color 0.3s ease;
}

.fade-scroll:hover::-webkit-scrollbar-thumb,
.fade-scroll:focus-within::-webkit-scrollbar-thumb {
  background-color: rgba(148, 163, 184, 0.6);
}

.fade-scroll:hover::-webkit-scrollbar-thumb:hover,
.fade-scroll:focus-within::-webkit-scrollbar-thumb:hover {
  background-color: rgba(100, 116, 139, 0.8);
}