/**
 * Scroll Row Component Styles
 *
 * Generic horizontal scrolling container.
 * Scoped with .scr-* prefix to avoid conflicts.
 * Uses CSS custom properties from design-tokens.css.
 */

/* Section Container */
.scr-section {
    margin-bottom: 24px;
    max-width: 100%;
}

/* Remove margin from last section */
.scr-section:last-child,
.scr-section:last-of-type {
    margin-bottom: 0;
}

/* Section Header */
.scr-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.scr-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.scr-link {
    font-size: 14px;
    color: var(--accent-primary);
    text-decoration: none;
}

.scr-link:hover {
    text-decoration: underline;
}

/* Scroll Container */
.scr-container {
    position: relative;
    max-width: 100%;
}

.scr-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-top: 8px;
    padding-bottom: 8px;
    scroll-behavior: smooth;
    max-width: 100%;
    /* Hide scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.scr-scroll::-webkit-scrollbar {
    display: none;
}

/* Fade edges to indicate more content */
.scr-container::before,
.scr-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 8px;
    width: 40px;
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.scr-container::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-primary) 0%, transparent 100%);
}

.scr-container::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-primary) 0%, transparent 100%);
}

.scr-container.scr-can-scroll-left::before {
    opacity: 1;
}

.scr-container.scr-can-scroll-right::after {
    opacity: 1;
}

/* Navigation Arrows */
.scr-arrow {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(calc(-50% - 4px));
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    color: var(--text-primary);
    cursor: pointer;
    z-index: 3;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease;
    box-shadow: var(--shadow-md);
}

.scr-arrow:hover {
    background: var(--bg-hover);
}

.scr-arrow svg {
    width: 20px;
    height: 20px;
}

.scr-arrow-left {
    left: 8px;
}

.scr-arrow-right {
    right: 8px;
}

/* Show arrows on desktop when hovering the container */
@media (min-width: 769px) {
    .scr-arrow {
        display: flex;
    }

    .scr-container:hover .scr-arrow-left.scr-visible {
        opacity: 1;
    }

    .scr-container:hover .scr-arrow-right.scr-visible {
        opacity: 1;
    }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .scr-section {
        margin-bottom: 20px;
    }

    .scr-title {
        font-size: 18px;
    }
}
