/**
 * Swiper Cards Component Styles

 */

/* Base Swiper Styles */
.swiper-slide {
    text-align: left;
}

/* Slide Card Container */
.bs-slide__card {
    background-color: var(--background-light);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* Hover effects only on non-touch devices */
@media (hover: hover) {
    .bs-slide__card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    }
}

/* Touch-friendly styles for mobile devices */
@media (hover: none) {
    .bs-slide__card:active {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }
}

/* Slide Cover Image Container */
.bs-slide__cover {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
}

.bs-slide__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Aspect Ratio Variations */

/* Song/Track slides (TopPicks) - 16/9 for artist artwork */
.bs-slide--song .bs-slide__cover {
    aspect-ratio: 16/9;
}

/* Mixtape and DJ slides - 1:1 square (explicit override of default) */
.bs-slide--square .bs-slide__cover,
.bs-slide--mixtape .bs-slide__cover,
.bs-slide--dj .bs-slide__cover {
    aspect-ratio: 1;
}

/* Artist slides - 16/9 for artist photos */
.bs-slide__card--artist .bs-slide__cover {
    aspect-ratio: 16/9;
}

/* Video slides - 16/9 for video thumbnails */
.bs-slide__card--video .bs-slide__cover {
    aspect-ratio: 16/9;
}

/* News slides - 16/9 for article images */
.bs-slide__card--news .bs-slide__cover {
    aspect-ratio: 16/9;
}

/* Clip slides - 16/9 for YouTube thumbnails */
.bs-slide__card--clip .bs-slide__cover {
    aspect-ratio: 16/9;
}

/* Play Button Overlay */
.bs-slide__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    /* Ensure touch interactions work properly */
    touch-action: manipulation;
}

/* Desktop hover behavior - only on devices with hover capability */
@media (hover: hover) {
    .bs-slide__card:hover .bs-slide__overlay {
        opacity: 1;
    }
}

/* Mobile/touch behavior - completely remove overlay to prevent touch conflicts */
@media (hover: none) {
    .bs-slide__overlay {
        display: none !important;
    }
}

/* Play Button */
.bs-slide__play-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: red;
    border: none;
    color: white;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    /* Ensure proper touch interaction */
    touch-action: manipulation;
    /* WCAG 2.1 minimum touch target size */
    min-width: 44px;
    min-height: 44px;
}

/* Desktop hover effects */
@media (hover: hover) {
    .bs-slide__play-btn:hover {
        background-color: #ff1a1a;
        transform: scale(1.1);
    }
}

/* Mobile touch effects */
@media (hover: none) {
    .bs-slide__play-btn:active {
        background-color: #cc0000;
        transform: scale(0.95);
    }
}

/* Slide Info Section */
.bs-slide__content {
    padding: 12px 20px; /* Reduced vertical padding */
    height: 90px; /* Fixed height for consistency */
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Changed to flex-start for better control */
    align-items: stretch;
    overflow: hidden; /* Prevent visual overflow */
    box-sizing: border-box; /* Ensure padding is included in height */
}

