/**
 * Secure Video Streaming - Frontend Styles
 */

.svs-player-container {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.svs-video-player {
    width: 100%;
    height: auto;
    display: block;
    outline: none;
    border-radius: 8px;
}

/* Remove botão de download (Chrome/Edge) */
.svs-video-player::-webkit-media-controls-download-button {
    display: none !important;
}

.svs-video-player::-webkit-media-controls-enclosure {
    overflow: hidden !important;
}

.svs-video-player::-internal-media-controls-download-button {
    display: none !important;
}

/* Firefox */
.svs-video-player::-moz-media-controls-download-button {
    display: none !important;
}

/* Overlay de loading */
.svs-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.svs-video-overlay p {
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    margin: 0;
    text-align: center;
    padding: 20px;
}

/* Spinner de loading */
.svs-video-overlay::before {
    content: '';
    display: block;
    position: absolute;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: svs-spin 0.8s linear infinite;
}

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

/* Previne seleção de texto sobre o vídeo */
.svs-player-container,
.svs-video-player {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Adiciona marca d'água (opcional) */
.svs-player-container::after {
    content: attr(data-watermark);
    position: absolute;
    bottom: 10px;
    right: 10px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    pointer-events: none;
    z-index: 9;
}

/* Responsivo */
@media (max-width: 768px) {
    .svs-player-container {
        border-radius: 0;
    }
}

/* Mensagem de erro */
.svs-error-message {
    padding: 20px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    color: #856404;
    margin: 20px 0;
}

.svs-error-message p {
    margin: 0;
    line-height: 1.6;
}

/* Bloqueio de screen recording (visual apenas) */
.svs-recording-warning {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(220, 53, 69, 0.95);
    color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    text-align: center;
    display: none;
}

.svs-recording-warning h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
}

.svs-recording-warning p {
    margin: 0;
    font-size: 16px;
}

/* Estilo do player quando pausado */
.svs-video-player:paused {
    opacity: 0.9;
}

/* Estilo para tela cheia */
.svs-player-container:fullscreen {
    background: #000;
}

.svs-player-container:-webkit-full-screen {
    background: #000;
}

.svs-player-container:-moz-full-screen {
    background: #000;
}

/* Remove cursor após inatividade */
.svs-player-container.hide-cursor {
    cursor: none;
}

/* Acessibilidade */
.svs-video-player:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Loading spinner alternativo */
.svs-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: svs-spin 1s ease-in-out infinite;
}

/* Placeholder antes do vídeo carregar */
.svs-video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.svs-video-placeholder::before {
    content: '▶';
    font-size: 60px;
    color: rgba(255, 255, 255, 0.7);
}

/* Estilo para thumbnail/poster */
.svs-video-player[poster] {
    object-fit: cover;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .svs-error-message {
        background: #2d2d2d;
        border-color: #555;
        color: #fff;
    }
}

/* Print styles - esconde vídeos ao imprimir */
@media print {
    .svs-player-container {
        display: none;
    }
}
