/* ===================================== */
/*        ГОРИЗОНТАЛЬНЫЙ СКРОЛЛ          */
/* ===================================== */

.scroll-wrapper {
    position: relative;
    width: 100%;
    margin: 10px 0 20px 0;
}

.scroll-container {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding: 5px 0 15px 0;
    margin: 0;
    white-space: nowrap;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    user-select: none;
    touch-action: pan-y pinch-zoom;
}

.scroll-container:active {
    cursor: grabbing;
}

/* Стилизация скроллбара */
.scroll-container::-webkit-scrollbar {
    height: 4px;
}

.scroll-container::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
}

/* Контейнер кнопок - только для ПК */
.scroll-buttons-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    width: 100%;
}

/* Кнопки - только для ПК */
@media (min-width: 769px) {
    .scroll-btn {
        width: 80px;
        height: 36px;
        background: #333;
        border: 1px solid #444;
        color: #ccc;
        font-size: 16px;
        font-weight: 500;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
        border-radius: 4px;
        padding: 0;
        margin: 0;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }
    
    .scroll-btn:hover:not(:disabled) {
        background: #444;
        color: #fff;
        border-color: #666;
    }
    
    .scroll-btn:active:not(:disabled) {
        background: #3a3a3a;
        transform: translateY(1px);
        box-shadow: none;
    }
    
    .scroll-btn:disabled {
        opacity: 0.3;
        cursor: default;
        background: #2a2a2a;
        border-color: #333;
        color: #666;
    }
}

/* Мобильная версия - без кнопок */
@media (max-width: 768px) {
    .scroll-btn {
        display: none !important;
    }
    
    .scroll-buttons-container {
        display: none !important;
    }
    
    .scroll-container {
        padding-left: 4px;
        padding-right: 4px;
    }
    
    .scroll-wrapper {
        margin: 5px 0;
    }
}

/* Для контейнеров внутри поиска */
#searchResults .scroll-wrapper {
    margin: 5px 0 15px;
}

/* Адаптация для маленьких экранов */
@media (max-width: 480px) {
    .scroll-container {
        padding-bottom: 12px;
    }
}


/* В shared/css/components/scroll.css добавить: */
.main-content {
    scroll-behavior: smooth;
    will-change: scroll-position;
}

/* Для таблиц */
.table-container {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Для карточек */
.artist-card, .album-card, .playlist-card {
    will-change: transform;
    transform: translateZ(0);
}

/* Отключаем анимации на слабых устройствах */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}