/**
 * Venue Row Component Styles
 *
 * Horizontal scrolling row of venue cards.
 * Scoped with .vr-* prefix to avoid conflicts.
 * Uses CSS custom properties from design-tokens.css.
 */

/* ============================================
   SECTION & HEADER
   ============================================ */

.vr-section {
    margin-bottom: 24px;
    max-width: 100%;
}

.vr-section:last-child,
.vr-section:last-of-type {
    margin-bottom: 0;
}

.vr-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

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

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

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

/* ============================================
   SCROLL CONTAINER
   ============================================ */

.vr-container {
    position: relative;
    max-width: 100%;
}

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

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

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

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

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

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

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

/* ============================================
   NAVIGATION ARROWS
   ============================================ */

.vr-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);
}

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

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

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

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

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

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

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

/* ============================================
   VENUE CARD
   ============================================ */

.vr-card {
    flex: 0 0 160px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.vr-card:hover {
    background: var(--bg-hover);
    transform: translateY(-2px);
    border-color: var(--border-secondary);
}

/* ============================================
   CARD IMAGE (Logo Container)
   ============================================ */

.vr-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--bg-tertiary);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.vr-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ============================================
   FAVORITE BUTTON (Top-right overlay)
   Higher specificity to override .fav-btn base styles
   ============================================ */

.vr-card-image .vr-favorite-btn.fav-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    color: white;
    padding: 6px;
}

.vr-card-image .vr-favorite-btn.fav-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    color: white;
}

.vr-card-image .vr-favorite-btn.fav-btn.fav-btn--active {
    background: rgba(255, 255, 255, 0.9);
    color: #ff4d6d;
}

.vr-card-image .vr-favorite-btn.fav-btn.fav-btn--active:hover {
    background: rgba(255, 255, 255, 1);
    color: #ff3355;
}

/* ============================================
   ICON FALLBACK (when no logo)
   ============================================ */

.vr-icon-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
}

.vr-icon-fallback svg {
    width: 48px;
    height: 48px;
    color: var(--text-tertiary);
    opacity: 0.5;
}

/* ============================================
   CARD CONTENT
   ============================================ */

.vr-card-content {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.vr-card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vr-card-count {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ============================================
   MOBILE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
    .vr-section {
        margin-bottom: 20px;
    }

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

    .vr-card {
        flex: 0 0 140px;
    }

    .vr-card-image {
        padding: 12px;
    }

    .vr-card-content {
        padding: 10px;
    }

    .vr-card-name {
        font-size: 13px;
    }

    .vr-card-count {
        font-size: 11px;
    }

    .vr-icon-fallback svg {
        width: 40px;
        height: 40px;
    }

    .vr-card-image .vr-favorite-btn.fav-btn {
        top: 6px;
        right: 6px;
        padding: 5px;
    }
}
