/* ═══════════════════════════════════════════════════════════
   RAYKA Custom Scrollbar - Premium Design
   Version: 1.0.0
   ═══════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════
   1. FIREFOX - scrollbar-width & scrollbar-color
   ═══════════════════════════════════════════════════════════ */
* {
    scrollbar-width: thin;
    scrollbar-color: #F97316 #F3F4F6;
}

/* ═══════════════════════════════════════════════════════════
   2. CHROME / EDGE / SAFARI - WebKit Scrollbar
   ═══════════════════════════════════════════════════════════ */

/* ─── Track (پس‌زمینه اسکرول‌بار) ─── */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #F3F4F6;
    border-radius: 100px;
}

/* ─── Thumb (دستگیره اسکرول) ─── */
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #FBBF24 0%, #F97316 50%, #DC2626 100%);
    border-radius: 100px;
    border: 2px solid #F3F4F6;
    transition: all 0.3s ease;
}

/* ─── Thumb Hover ─── */
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #F97316 0%, #DC2626 100%);
    border: 1px solid #F3F4F6;
}

/* ─── Thumb Active (در حال کشیدن) ─── */
::-webkit-scrollbar-thumb:active {
    background: linear-gradient(180deg, #EA580C 0%, #B91C1C 100%);
}

/* ─── Corner (گوشه تلاقی دو اسکرول‌بار) ─── */
::-webkit-scrollbar-corner {
    background: #F3F4F6;
}

/* ─── Buttons (فلش‌های بالا/پایین) ─── */
::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}

/* ═══════════════════════════════════════════════════════════
   3. HORIZONTAL SCROLLBAR (اسکرول افقی)
   ═══════════════════════════════════════════════════════════ */
::-webkit-scrollbar:horizontal {
    height: 6px;
}

::-webkit-scrollbar-thumb:horizontal {
    background: linear-gradient(90deg, #FBBF24 0%, #F97316 50%, #DC2626 100%);
    border-radius: 100px;
    border: 1.5px solid #F3F4F6;
}

::-webkit-scrollbar-thumb:horizontal:hover {
    background: linear-gradient(90deg, #F97316 0%, #DC2626 100%);
}

/* ═══════════════════════════════════════════════════════════
   4. SCROLLBAR FOR SPECIFIC AREAS
   ═══════════════════════════════════════════════════════════ */

/* ─── Sidebar Navigation ─── */
.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(249, 115, 22, 0.3);
    border: none;
    border-radius: 100px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(249, 115, 22, 0.6);
}

/* ─── Modal Body ─── */
.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: #F9FAFB;
    border-radius: 100px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #F97316, #DC2626);
    border-radius: 100px;
    border: 1.5px solid #F9FAFB;
}

/* ─── Dropdown Menus ─── */
.user-dropdown::-webkit-scrollbar,
.notification-dropdown::-webkit-scrollbar,
.search-dropdown::-webkit-scrollbar {
    width: 4px;
}

.user-dropdown::-webkit-scrollbar-track,
.notification-dropdown::-webkit-scrollbar-track,
.search-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.user-dropdown::-webkit-scrollbar-thumb,
.notification-dropdown::-webkit-scrollbar-thumb,
.search-dropdown::-webkit-scrollbar-thumb {
    background: rgba(249, 115, 22, 0.25);
    border: none;
    border-radius: 100px;
}

.user-dropdown::-webkit-scrollbar-thumb:hover,
.notification-dropdown::-webkit-scrollbar-thumb:hover,
.search-dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(249, 115, 22, 0.5);
}

/* ─── Notification List ─── */
.notification-list::-webkit-scrollbar {
    width: 4px;
}

.notification-list::-webkit-scrollbar-track {
    background: transparent;
}

.notification-list::-webkit-scrollbar-thumb {
    background: rgba(249, 115, 22, 0.2);
    border: none;
    border-radius: 100px;
}

.notification-list::-webkit-scrollbar-thumb:hover {
    background: rgba(249, 115, 22, 0.45);
}

/* ─── Table Responsive ─── */
.table-responsive::-webkit-scrollbar {
    height: 6px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #F9FAFB;
    border-radius: 100px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #F97316, #DC2626);
    border-radius: 100px;
    border: 1.5px solid #F9FAFB;
}

/* ─── Textarea ─── */
textarea::-webkit-scrollbar {
    width: 5px;
}

textarea::-webkit-scrollbar-track {
    background: #F9FAFB;
    border-radius: 0 8px 8px 0;
}

textarea::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 100px;
    border: 1px solid #F9FAFB;
}

textarea::-webkit-scrollbar-thumb:hover {
    background: #F97316;
}

/* ─── Code Blocks ─── */
pre::-webkit-scrollbar,
code::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

pre::-webkit-scrollbar-track,
code::-webkit-scrollbar-track {
    background: #1F2937;
    border-radius: 100px;
}

pre::-webkit-scrollbar-thumb,
code::-webkit-scrollbar-thumb {
    background: #4B5563;
    border-radius: 100px;
    border: 1px solid #1F2937;
}

pre::-webkit-scrollbar-thumb:hover,
code::-webkit-scrollbar-thumb:hover {
    background: #F97316;
}

/* ─── Lightbox Image Wrapper ─── */
.lightbox-image-wrapper::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

.lightbox-image-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.lightbox-image-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border: none;
    border-radius: 100px;
}

/* ─── Tabs Content ─── */
.tabs-content::-webkit-scrollbar {
    width: 6px;
}

.tabs-content::-webkit-scrollbar-track {
    background: #F9FAFB;
    border-radius: 100px;
}

.tabs-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #F97316, #DC2626);
    border-radius: 100px;
    border: 1.5px solid #F9FAFB;
}

/* ═══════════════════════════════════════════════════════════
   5. AUTO-HIDE SCROLLBAR (برای موبایل و تبلت)
   ═══════════════════════════════════════════════════════════ */
@media (hover: none) and (pointer: coarse) {
    ::-webkit-scrollbar {
        width: 4px;
        height: 4px;
    }

    ::-webkit-scrollbar-thumb {
        background: rgba(249, 115, 22, 0.4);
        border: none;
    }
}

/* ═══════════════════════════════════════════════════════════
   6. REDUCED MOTION (دسترس‌پذیری)
   ═══════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    ::-webkit-scrollbar-thumb {
        transition: none;
    }
}

/* ═══════════════════════════════════════════════════════════
   8. PRINT STYLES
   ═══════════════════════════════════════════════════════════ */
@media print {
    ::-webkit-scrollbar {
        display: none;
    }

    * {
        scrollbar-width: none;
    }
}