/* Custom VSL Builder V3 - Thin Progress Bar, Bottom-Left Controls */

.cvb-vsl-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    background: #000;
    overflow: hidden;
}

/* Preview Screen (Before Play) */
.cvb-preview-screen {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
    cursor: pointer;
}

.cvb-preview-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cvb-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    transition: background 0.3s ease;
}

.cvb-preview-screen:hover .cvb-play-overlay {
    background: rgba(0, 0, 0, 0.6);
}

.cvb-play-button {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255, 0, 0, 0.9);
    border: 4px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.cvb-play-button:hover {
    transform: scale(1.1);
    background: rgba(255, 0, 0, 1);
}

.cvb-play-button::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 30px solid #fff;
    border-top: 20px solid transparent;
    border-bottom: 20px solid transparent;
    margin-left: 8px;
}

.cvb-play-text {
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Animated GIF Overlay */
.cvb-gif-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 200px;
    pointer-events: none;
}

/* Video Container */
.cvb-video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #000;
    display: none;
}

.cvb-video-wrapper.active {
    display: block;
}

.cvb-video-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* V3 CONTROLS - Bottom Left, Auto-Hide */
.cvb-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 30px 20px 15px;
    opacity: 0.5; /* DEBUG: Temporarily visible for testing */
    transition: opacity 0.3s ease;
    pointer-events: all; /* DEBUG: Always enabled for testing */
    z-index: 10;
}

/* Show controls on hover OR when visible class is added */
.cvb-video-wrapper:hover .cvb-controls,
.cvb-controls.visible {
    opacity: 1;
    pointer-events: all;
}

.cvb-controls-inner {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* V3 PROGRESS BAR - Thin 3px Red Line */
.cvb-progress-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.4); /* DEBUG: More visible for testing */
    cursor: default;
    pointer-events: none;
    z-index: 20; /* Always on top, above controls */
}

.cvb-progress-bar {
    height: 100%;
    background: #ff0000;
    width: 0%;
    transition: width 0.1s linear;
}

/* V3 PAUSE BUTTON - Bottom Left Only */
.cvb-pause-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.cvb-pause-btn:hover {
    background: #fff;
    transform: scale(1.05);
}

/* Pause Icon */
.cvb-pause-btn.playing::before {
    content: '';
    width: 4px;
    height: 16px;
    background: #000;
    display: inline-block;
    margin-right: 4px;
}

.cvb-pause-btn.playing::after {
    content: '';
    width: 4px;
    height: 16px;
    background: #000;
    display: inline-block;
}

/* Play Icon */
.cvb-pause-btn.paused::before {
    content: '';
    width: 0;
    height: 0;
    border-left: 12px solid #000;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    margin-left: 3px;
}

/* NO TIME DISPLAY IN V3 */
.cvb-time-display {
    display: none !important;
}

/* Unmute Prompt */
.cvb-unmute-prompt {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 0, 0, 0.95);
    color: #fff;
    padding: 20px 40px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    z-index: 100;
    animation: bounce 1s infinite;
    display: none;
}

.cvb-unmute-prompt.active {
    display: block;
}

@keyframes bounce {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.05); }
}

/* Timed Reveal Elements */
.cvb-reveal-element {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.cvb-reveal-element.revealed {
    opacity: 1;
    pointer-events: all;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .cvb-play-button {
        width: 80px;
        height: 80px;
    }
    
    .cvb-play-button::after {
        border-left: 25px solid #fff;
        border-top: 15px solid transparent;
        border-bottom: 15px solid transparent;
    }
    
    .cvb-play-text {
        font-size: 14px;
    }
    
    .cvb-controls {
        padding: 20px 10px 10px;
    }
    
    .cvb-pause-btn {
        width: 35px;
        height: 35px;
    }
    
    .cvb-unmute-prompt {
        font-size: 14px;
        padding: 15px 30px;
    }
}

/* Loading State */
.cvb-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 18px;
}

/* Hidden Class */
.cvb-hidden {
    display: none !important;
}