/* Slide Title */
.bs-slide__title {
    font-size: 1.1rem; /* Slightly reduced */
    font-weight: 400;
    line-height: 1.2; /* Tighter line height */
    margin-bottom: 4px; /* Reduced margin */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Slide Artist */
.bs-slide__artist {
    color: var(--text-secondary);
    font-size: 0.9rem; /* Slightly reduced */
    line-height: 1.3; /* Tighter line height */
    margin-bottom: 6px; /* Reduced margin */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Adjusted for new line height */
    max-height: 2.34rem; /* 2 lines × 1.3 line-height × 0.9rem */
}

/* Slide Stats (Hidden by default) */
.bs-slide__stats {
    display: none !important;
}

.bs-slide__stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Artist Card Specific Styles */
.bs-slide__card--artist .bs-slide__content {
    height: 90px; /* Fixed height for consistency */
    padding: 10px 20px; /* Reduced vertical padding */
}

.bs-slide__card--artist .bs-slide__title {
    margin-bottom: 6px;
}

.bs-slide__card--artist .bs-slide__stats {
    display: flex !important;
    gap: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* DJ Spotlight Card Specific Styles */
.bs-slide__card--dj .bs-slide__content {
    height: 90px; /* Fixed height for consistency */
    padding: 10px 20px; /* Reduced vertical padding */
}

.bs-slide__card--dj .bs-slide__title {
    margin-bottom: 6px;
}

.bs-slide__card--dj .bs-slide__stats {
    display: flex !important;
    gap: 20px;
    font-size: 0.85rem;
    text-decoration: none;
    color: var(--text-secondary);
}

/* News Card Specific Styles */
.bs-slide__card--news .bs-slide__title {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.95rem;
    line-height: 1.3;
    margin-bottom: 4px;
}

.bs-slide__card--news .bs-slide__stats {
    display: flex !important;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: auto;
}

/* Clip Card Specific Styles */
.bs-slide__card--clip .bs-slide__title {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.95rem;
    line-height: 1.3;
    margin-bottom: 4px;
}

.bs-slide__card--clip .bs-slide__stats {
    display: flex !important;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: auto;
}

/* Tablet Styles (max-width: 768px) */
@media (max-width: 768px) {
    .bs-slide__content {
        padding: 10px 15px; /* Reduced vertical padding */
        height: 100px; /* Fixed height for consistency */
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        overflow: hidden;
        box-sizing: border-box;
    }

    .bs-slide__title {
        font-size: 0.95rem;
        line-height: 1.2; /* Tighter line height */
        margin-bottom: 3px; /* Reduced margin */
    }

    .bs-slide__artist {
        font-size: 0.8rem;
        line-height: 1.25; /* Tighter line height */
        margin-bottom: 4px; /* Reduced margin */
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        /* Adjusted for new line height */
        max-height: 2rem; /* 2 lines × 1.25 line-height × 0.8rem */
    }

    .bs-slide__stats {
        font-size: 0.75rem;
        gap: 15px;
    }

    .bs-slide__card--dj .bs-slide__content {
    height: 80px; /* Fixed height for consistency */
    padding: 8px 16px; /* Reduced vertical padding */
}
}

/* Mobile Styles (max-width: 576px) */
@media (max-width: 576px) {
    .bs-slide__content {
        padding: 8px 12px; /* Reduced vertical padding */
        height: 85px; /* Fixed height for consistency */
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        overflow: hidden;
        box-sizing: border-box;
    }

    .bs-slide__title {
        font-size: 0.85rem; /* Slightly smaller for mobile */
        line-height: 1.2; /* Tighter line height */
        margin-bottom: 2px; /* Minimal margin */
    }

    .bs-slide__artist {
        font-size: 0.75rem;
        line-height: 1.2; /* Tighter line height */
        margin-bottom: 3px; /* Minimal margin */
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        /* Adjusted for new line height */
        max-height: 1.8rem; /* 2 lines × 1.2 line-height × 0.75rem */
    }

    .bs-slide__stats {
        font-size: 0.7rem;
        gap: 12px;
    }

    /* Ensure date stats remain visible on mobile for news + clips only */
    .bs-slide__card--news .bs-slide__stats,
    .bs-slide__card--clip .bs-slide__stats {
        display: flex !important;
        font-size: 0.7rem;
    }

    /* News/Clips swiper: 3-line title on mobile with smaller font to fit fixed height */
    .bs-slide__card--news .bs-slide__title,
    .bs-slide__card--clip .bs-slide__title {
        -webkit-line-clamp: 3;
        font-size: 0.8rem;
        line-height: 1.25;
        margin-bottom: 2px;
    }

    .bs-slide__card--dj .bs-slide__content {
        height: 65px; /* Fixed height for consistency */
        padding: 8px 12px;
}
}


/* Explicit Badge */
.explicit-badge {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 4px;
    border-radius: 2px;
    line-height: 1;
    flex-shrink: 0;
}

/* Desktop tooltip for explicit badge */
@media (hover: hover) {
    .explicit-badge {
        position: relative;
        cursor: help;
    }
    
    .explicit-badge::after {
        content: attr(data-tooltip);
        position: absolute;
        bottom: 100%;
        left: 50%;
        transform: translateX(-50%);
        background-color: rgba(0, 0, 0, 0.9);
        color: white;
        padding: 4px 8px;
        border-radius: 4px;
        font-size: 12px;
        white-space: nowrap;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
        z-index: 1000;
    }
    
    .explicit-badge:hover::after {
        opacity: 1;
    }
}

/* Global Touch Enhancements */
.slide-link {
    /* Ensure links are properly clickable on touch */
    touch-action: manipulation;
    /* Prevent 300ms delay on mobile */
    -webkit-tap-highlight-color: transparent;
}

/* Prevent zoom on fast taps */
@media (hover: none) {
    .slide-card,
    .slide-play-btn,
    .slide-link {
        -webkit-tap-highlight-color: rgba(220, 53, 69, 0.1);
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }
}

/* Link Styles */
.carousel-slide-link,
.slide-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.carousel-slide-link:hover,
.slide-link:hover {
    text-decoration: none;
    color: inherit;
}

.slide-link:hover .slide-card {
    transform: translateY(-7px);
}


