/* Main slider container */
.vsp-slider-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.vsp-slider-container .swiper {
    width: 100%;
    height: auto;
    overflow: visible;
}

.vsp-slider-container .swiper-wrapper {
    display: flex;
    align-items: stretch;
}

/* Video slide styling */
.video-slide-template {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    flex-shrink: 0;
    aspect-ratio: 9/16; /* Vertical video format */
}

/* Default sizing - much smaller */
.video-slide-template {
    height: 320px; /* Smaller default height */
    width: calc(320px * 9 / 16); /* Calculate width based on 9:16 ratio */
    max-width: 180px; /* Limit maximum width */
}

/* Max height support - adjust width based on height */
.vsp-slider-container[style*="max-height"] .video-slide-template {
    height: var(--slider-height, 300px);
    width: calc(var(--slider-height, 300px) * 9 / 16);
    max-width: calc(var(--slider-height, 300px) * 9 / 16);
}

.video-slide-template video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 12px;
    background: #000;
}

/* Completely disable all native video controls - stronger for MacBook */
.video-slide-template video::-webkit-media-controls {
    display: none !important;
    -webkit-appearance: none !important;
}

.video-slide-template video::-webkit-media-controls-panel {
    display: none !important;
}

.video-slide-template video::-webkit-media-controls-play-button {
    display: none !important;
}

.video-slide-template video::-webkit-media-controls-start-playback-button {
    display: none !important;
}

.video-slide-template video::-webkit-media-controls-enclosure {
    display: none !important;
}

.video-slide-template video::-webkit-media-controls-timeline {
    display: none !important;
}

.video-slide-template video::-webkit-media-controls-current-time-display {
    display: none !important;
}

.video-slide-template video::-webkit-media-controls-time-remaining-display {
    display: none !important;
}

.video-slide-template video::-webkit-media-controls-mute-button {
    display: none !important;
}

.video-slide-template video::-webkit-media-controls-toggle-closed-captions-button {
    display: none !important;
}

.video-slide-template video::-webkit-media-controls-volume-slider {
    display: none !important;
}

.video-slide-template video::-webkit-media-controls-fullscreen-button {
    display: none !important;
}

.video-slide-template video::-webkit-media-controls-rewind-button {
    display: none !important;
}

.video-slide-template video::-webkit-media-controls-return-to-realtime-button {
    display: none !important;
}

.video-slide-template video::-webkit-media-controls-seek-back-button {
    display: none !important;
}

.video-slide-template video::-webkit-media-controls-seek-forward-button {
    display: none !important;
}

.video-slide-template video::-moz-media-controls {
    display: none !important;
}

.video-slide-template video::-ms-media-controls {
    display: none !important;
}

.video-slide-template video {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

/* Additional MacBook Safari specific hiding */
.video-slide-template video[controls] {
    -webkit-appearance: none !important;
}

.video-slide-template video:focus {
    outline: none !important;
}

/* Video controls navigation */
.video-media-nav-template {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.video-media-nav-template button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.video-media-nav-template button:hover {
    transform: scale(1.1);
}

.video-media-nav-template button svg {
    width: 34px;
    height: 34px;
    display: block;
}

/* Mute button states */
.video-media-mute svg:first-child {
    display: block; /* Show unmuted by default */
}

.video-media-mute svg:last-child {
    display: none; /* Hide muted state by default */
}

/* Play button states */
.video-media-play svg:first-child {
    display: none; /* Hide pause by default */
}

.video-media-play svg:last-child {
    display: block; /* Show play by default */
}

.video-media-play.active svg:first-child {
    display: block; /* Show pause when active */
}

.video-media-play.active svg:last-child {
    display: none; /* Hide play when active */
}

/* Video slide content */
.video-slide-content-template {
    position: absolute;
    bottom: 15px;
    left: 15px;
    right: 15px;
    z-index: 5;
}

.video-slide-title-template {
    color: white;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

/* Responsive design */
@media (max-width: 768px) {
    .video-slide-template {
        height: 300px;
        width: calc(300px * 9 / 16);
        max-width: 169px;
    }
    
    .vsp-slider-container[style*="max-height"] .video-slide-template {
        height: var(--slider-height, 300px);
        width: calc(var(--slider-height, 300px) * 9 / 16);
        max-width: calc(var(--slider-height, 300px) * 9 / 16);
    }
    
    .video-media-nav-template {
        top: 10px;
        right: 10px;
        gap: 6px;
    }
    
    .video-media-nav-template button {
        width: 28px;
        height: 28px;
    }
    
    .video-media-nav-template button svg {
        width: 28px;
        height: 28px;
    }
    
    .video-slide-content-template {
        bottom: 10px;
        left: 10px;
        right: 10px;
    }
    
    .video-slide-title-template {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .video-slide-template {
        width: calc((100vw - 32px) / 1.5);
        height: calc(((100vw - 32px) / 1.5) * 16 / 9);
        max-width: calc((100vw - 32px) / 1.5);
    }
    
    .vsp-slider-container[style*="max-height"] .video-slide-template {
        width: calc((100vw - 32px) / 1.5);
        height: calc(((100vw - 32px) / 1.5) * 16 / 9);
        max-width: calc((100vw - 32px) / 1.5);
    }
    
    .video-slide-title-template {
        font-size: 14px;
    }
}

/* Additional mobile breakpoint for very small screens */
@media (max-width: 320px) {
    .video-slide-template {
        width: calc((100vw - 24px) / 1.5);
        height: calc(((100vw - 24px) / 1.5) * 16 / 9);
        max-width: calc((100vw - 24px) / 1.5);
    }
    
    .vsp-slider-container[style*="max-height"] .video-slide-template {
        width: calc((100vw - 24px) / 1.5);
        height: calc(((100vw - 24px) / 1.5) * 16 / 9);
        max-width: calc((100vw - 24px) / 1.5);
    }
}

/* Swiper overrides */
.vsp-slider-container .swiper-slide {
    height: auto;
    width: auto !important;
}

/* Loading state */
.video-slide-template video.lazy {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-slide-template video.lazy.loaded {
    opacity: 1;
}

/* Focus states for accessibility */
.video-media-nav-template button:focus {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

/* Smooth transitions */
.video-slide-template {
    transition: transform 0.3s ease;
}

.video-slide-template:hover {
    transform: translateY(-2px);
}
