/* Spotify Carousel Wrapper */
.bmwp-spotify-carousel-wrapper {
    position: relative;
    margin: 40px 0;
}

/* Carousel Container */
.bmwp-spotify-carousel {
    position: relative;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 40px) / 3);
    overflow-x: scroll;
    scroll-snap-type: x mandatory;
    gap: 20px;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.bmwp-spotify-carousel::-webkit-scrollbar {
    display: none;
}

/* Spotify Episode Card */
.bmwp-spotify-card {
    scroll-snap-align: start;
    position: relative;
    height: 279px;
    flex-shrink: 0;
    overflow: hidden;
}

.bmwp-spotify-iframe-container {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: #121212;
    border-radius: 12px;
    overflow: hidden !important;
}

.bmwp-spotify-card iframe {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    border: none;
    display: block;
}

/* Navigation Buttons */
.bmwp-spotify-nav-btn {
    align-items: center;
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--global-color-13, #fff);
    column-gap: 0.5em;
    cursor: pointer;
    display: inline-flex;
    height: 58px;
    justify-content: center;
    text-decoration: none;
    width: 58px;
    border: 1px solid var(--surface-70, rgba(255, 255, 255, 0.1));
    border-radius: 26%;
    transition: all 0.3s ease;
    z-index: 10;
}

.bmwp-spotify-nav-btn:hover,
.bmwp-spotify-nav-btn:focus {
    color: var(--surface-0);
    background-image: linear-gradient(to right, var(--contrast-alt) 0%, var(--global-color-13) 100%);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-blend-mode: normal;
    border-color: var(--surface-70, rgba(255, 255, 255, 0.2));
}

/* Disabled state for navigation buttons */
.bmwp-spotify-nav-btn.is-disabled,
.bmwp-spotify-nav-btn:disabled,
.bmwp-spotify-nav-btn[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.5;
    pointer-events: none;
}

.bmwp-spotify-nav-btn .gb-shape {
    display: flex;
    align-items: center;
    justify-content: center;
}

.bmwp-spotify-nav-btn .gb-shape svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    display: flex;
}

.bmwp-spotify-prev {
    transform: rotate(180deg);
}

/* When buttons are inside wrapper (default position) */
.bmwp-spotify-carousel-wrapper .bmwp-spotify-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.bmwp-spotify-carousel-wrapper .bmwp-spotify-prev {
    left: 10px;
    transform: translateY(-50%) rotate(180deg);
}

.bmwp-spotify-carousel-wrapper .bmwp-spotify-next {
    right: 10px;
}

.bmwp-spotify-carousel-wrapper .bmwp-spotify-prev:hover {
    transform: translateY(-50%) rotate(180deg);
}

.bmwp-spotify-carousel-wrapper .bmwp-spotify-next:hover {
    transform: translateY(-50%);
}

/* When buttons are outside (via shortcode) */
.bmwp-spotify-nav-buttons-container {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
}

/* Tablet Styles */
@media (max-width: 1024px) and (min-width: 769px) {
    .bmwp-spotify-carousel {
        grid-auto-columns: calc((100% - 40px) / 2.5);
    }

    .bmwp-spotify-card {
        height: 350px;
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .bmwp-spotify-carousel-wrapper {
        padding: 0 20px;
    }

    .bmwp-spotify-carousel {
        grid-auto-columns: calc(100% - 40px);
        gap: 15px;
    }

    .bmwp-spotify-card {
        height: 350px;
    }

    .bmwp-spotify-nav-btn {
        width: 40px;
        height: 40px;
    }

    .bmwp-spotify-nav-btn .gb-shape svg {
        width: 20px;
        height: 20px;
    }

    .bmwp-spotify-carousel-wrapper .bmwp-spotify-prev {
        left: 5px;
    }

    .bmwp-spotify-carousel-wrapper .bmwp-spotify-next {
        right: 5px;
    }
}

/* Empty state */
.bmwp-spotify-carousel-empty {
    padding: 60px 20px;
    text-align: center;
    background: #f9f9f9;
    border: 2px dashed #ddd;
    border-radius: 8px;
    color: #666;
    font-size: 16px;
}
