/**
 * Pretpot Vertical Mix Carousel Styles
 * Single column vertical scrolling layout
 */

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

.pretpot-vmix-carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    height: 60vh;
    min-height: 500px;
    display: flex;
    justify-content: center;
}

.pretpot-vmix-carousel-track {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    will-change: transform;
    transform: translateY(0);
}

.pretpot-vmix-carousel-item {
    position: relative;
    width: 300px;
    height: 420px;
    flex-shrink: 0;
    margin-bottom: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Varied heights for visual interest */
.pretpot-vmix-carousel-item:nth-child(3n+1) {
    height: 380px;
}

.pretpot-vmix-carousel-item:nth-child(3n+2) {
    height: 450px;
}

.pretpot-vmix-carousel-item:nth-child(3n+3) {
    height: 420px;
}

.pretpot-vmix-carousel-item img,
.pretpot-vmix-carousel-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pretpot-vmix-carousel-item:hover {
    transform: scale(1.02);
    z-index: 2;
}

/* Video Elements */
.pretpot-vmix-carousel-item video {
    background: #000;
}

/* Hide controls when setting is enabled */
.pretpot-vmix-carousel-wrapper.hide-controls video::-webkit-media-controls {
    display: none !important;
}

.pretpot-vmix-carousel-wrapper.hide-controls video::-webkit-media-controls-enclosure {
    display: none !important;
}

.pretpot-vmix-carousel-wrapper.hide-controls video::-webkit-media-controls-panel {
    display: none !important;
}

.pretpot-vmix-carousel-wrapper.hide-controls video {
    pointer-events: none;
}

/* YouTube/Vimeo Wrappers */
.pretpot-vmix-youtube-wrapper,
.pretpot-vmix-vimeo-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
}

.pretpot-vmix-youtube-wrapper img,
.pretpot-vmix-vimeo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Popup Overlay */
.pretpot-vmix-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.pretpot-vmix-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.pretpot-vmix-popup-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px;
}

.pretpot-vmix-popup-media {
    position: relative;
    width: 100%;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pretpot-vmix-popup-media img {
    max-width: 100%;
    max-height: 80vh;
    height: auto;
    width: auto;
    object-fit: contain;
}

.pretpot-vmix-popup-media video {
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
}

.pretpot-vmix-popup-media iframe {
    width: 100%;
    height: 70vh;
    max-width: 1200px;
    border: none;
}

.pretpot-vmix-popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    transition: background 0.3s ease;
    z-index: 10;
    padding: 0;
}

.pretpot-vmix-popup-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.pretpot-vmix-popup-close svg {
    width: 20px;
    height: 20px;
}

.pretpot-vmix-popup-button-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.pretpot-vmix-popup-button {
    display: inline-block;
    padding: 12px 32px;
    background-color: #6366f1;
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 16px;
}

.pretpot-vmix-popup-button:hover {
    background-color: #4f46e5;
    color: #ffffff;
}

/* Loading State */
.pretpot-vmix-carousel-item video[data-src] {
    background: #f3f4f6;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.pretpot-vmix-popup-overlay.active .pretpot-vmix-popup-content {
    animation: fadeIn 0.3s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .pretpot-vmix-carousel-item {
        width: 250px;
        height: 350px;
    }

    .pretpot-vmix-popup-content {
        max-width: 95vw;
        padding: 10px;
    }

    .pretpot-vmix-popup-media iframe {
        height: 50vh;
    }

    .pretpot-vmix-popup-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 480px) {
    .pretpot-vmix-carousel-item {
        width: 200px;
        height: 300px;
    }
}