/* Custom Scrollbar Styles for Modern Browsers */

/* For Webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #FF6B35, #B85450);
    border-radius: 10px;
    border: 2px solid #f1f1f1;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #1a237e, #283593);
}

::-webkit-scrollbar-thumb:active {
    background: linear-gradient(135deg, #B85450, #FF6B35);
}

/* Horizontal Scrollbar */
::-webkit-scrollbar-track:horizontal {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb:horizontal {
    background: linear-gradient(90deg, #FF6B35, #B85450);
}

/* For Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #FF6B35 #f1f1f1;
}

/* Custom scrollbar for specific containers */
.modal-content::-webkit-scrollbar,
.dropdown-menu::-webkit-scrollbar,
.navbar-collapse::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-thumb,
.dropdown-menu::-webkit-scrollbar-thumb,
.navbar-collapse::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #FF6B35, #B85450);
    border-radius: 10px;
}

/* Scrollbar for dark backgrounds */
.footer-modern::-webkit-scrollbar-track,
.navbar-modern::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.footer-modern::-webkit-scrollbar-thumb,
.navbar-modern::-webkit-scrollbar-thumb {
    background: rgba(255, 107, 53, 0.6);
    border: 2px solid transparent;
}

.footer-modern::-webkit-scrollbar-thumb:hover,
.navbar-modern::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 107, 53, 0.9);
}

/* Thin scrollbar for mobile devices */
@media (max-width: 768px) {
    ::-webkit-scrollbar {
        width: 6px;
        height: 6px;
    }

    ::-webkit-scrollbar-thumb {
        border: 1px solid #f1f1f1;
    }
}

/* Hide scrollbar for specific elements when not needed */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Smooth scrolling behavior */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar for code blocks or pre elements */
pre::-webkit-scrollbar,
code::-webkit-scrollbar {
    height: 8px;
}

pre::-webkit-scrollbar-track,
code::-webkit-scrollbar-track {
    background: #2d2d2d;
    border-radius: 10px;
}

pre::-webkit-scrollbar-thumb,
code::-webkit-scrollbar-thumb {
    background: #FF6B35;
    border-radius: 10px;
}

/* Custom scrollbar for tables */
.table-responsive::-webkit-scrollbar {
    height: 10px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 10px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #1a237e, #283593);
    border-radius: 10px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, #FF6B35, #B85450);
}

/* Scrollbar animation on hover */
::-webkit-scrollbar-thumb {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Custom scrollbar for sidebar or navigation */
.sidebar::-webkit-scrollbar,
.nav-sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track,
.nav-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb,
.nav-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 107, 53, 0.5);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover,
.nav-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 107, 53, 0.8);
}

/* Overlay scrollbar style (appears only when scrolling) */
.overlay-scrollbar {
    overflow: overlay;
}

.overlay-scrollbar::-webkit-scrollbar {
    width: 10px;
    background: transparent;
}

.overlay-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.overlay-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 107, 53, 0.5);
    border-radius: 10px;
    border: 2px solid transparent;
}

.overlay-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 107, 53, 0.8);
}

/* Scrollbar corner (when both scrollbars are present) */
::-webkit-scrollbar-corner {
    background: #f1f1f1;
}

/* Custom scrollbar for project cards or content areas */
.project-content::-webkit-scrollbar,
.content-area::-webkit-scrollbar {
    width: 8px;
}

.project-content::-webkit-scrollbar-track,
.content-area::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 10px;
    margin: 10px 0;
}

.project-content::-webkit-scrollbar-thumb,
.content-area::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #FF6B35, #B85450);
    border-radius: 10px;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    ::-webkit-scrollbar-thumb {
        transition: none;
    }
}

/* High contrast mode adjustments */
@media (prefers-contrast: high) {
    ::-webkit-scrollbar-track {
        background: #000000;
    }

    ::-webkit-scrollbar-thumb {
        background: #ffffff;
        border: 2px solid #000000;
    }

    ::-webkit-scrollbar-thumb:hover {
        background: #cccccc;
    }
}

/* Print styles - hide scrollbars when printing */
@media print {
    ::-webkit-scrollbar {
        display: none;
    }

    * {
        scrollbar-width: none;
    }
}