/* Secure Video Player Styles */

/* Main Container */
.secure-video-container {
    position: relative;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.secure-video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Video Element */
.secure-video-element {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

/* Loading State */
.secure-video-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #000;
    color: #fff;
    z-index: 10;
}

.secure-video-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #fff;
    border-radius: 50%;
    animation: secure-video-spin 1s linear infinite;
    margin-bottom: 15px;
}

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

/* Error State */
.secure-video-error {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    color: #ff4444;
    z-index: 10;
    text-align: center;
    padding: 20px;
}

/* Controls Overlay */
.secure-video-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 20;
}

.secure-video-container:hover .secure-video-overlay {
    opacity: 1;
}

/* Control Bar */
.secure-video-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #fff;
}

.secure-video-controls button {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    font-size: 16px;
}

.secure-video-controls button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.secure-video-controls button:active {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Progress Bar */
.secure-video-progress {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.secure-video-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}

.secure-video-progress-filled {
    height: 100%;
    background: #0073aa;
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
}

.secure-video-time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: space-between;
}

/* Volume Control */
.secure-video-volume {
    display: flex;
    align-items: center;
    gap: 8px;
}

.secure-video-volume-slider {
    width: 60px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    outline: none;
}

.secure-video-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
}

.secure-video-volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Video Info */
.secure-video-info {
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.secure-video-title {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.secure-video-description {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* Video Preview */
.secure-video-preview {
    position: relative;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.secure-video-preview:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.secure-video-preview-image {
    position: relative;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.secure-video-preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.secure-video-preview:hover .secure-video-preview-overlay {
    opacity: 1;
}

.secure-video-preview-play {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #0073aa;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.secure-video-preview-play:hover {
    transform: scale(1.1);
    background: #fff;
}

.secure-video-preview-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: #fff;
}

.secure-video-preview-info h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
    font-weight: 600;
}

.secure-video-preview-duration {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

/* Video Playlist */
.secure-video-playlist {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.secure-video-playlist-player {
    background: #000;
}

.secure-video-playlist-list {
    background: #f8f9fa;
    padding: 20px;
}

.secure-video-playlist-list h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.secure-video-playlist-items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.secure-video-playlist-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.secure-video-playlist-item:hover {
    background-color: #e9ecef;
}

.secure-video-playlist-item.active {
    background-color: #0073aa;
    color: #fff;
}

.secure-video-playlist-thumb {
    width: 60px;
    height: 40px;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    margin-right: 12px;
}

.secure-video-playlist-info {
    flex: 1;
}

.secure-video-playlist-info h5 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

.secure-video-playlist-duration {
    font-size: 12px;
    color: #666;
}

.secure-video-playlist-item.active .secure-video-playlist-duration {
    color: rgba(255, 255, 255, 0.8);
}

/* Video Gallery */
.secure-video-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .secure-video-controls {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .secure-video-progress {
        order: -1;
        width: 100%;
    }
    
    .secure-video-volume-slider {
        width: 40px;
    }
    
    .secure-video-gallery {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .secure-video-overlay {
        padding: 10px;
    }
    
    .secure-video-controls button {
        padding: 6px;
        font-size: 14px;
    }
    
    .secure-video-info {
        padding: 10px 15px;
    }
    
    .secure-video-title {
        font-size: 16px;
    }
    
    .secure-video-description {
        font-size: 13px;
    }
}

/* Error Messages */
.secure-video-error,
.secure-video-login-required,
.secure-video-access-denied,
.secure-video-no-videos {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 15px;
    border-radius: 4px;
    margin: 10px 0;
    text-align: center;
}

.secure-video-error {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* Fullscreen Mode */
.secure-video-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background: #000;
}

.secure-video-container.fullscreen .secure-video-wrapper {
    width: 100%;
    height: 100%;
}

.secure-video-container.fullscreen .secure-video-element {
    width: 100%;
    height: 100%;
}

/* Theme Variations */
.secure-video-container.theme-dark {
    background: #1a1a1a;
}

.secure-video-container.theme-dark .secure-video-info {
    background: #2d2d2d;
    color: #fff;
}

.secure-video-container.theme-dark .secure-video-title {
    color: #fff;
}

.secure-video-container.theme-dark .secure-video-description {
    color: #ccc;
}

.secure-video-container.theme-light {
    background: #f8f9fa;
}

.secure-video-container.theme-light .secure-video-overlay {
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
}

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

.secure-video-progress-bar:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Animation Classes */
.secure-video-fade-in {
    animation: secure-video-fade-in 0.3s ease;
}

@keyframes secure-video-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.secure-video-slide-up {
    animation: secure-video-slide-up 0.3s ease;
}

@keyframes secure-video-slide-up {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}