::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4B5563;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scroll-smooth {
    scroll-behavior: smooth;
}

.glass {
    background: rgba(26, 34, 53, 0.7);
    backdrop-filter: blur(10px);
}

/* Search refresh: keep old cards visible until new data arrives (no empty flash) */
#gamesGrid.games-grid--refreshing {
    opacity: 0.65;
    pointer-events: none;
    filter: saturate(0.9);
    transition: opacity 0.22s ease, filter 0.22s ease;
}

@media (prefers-reduced-motion: reduce) {
    #gamesGrid.games-grid--refreshing {
        transition: none;
    }
}

/* Provider carousel: smooth inertial feel + snap */
.provider-carousel {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
}

@media (prefers-reduced-motion: reduce) {
    .provider-carousel {
        scroll-behavior: auto;
        scroll-snap-type: none;
    }
}

.provider-carousel-item {
    scroll-snap-align: start;
}

/* Mobile: two equal columns + fixed logo box so images don’t change chip width */
@media (max-width: 767px) {
    #providerScroll {
        gap: 0.75rem;
    }

    #providerScroll .provider-carousel-item {
        flex: 0 0 calc((100% - 0.75rem) / 2);
        max-width: calc((100% - 0.75rem) / 2);
        min-width: 0;
    }

    #providerScroll .provider-logo-box {
        height: 3.25rem;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #providerScroll .provider-logo-box img {
        max-height: 2.5rem;
        max-width: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
    }
}

@media (min-width: 768px) {
    #providerScroll .provider-carousel-item {
        flex: 0 0 auto;
        max-width: none;
    }
}
