/* ==========================================================================
   Video Carousel CC Stylesheet
   Created by: jehoshaphatbc (Kreative Assembly)
   ========================================================================== */

.cc-video-carousel-container {
    position: relative;
    width: 100%;
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    box-sizing: border-box;
    font-family: inherit;
}

.cc-video-carousel-empty {
    padding: 20px;
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
}

/* ==================== MAIN PLAYER AREA (TOP) ==================== */
.cc-main-player-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 24px;
    border-radius: 8px;
    overflow: hidden;
    background-color: transparent;
    box-shadow: none;
}

.cc-main-player-inner {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background-size: cover;
    background-position: center;
}

.cc-main-poster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 1;
    transition: opacity 0.4s ease-in-out;
    z-index: 2;
}

.cc-main-poster.cc-fade-out {
    opacity: 0;
}

/* Center Play Button Overlay */
.cc-main-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 4;
    width: 64px;
    height: 64px;
    background-color: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: none;
    transition: transform 0.25s ease;
}

.cc-main-play-btn i {
    color: #ffffff;
    font-size: 28px;
    margin-left: 4px; /* Optically center play triangle */
}

.cc-main-play-btn:hover {
    transform: translate(-50%, -50%) scale(1.15);
}

/* Video Embed (Iframe or HTML5) */
.cc-main-video-embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.cc-main-video-embed iframe,
.cc-main-video-embed video {
    width: 100%;
    height: 100%;
    border: none;
    object-fit: cover;
}

/* Playing State: Hide Poster and Play Button */
.cc-main-player-wrapper.is-playing .cc-main-poster,
.cc-main-player-wrapper.is-playing .cc-main-play-btn {
    opacity: 0;
    pointer-events: none;
    z-index: 0;
}

.cc-main-player-wrapper.is-playing .cc-main-video-embed {
    z-index: 10;
}

/* ==================== THUMBNAIL CAROUSEL (BOTTOM) ==================== */
.cc-carousel-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 10px;
    overflow: hidden;
}

.cc-thumb-item {
    cursor: pointer;
}

.cc-thumb-box {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 ratio */
    border-radius: 6px;
    overflow: hidden;
    border: none;
    background-color: transparent;
    box-shadow: none;
}

.cc-thumb-poster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

/* Thumbnail Play Button Overlay */
.cc-thumb-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.25);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cc-thumb-play-icon {
    width: 32px;
    height: 32px;
    background-color: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cc-thumb-play-icon i {
    color: #ffffff;
    font-size: 14px;
    margin-left: 2px;
}

/* Active Thumbnail (Clean, No White Border) */
.cc-thumb-item.active .cc-thumb-box {
    border: none;
    box-shadow: none;
}

.cc-thumb-item.active .cc-thumb-play-overlay {
    background: rgba(0, 0, 0, 0.1);
}

/* Custom Play Icon Image Styling */
.cc-custom-play-img {
    width: 60%;
    height: 60%;
    object-fit: contain;
}

.cc-custom-thumb-play-img {
    width: 55%;
    height: 55%;
    object-fit: contain;
}

/* Swiper Nav Arrows */
.cc-swiper-next,
.cc-swiper-prev {
    color: #ffffff !important;
    background-color: transparent !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.cc-swiper-next:after,
.cc-swiper-prev:after {
    font-size: 16px !important;
    font-weight: bold;
}

.cc-swiper-next:hover,
.cc-swiper-prev:hover {
    transform: scale(1.15);
}

/* Custom Swiper Nav Arrow Images */
.cc-swiper-next.has-custom-img:after,
.cc-swiper-prev.has-custom-img:after {
    display: none !important;
}

.cc-swiper-next.has-custom-img,
.cc-swiper-prev.has-custom-img {
    background: transparent !important;
    border-radius: 0;
    width: 40px !important;
    height: 40px !important;
}

.cc-swiper-next.has-custom-img img,
.cc-swiper-prev.has-custom-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.cc-swiper-next.has-custom-img:hover img,
.cc-swiper-prev.has-custom-img:hover img {
    transform: scale(1.15);
}

/* ==================== MOBILE CAROUSEL LAYOUT (<= 768px ONLY) ==================== */
.cc-mobile-carousel-wrapper {
    display: none !important;
}

@media (max-width: 768px) {
    .cc-video-carousel-container {
        padding: 0;
        overflow: hidden;
    }

    /* Hide Desktop/Tablet Dual Player Layout on Mobile */
    .cc-main-player-wrapper,
    .cc-carousel-wrapper {
        display: none !important;
    }

    /* Show Mobile Direct Video Carousel */
    .cc-mobile-carousel-wrapper {
        display: block !important;
        position: relative;
        width: 100%;
        overflow: hidden;
    }

    .cc-mobile-card {
        position: relative;
        width: 100%;
        border-radius: 8px;
        overflow: hidden;
        background-color: transparent;
    }

    .cc-mobile-card-inner {
        position: relative;
        width: 100%;
        padding-top: 56.25%; /* 16:9 Aspect Ratio */
        background-size: cover;
        background-position: center;
    }

    .cc-mobile-poster {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-size: cover;
        background-position: center;
        z-index: 2;
        transition: opacity 0.3s ease;
    }

    .cc-mobile-play-btn {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 4;
        width: 56px;
        height: 56px;
        background-color: transparent;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: transform 0.25s ease, opacity 0.3s ease;
    }

    .cc-mobile-play-btn i {
        color: #ffffff;
        font-size: 22px;
        margin-left: 3px;
    }

    .cc-mobile-play-btn:hover {
        transform: translate(-50%, -50%) scale(1.12);
    }

    .cc-mobile-video-embed {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1;
    }

    .cc-mobile-video-embed iframe,
    .cc-mobile-video-embed video {
        width: 100%;
        height: 100%;
        border: none;
        object-fit: cover;
    }

    /* Playing State for Mobile Slide */
    .cc-mobile-slide.is-playing .cc-mobile-poster {
        opacity: 0;
        pointer-events: none;
        z-index: 0;
    }

    .cc-mobile-slide.is-playing .cc-mobile-play-btn {
        opacity: 0;
        pointer-events: auto;
        z-index: 5;
    }

    .cc-mobile-slide.is-playing .cc-mobile-video-embed {
        z-index: 1;
    }

    /* Mobile Dot Pagination (Pill active shape matching screenshot) */
    .cc-mobile-pagination {
        position: relative !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        margin-top: 18px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        transform: none !important;
        z-index: 5 !important;
    }

    .cc-mobile-pagination .swiper-pagination-bullet {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background-color: rgba(255, 255, 255, 0.4);
        opacity: 1 !important;
        margin: 0 !important;
        cursor: pointer;
        transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1), height 0.35s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.35s ease, border-radius 0.35s ease !important;
    }

    .cc-mobile-pagination .swiper-pagination-bullet-active {
        width: 28px !important;
        height: 10px !important;
        border-radius: 10px !important;
        background-color: #E6BE78 !important;
    }
}


