/* assets/vsl-player.css */

.vsl-player-container {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.vsl-player-wrapper {
    position: relative;
    width: 100%;
    background: #000;
}

/* Orientações do vídeo */
.vsl-player-wrapper.vsl-horizontal {
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
}

.vsl-player-wrapper.vsl-vertical {
    padding-bottom: 177.78%; /* 9:16 aspect ratio */
    max-width: 400px;
    margin: 0 auto;
}

.vsl-video-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    background: #000;
    pointer-events: none; /* Desabilita interação direta com iframe */
}

/* Overlay transparente para capturar cliques */
.vsl-click-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    cursor: pointer;
    background: transparent;
}

/* Cover Overlay (autoplay silencioso) */
.vsl-cover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 15;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.vsl-cover-content {
    text-align: center;
    color: white;
}

/* Novo botão de "unmute" */
.vsl-unmute-button {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 20px 25px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.2);
}

.vsl-unmute-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.4);
    background: rgba(255, 255, 255, 1);
}

.vsl-unmute-text {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 5px 0;
}

.vsl-volume-icon {
    margin: 10px 0;
    opacity: 0.8;
}

.vsl-volume-icon svg {
    width: 32px;
    height: 32px;
}

/* Botão de Play personalizado */
.vsl-custom-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    cursor: pointer;
    transition: all 0.3s ease;
}

.vsl-play-circle {
    width: 80px;
    height: 80px;
    background: rgba(46, 204, 113, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(46, 204, 113, 0.4);
    transition: all 0.3s ease;
    animation: vsl-pulse-green 2s infinite;
}

.vsl-custom-play-button:hover .vsl-play-circle {
    transform: scale(1.1);
    background: rgba(46, 204, 113, 1);
    box-shadow: 0 6px 25px rgba(46, 204, 113, 0.6);
}

@keyframes vsl-pulse-green {
    0% { 
        box-shadow: 0 4px 20px rgba(46, 204, 113, 0.4);
    }
    50% { 
        box-shadow: 0 4px 30px rgba(46, 204, 113, 0.7);
    }
    100% { 
        box-shadow: 0 4px 20px rgba(46, 204, 113, 0.4);
    }
}

/* Custom Controls */
.vsl-custom-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 20px 15px 15px;
    color: white;
    z-index: 8;
}

.vsl-progress-container {
    margin-bottom: 15px;
}

.vsl-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
    cursor: pointer;
}

.vsl-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b35, #f7931e);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 3px;
    position: relative;
}

.vsl-progress-fill::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 0;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    transform: translateY(-50%);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.vsl-time-display {
    font-size: 13px;
    color: rgba(255,255,255,0.9);
    font-weight: 500;
}

/* CTA Button */
.vsl-cta-container {
    position: absolute;
    z-index: 12;
}

.vsl-cta-container.vsl-button-overlay {
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
}

.vsl-cta-container.vsl-button-below {
    position: relative;
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #f7931e, #ff6b35);
}

.vsl-cta-button {
    display: inline-block;
    padding: 15px 30px;
    background: #ff6b35 !important;
    color: white !important;
    text-decoration: none !important;
    font-weight: bold;
    font-size: 16px;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
}

.vsl-cta-button,
.vsl-cta-button:visited,
.vsl-cta-button:link {
    color: white !important;
    text-decoration: none !important;
}

.vsl-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    text-decoration: none !important;
    color: white !important;
    filter: brightness(1.1);
}

.vsl-cta-button:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Estados de carregamento e pausa */
.vsl-player-paused .vsl-click-overlay {
    background: rgba(0,0,0,0.1);
}

.vsl-player-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #ff6b35;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 11;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .vsl-player-wrapper.vsl-vertical {
        max-width: 100%;
    }
    
    .vsl-cta-container.vsl-button-overlay {
        position: relative;
        top: auto;
        right: auto;
        transform: none;
        text-align: center;
        padding: 15px;
        background: rgba(0,0,0,0.8);
    }
    
    .vsl-cta-button {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    .vsl-unmute-button {
        padding: 15px 20px;
    }
    
    .vsl-unmute-text {
        font-size: 12px;
    }
    
    .vsl-volume-icon svg {
        width: 24px;
        height: 24px;
    }
    
    .vsl-custom-controls {
        padding: 15px 10px 10px;
    }
    
    .vsl-play-circle {
        width: 60px;
        height: 60px;
    }
    
    .vsl-play-circle svg {
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .vsl-unmute-text {
        font-size: 11px;
    }
    
    .vsl-volume-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .vsl-cta-button {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .vsl-play-circle {
        width: 50px;
        height: 50px;
    }
    
    .vsl-play-circle svg {
        width: 30px;
        height: 30px;
    }
}

/* Estados especiais */
.vsl-video-muted .vsl-video-iframe {
    opacity: 0.9;
}

.vsl-video-unmuted .vsl-cover-overlay {
    opacity: 0;
    pointer-events: none;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .vsl-progress-bar {
        background: #000;
        border: 1px solid #fff;
    }
    
    .vsl-progress-fill {
        background: #fff;
    }
    
    .vsl-custom-controls {
        background: #000;
        border-top: 1px solid #fff;
    }
    
    .vsl-unmute-button {
        background: #fff;
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .vsl-unmute-button,
    .vsl-cta-button,
    .vsl-progress-fill,
    .vsl-cover-overlay,
    .vsl-custom-play-button {
        transition: none;
    }
    
    @keyframes vsl-pulse-green {
        0%, 100% { 
            box-shadow: 0 4px 20px rgba(46, 204, 113, 0.4);
        }
    }
    
    .vsl-player-loading::before {
        animation: none;
    }
}

/* Print styles */
@media print {
    .vsl-player-container {
        display: none;
    }
}