/* Custom Scrollbar Component Styles */


/* Enhanced scrollbar styles for specific use cases */


/* Animated scrollbar that appears on hover */

.scrollbar-animated {
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
    transition: scrollbar-color 0.3s ease;
}

.scrollbar-animated:hover {
    scrollbar-color: var(--color-accent) rgba(251, 251, 254, 0.5);
}

.scrollbar-animated::-webkit-scrollbar {
    width: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.scrollbar-animated:hover::-webkit-scrollbar {
    opacity: 1;
}

.scrollbar-animated::-webkit-scrollbar-track {
    background: rgba(251, 251, 254, 0.2);
    border-radius: 4px;
}

.scrollbar-animated::-webkit-scrollbar-thumb {
    background: var(--color-accent);
    border-radius: 4px;
    border: 1px solid rgba(251, 251, 254, 0.3);
}

.scrollbar-animated::-webkit-scrollbar-thumb:hover {
    background: var(--color-secondary);
}


/* Gradient scrollbar for special sections */

.scrollbar-gradient::-webkit-scrollbar {
    width: 14px;
}

.scrollbar-gradient::-webkit-scrollbar-track {
    background: linear-gradient(45deg, #f8f9ff 0%, #f0f1ff 100%);
    border-radius: 7px;
    border: 2px solid rgba(112, 111, 211, 0.05);
}

.scrollbar-gradient::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #706FD3 0%, #464686 50%, #130F3E 100%);
    border-radius: 7px;
    border: 2px solid #f8f9ff;
    box-shadow: 0 2px 8px rgba(112, 111, 211, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.scrollbar-gradient::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #5e5cc7 0%, #3a3a73 50%, #0f0c32 100%);
    box-shadow: 0 4px 16px rgba(112, 111, 211, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}


/* Minimal scrollbar for code blocks and text areas */

.scrollbar-minimal::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

.scrollbar-minimal::-webkit-scrollbar-thumb {
    background: rgba(112, 111, 211, 0.3);
    border-radius: 3px;
}

.scrollbar-minimal::-webkit-scrollbar-thumb:hover {
    background: rgba(112, 111, 211, 0.6);
}

.scrollbar-minimal::-webkit-scrollbar-corner {
    background: transparent;
}


/* Horizontal scrollbar styling */

.scrollbar-horizontal::-webkit-scrollbar:horizontal {
    height: 12px;
}

.scrollbar-horizontal::-webkit-scrollbar-track:horizontal {
    background: #f8f9ff;
    border-radius: 6px;
    border: 1px solid rgba(112, 111, 211, 0.08);
}

.scrollbar-horizontal::-webkit-scrollbar-thumb:horizontal {
    background: linear-gradient(90deg, #706FD3 0%, #464686 100%);
    border-radius: 6px;
    border: 2px solid #f8f9ff;
    box-shadow: 0 2px 8px rgba(112, 111, 211, 0.15);
}

.scrollbar-horizontal::-webkit-scrollbar-thumb:horizontal:hover {
    background: linear-gradient(90deg, #5e5cc7 0%, #3a3a73 100%);
}


/* Rounded scrollbar for modern UI elements */

.scrollbar-rounded::-webkit-scrollbar {
    width: 16px;
}

.scrollbar-rounded::-webkit-scrollbar-track {
    background: #f8f9ff;
    border-radius: 12px;
    border: 2px solid rgba(112, 111, 211, 0.05);
    margin: 8px 0;
}

.scrollbar-rounded::-webkit-scrollbar-thumb {
    background: var(--color-accent);
    border-radius: 12px;
    border: 4px solid #f8f9ff;
    background-clip: padding-box;
}

.scrollbar-rounded::-webkit-scrollbar-thumb:hover {
    background: var(--color-secondary);
    border-width: 3px;
}


/* Blog/article content scrollbar */

.article-scrollbar::-webkit-scrollbar {
    width: 10px;
}

.article-scrollbar::-webkit-scrollbar-track {
    background: rgba(251, 251, 254, 0.8);
    border-radius: 5px;
    box-shadow: inset 0 0 3px rgba(112, 111, 211, 0.1);
}

.article-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(70, 70, 134, 0.5);
    border-radius: 5px;
    border: 1px solid rgba(251, 251, 254, 0.8);
}

.article-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent);
    box-shadow: 0 0 8px rgba(112, 111, 211, 0.3);
}


/* Dashboard/admin scrollbar */

.dashboard-scrollbar::-webkit-scrollbar {
    width: 8px;
}

.dashboard-scrollbar::-webkit-scrollbar-track {
    background: var(--color-primary);
    opacity: 0.1;
}

.dashboard-scrollbar::-webkit-scrollbar-thumb {
    background: var(--color-accent);
    border-radius: 4px;
    opacity: 0.7;
}

.dashboard-scrollbar::-webkit-scrollbar-thumb:hover {
    opacity: 1;
    background: var(--color-secondary);
}


/* Responsive scrollbar adjustments */

@media (max-width: 768px) {
     ::-webkit-scrollbar {
        width: 8px;
    }
    .scrollbar-gradient::-webkit-scrollbar,
    .scrollbar-rounded::-webkit-scrollbar {
        width: 10px;
    }
    .scrollbar-minimal::-webkit-scrollbar {
        width: 4px;
        height: 4px;
    }
}


/* Touch device scrollbar (for touch-enabled laptops) */

@media (pointer: coarse) {
     ::-webkit-scrollbar {
        width: 14px;
    }
     ::-webkit-scrollbar-thumb {
        min-height: 40px;
    }
}


/* High contrast mode support */

@media (prefers-contrast: high) {
     ::-webkit-scrollbar-track {
        background: #ffffff;
        border: 2px solid #000000;
    }
     ::-webkit-scrollbar-thumb {
        background: #000000;
        border: 2px solid #ffffff;
    }
     ::-webkit-scrollbar-thumb:hover {
        background: #333333;
    }
}


/* Reduced motion preferences */

@media (prefers-reduced-motion: reduce) {
    .scrollbar-animated::-webkit-scrollbar {
        transition: none;
    }
    .scrollbar-animated::-webkit-scrollbar-thumb {
        transition: none;
    }
    .scrollbar-gradient::-webkit-scrollbar-thumb:hover {
        transform: none;
    }
}