/* Vaizdo failų apsauga - Frontend stiliai */

/* Saugių video konteinerių stiliai */
.vfa-secure-video {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 100%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.vfa-secure-video video {
    width: 100%;
    height: auto;
    display: block;
    outline: none;
}

/* Responsive video */
.vfa-secure-video.vfa-responsive {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    position: relative;
}

.vfa-secure-video.vfa-responsive video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Loading states */
.vfa-secure-video.vfa-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.vfa-secure-video.vfa-loading::before {
    content: 'Kraunamas video...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    z-index: 11;
    text-align: center;
}

/* Loading spinner */
.vfa-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    color: #fff;
    font-size: 14px;
}

.vfa-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #333;
    border-top: 4px solid #fff;
    border-radius: 50%;
    animation: vfa-spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes vfa-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Klaidos pranešimai */
.vfa-video-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    color: #6c757d;
    text-align: center;
    min-height: 200px;
}

.vfa-video-error .dashicons {
    font-size: 48px;
    margin-bottom: 15px;
    color: #dc3545;
}

.vfa-video-error p {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

.vfa-error-message {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 15px 20px;
    margin: 15px 0;
    color: #856404;
    font-size: 14px;
    text-align: center;
}

.vfa-error-message p {
    margin: 0;
    font-weight: 500;
}

.vfa-login-message {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 6px;
    padding: 15px 20px;
    margin: 15px 0;
    color: #0c5460;
    font-size: 14px;
    text-align: center;
}

.vfa-login-message p {
    margin: 0;
    font-weight: 500;
}

/* Papildoma apsauga */
.vfa-secure-video.vfa-protected {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    pointer-events: auto;
}

.vfa-secure-video.vfa-protected video {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    pointer-events: auto;
}

/* Slėpti video, kol neįkrautas */
.vfa-secure-video video:not([src]) {
    /* visibility: hidden; */
}

/* Hover efektai */
.vfa-secure-video:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.3s ease;
}

/* Responsive design */
@media (max-width: 768px) {
    .vfa-secure-video {
        border-radius: 4px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    .vfa-video-error {
        padding: 30px 15px;
        min-height: 150px;
    }
    
    .vfa-video-error .dashicons {
        font-size: 36px;
    }
    
    .vfa-video-error p {
        font-size: 14px;
    }
    
    .vfa-error-message,
    .vfa-login-message {
        padding: 12px 15px;
        font-size: 13px;
    }
}

/* Accessibility */
.vfa-secure-video:focus-within {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .vfa-video-error {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .vfa-error-message {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .vfa-login-message {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
}

/* Print styles */
@media print {
    .vfa-secure-video {
        border: 1px solid #000;
        background: #fff;
    }
    
    .vfa-secure-video::after {
        content: "Video turinys neprieinamas spausdinant";
        display: block;
        text-align: center;
        padding: 20px;
        font-size: 14px;
        color: #666;
    }
    
    .vfa-secure-video video {
        display: none;
    }
} 