/* 
 * Global Scroll Styling - FacilEstoque
 * Estilização moderna e fina para scrollbars em todo o sistema
 */

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #d1d5db 0%, #dfdfdf 100%);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #dfdfdf 0%, #6b7280 100%);
    background-clip: content-box;
    transform: scale(1.1);
}

::-webkit-scrollbar-thumb:active {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    background-clip: content-box;
}

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

/* Firefox */
html {
    scrollbar-width: thin;
    scrollbar-color: #dfdfdf rgba(241, 245, 249, 0.3);
}

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

/* Custom classes for different scroll contexts */

/* Scroll fino para tabelas */
.table-scroll::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.table-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #6b7280 0%, #9ca3af 100%);
    border-radius: 8px;
}

.table-scroll::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #4b5563 0%, #6b7280 100%);
}

/* Scroll para modais e sidebars */
.modal-scroll::-webkit-scrollbar {
    width: 6px;
}

.modal-scroll::-webkit-scrollbar-track {
    background: rgba(229, 231, 235, 0.5);
    border-radius: 8px;
}

.modal-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #d1d5db 0%, #9ca3af 100%);
    border-radius: 8px;
}

.modal-scroll::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
}

/* Scroll transparente para overlays */
.overlay-scroll::-webkit-scrollbar {
    width: 4px;
}

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

.overlay-scroll::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.6);
    border-radius: 6px;
}

.overlay-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(107, 114, 128, 0.8);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    ::-webkit-scrollbar-track {
        background: rgba(31, 41, 55, 0.3);
    }
    
    .table-scroll::-webkit-scrollbar-thumb {
        background: linear-gradient(135deg, #9ca3af 0%, #d1d5db 100%);
    }
    
    .modal-scroll::-webkit-scrollbar-track {
        background: rgba(55, 65, 81, 0.5);
    }
    
    .modal-scroll::-webkit-scrollbar-thumb {
        background: linear-gradient(135deg, #6b7280 0%, #9ca3af 100%);
    }
}

/* Mobile optimization */
@media (max-width: 768px) {
    ::-webkit-scrollbar {
        width: 6px;
        height: 6px;
    }
    
    .table-scroll::-webkit-scrollbar,
    .modal-scroll::-webkit-scrollbar,
    .overlay-scroll::-webkit-scrollbar {
        width: 4px;
    }
}
