/**
 * Neatsvor Video Slider Styles
 * Custom styling for the video slider component with 9:16 aspect ratio
 */

/* ==================================================
   Video Slider Wrapper
   ================================================== */

.neatsvor-video-slider-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: -50px auto;
    overflow: hidden;
    padding-top: 90px;
    padding-bottom: 90px;
}

.neatsvor-video-slider {
    position: relative;
    width: 100%;
    height: auto;
    overflow: visible;
}

/* ==================================================
   Swiper Overrides for Video Slider
   ================================================== */

.neatsvor-video-slider .swiper-wrapper {
    align-items: center;
    display: flex;
}

.neatsvor-video-slider .swiper-slide {
    width: calc((100% - 60px) / 4) !important;
    max-width: 360px;
    min-width: 200px;
    height: auto;
    opacity: 0.5;
    transform: scale(0.85);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.neatsvor-video-slider .swiper-slide-active {
    opacity: 1;
    transform: scale(1);
    z-index: 10;
}

.neatsvor-video-slider .swiper-slide.is-transitioning {
    transform: scale(0.85);
}

/* ==================================================
   Video Slide Inner Container
   ================================================== */

.neatsvor-video-slide {
    position: relative;
    display: flex;
    flex-direction: column;
}

.video-slide-inner {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.swiper-slide-active .video-slide-inner {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* ==================================================
   Video Container (9:16 Aspect Ratio)
   ================================================== */

.video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    background: #000;
    overflow: hidden;
}

.video-element {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

/* External video wrapper (YouTube/Vimeo) */
.video-external-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.video-external-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-poster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 10;
    transition: transform 0.3s ease, opacity 0.3s ease;
    padding: 0;
}

.video-play-btn:hover {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 0.9;
}

.video-play-btn svg {
    display: block;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}

/* ==================================================
   Video Unmute Button
   ================================================== */

.video-unmute-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: all 0.3s ease;
    padding: 0;
    margin: 0 !important;
}

.video-unmute-btn:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

.video-unmute-btn img {
    width: 32px;
    height: 32px;
    display: block;
    transition: opacity 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.video-unmute-btn .icon-unmuted {
    display: none;
}

.video-unmute-btn.is-unmuted .icon-muted {
    display: none;
}

.video-unmute-btn.is-unmuted .icon-unmuted {
    display: block;
}

/* ==================================================
   Video Slide Content (Text Overlay)
   ================================================== */

.video-slide-content {
    position: absolute;
    bottom: 80px;
    left: 20px;
    right: 20px;
    z-index: 15;
    color: #fff;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.video-slide-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 10px;
    line-height: 1.3;
}

.video-slide-description {
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 15px;
    opacity: 0.95;
}

.video-slide-button {
    display: inline-block;
    padding: 12px 24px;
    background: #fff;
    color: #000;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.video-slide-button:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* ==================================================
   Navigation Arrows
   ================================================== */

.neatsvor-video-slider .swiper-button-prev,
.neatsvor-video-slider .swiper-button-next {
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    color: #000;
    transition: all 0.3s ease;
}

.neatsvor-video-slider .swiper-button-prev:hover,
.neatsvor-video-slider .swiper-button-next:hover {
    background: #fff;
    transform: scale(1.1);
}

.neatsvor-video-slider .swiper-button-prev::after,
.neatsvor-video-slider .swiper-button-next::after {
    font-size: 14px;
    font-weight: 700;
}

/* Navigation Position: Outside */
.neatsvor-video-slider.nav-outside .swiper-button-prev {
    left: -60px;
}

.neatsvor-video-slider.nav-outside .swiper-button-next {
    right: -60px;
}

/* Navigation Color: Dark */
.neatsvor-video-slider.nav-dark .swiper-button-prev,
.neatsvor-video-slider.nav-dark .swiper-button-next {
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
}

.neatsvor-video-slider.nav-dark .swiper-button-prev:hover,
.neatsvor-video-slider.nav-dark .swiper-button-next:hover {
    background: rgba(0, 0, 0, 0.9);
}

/* Navigation Always Visible */
.neatsvor-video-slider.nav-always-visible .swiper-button-prev,
.neatsvor-video-slider.nav-always-visible .swiper-button-next {
    opacity: 1 !important;
}

/* ==================================================
   Pagination Bullets
   ================================================== */

.neatsvor-video-slider .swiper-pagination {
    bottom: 10px !important;
    z-index: 20;
}

.neatsvor-video-slider .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
    transition: all 0.3s ease;
}

.neatsvor-video-slider .swiper-pagination-bullet-active {
    background: #fff;
    transform: scale(1.3);
}

/* Bullet Style: Circle */
.neatsvor-video-slider.bullets-circle .swiper-pagination-bullet {
    border-radius: 50%;
}

/* Bullet Style: Square */
.neatsvor-video-slider.bullets-square .swiper-pagination-bullet {
    border-radius: 2px;
}

/* Bullet Style: Dashed Space */
.neatsvor-video-slider.bullets-dashes-spaced .swiper-pagination-bullet {
    width: 20px;
    height: 4px;
    border-radius: 2px;
    margin: 0 6px !important;
}

/* ==================================================
   Responsive Design
   ================================================== */

@media (max-width: 1024px) {
    .neatsvor-video-slider .swiper-slide {
        width: calc((100% - 45px) / 3) !important;
        max-width: 300px;
    }
    
    .video-slide-title {
        font-size: 20px;
    }
    
    .video-slide-description {
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .neatsvor-video-slider .swiper-slide {
        width: calc((100% - 30px) / 2) !important;
        max-width: 250px;
    }
    
    .video-unmute-btn {
        width: 28px;
        height: 28px;
        top: 15px;
        right: 15px;
    }
    
    .video-unmute-btn img {
        width: 28px;
        height: 28px;
    }
    
    .video-slide-content {
        bottom: 60px;
        left: 15px;
        right: 15px;
    }
    
    .video-slide-title {
        font-size: 18px;
    }
    
    .video-slide-description {
        font-size: 12px;
    }
    
    .video-slide-button {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .neatsvor-video-slider .swiper-button-prev,
    .neatsvor-video-slider .swiper-button-next {
        width: 40px;
        height: 40px;
    }
    
    .neatsvor-video-slider .swiper-button-prev::after,
    .neatsvor-video-slider .swiper-button-next::after {
        font-size: 16px;
    }
    
    /* Hide outside navigation on mobile */
    .neatsvor-video-slider.nav-outside .swiper-button-prev,
    .neatsvor-video-slider.nav-outside .swiper-button-next {
        left: 10px;
        right: 10px;
    }
}

@media (max-width: 480px) {
    .neatsvor-video-slider .swiper-slide {
        width: calc(100% - 40px) !important;
        max-width: 280px;
        min-width: 180px;
    }
    
    .video-slide-inner {
        border-radius: 8px;
    }
    
    .video-slide-content {
        bottom: 50px;
    }
    
    .video-slide-title {
        font-size: 16px;
    }
}

/* ==================================================
   Loading & Performance
   ================================================== */

.neatsvor-video-slider-wrapper.loading {
    min-height: 640px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.neatsvor-video-slider-wrapper.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Video optimization for better performance */
.video-element {
    will-change: transform;
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}
