/**
 * Jezweb Embed Any Video - Carousel Frontend Styles
 *
 * @package Jezweb_Embed_Any_Video
 */

/* ==========================================================================
   Carousel Wrapper
   ========================================================================== */

.jeav-carousel-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.jeav-carousel {
    width: 100%;
    padding-bottom: 40px; /* Space for pagination */
}

/* ==========================================================================
   Carousel Slides
   ========================================================================== */

.jeav-carousel .swiper-slide {
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.jeav-carousel-slide {
    width: 100%;
    max-width: 100%;
}

/* Video container within slide */
.jeav-carousel-slide .jeav-video-wrapper {
    width: 100%;
}

/* ==========================================================================
   TikTok & Instagram Embed Overrides
   ========================================================================== */

.jeav-carousel-slide blockquote.tiktok-embed,
.jeav-carousel-slide blockquote.instagram-media {
    margin: 0 auto !important;
    max-width: 100% !important;
}

/* Center Instagram embeds */
.jeav-carousel-slide .instagram-media {
    margin-left: auto !important;
    margin-right: auto !important;
}

/* ==========================================================================
   Navigation Arrows
   ========================================================================== */

.jeav-carousel-wrapper .swiper-button-next,
.jeav-carousel-wrapper .swiper-button-prev {
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.jeav-carousel-wrapper .swiper-button-next:hover,
.jeav-carousel-wrapper .swiper-button-prev:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.jeav-carousel-wrapper .swiper-button-next::after,
.jeav-carousel-wrapper .swiper-button-prev::after {
    font-size: 18px;
    font-weight: bold;
}

.jeav-carousel-wrapper .swiper-button-disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ==========================================================================
   Pagination Dots
   ========================================================================== */

.jeav-carousel-wrapper .swiper-pagination {
    bottom: 0;
    position: relative;
    margin-top: 15px;
}

.jeav-carousel-wrapper .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #ccc;
    opacity: 1;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.jeav-carousel-wrapper .swiper-pagination-bullet-active {
    background: #2271b1;
    transform: scale(1.2);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media screen and (max-width: 1024px) {
    .jeav-carousel-wrapper .swiper-button-next,
    .jeav-carousel-wrapper .swiper-button-prev {
        width: 40px;
        height: 40px;
    }

    .jeav-carousel-wrapper .swiper-button-next::after,
    .jeav-carousel-wrapper .swiper-button-prev::after {
        font-size: 16px;
    }
}

@media screen and (max-width: 768px) {
    .jeav-carousel-wrapper .swiper-button-next,
    .jeav-carousel-wrapper .swiper-button-prev {
        width: 36px;
        height: 36px;
    }

    .jeav-carousel-wrapper .swiper-button-next::after,
    .jeav-carousel-wrapper .swiper-button-prev::after {
        font-size: 14px;
    }
}

@media screen and (max-width: 480px) {
    .jeav-carousel-wrapper .swiper-button-next,
    .jeav-carousel-wrapper .swiper-button-prev {
        display: none;
    }
}

/* ==========================================================================
   Loading State
   ========================================================================== */

.jeav-carousel-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    background: #f6f7f7;
    border-radius: 4px;
}

.jeav-carousel-loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid #dcdcde;
    border-top-color: #2271b1;
    border-radius: 50%;
    animation: jeav-spin 0.8s linear infinite;
}

@keyframes jeav-spin {
    to {
        transform: rotate(360deg);
    }
}
