/* static/video/css/video.css */

.video-panel {
    display: flex;
    flex-direction: column;
    background-color: #2d2d2d;
    border-radius: 8px;
    overflow: hidden;
}

.video-container {
    position: relative;
    background-color: #1a1a1a;
    border-radius: 4px;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9;
}

/* Первый контейнер (видео учителя) */
.video-container:first-of-type {
    margin-bottom: 0px;
}

/* Второй контейнер (видео ученика) */
.video-container:last-of-type {
    margin-top: 0px;
}

/* Заглушка */
.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    color: rgba(255, 255, 255, 0.3);
    font-size: 48px;
    z-index: 10;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.placeholder-text {
    font-size: 14px;
    margin-top: 8px;
}

.video-container.video-off .video-placeholder {
    opacity: 1;
    visibility: visible;
}

/* Когда видео включено, скрываем заглушку */
.video-container:not(.video-off) .video-placeholder {
    opacity: 0;
    visibility: hidden;
}

/* Видео */
.video-container video {
    position: relative;
    z-index: 5;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Панель управления */
.video-controls-panel {
    padding: 8px 10px;
    background-color: #3a3a3a;
    border-top: 1px solid #4a4a4a;
    border-bottom: 1px solid #4a4a4a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-control {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background-color: #4a4a4a;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
}

.btn-control i {
    font-size: 15px;
}

.btn-control:hover {
    background-color: #5a5a5a;
    transform: scale(1.05);
}

.btn-control.off,
.btn-control.muted {
    background-color: #dc3545;
}

.btn-control.off:hover,
.btn-control.muted:hover {
    background-color: #c82333;
}

.volume-icon {
    color: white;
    font-size: 15px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.volume-slider {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    background: linear-gradient(to right, #6352c7 0%, #6352c7 var(--volume-percent, 100%), #4a4a4a var(--volume-percent, 100%), #4a4a4a 100%);
    border-radius: 4px;
    outline: none;
    min-width: 60px;
    cursor: pointer;
}

/* Стили для кружка (Chrome, Safari, Edge) */
.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #6352c7;
    cursor: pointer;
    margin-top: -5px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* Стили для трека (Chrome, Safari, Edge) */
.volume-slider::-webkit-slider-runnable-track {
    height: 4px;
    background: transparent;
    border-radius: 4px;
}

/* Для Firefox */
.volume-slider::-moz-range-track {
    height: 4px;
    background: #4a4a4a;
    border-radius: 4px;
}

.volume-slider::-moz-range-progress {
    height: 4px;
    background: #6352c7;
    border-radius: 4px;
}

.volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #6352c7;
    cursor: pointer;
    border: 2px solid white;
}

/* Таймер урока */
.timer-display {
    color: white;
    font-family: monospace;
    font-size: 14px;
    font-weight: bold;
    background-color: #4a4a4a;
    padding: 4px 8px;
    border-radius: 20px;
    min-width: 80px;
    text-align: center;
    letter-spacing: 1px;
    margin-left: 5px;
    border: 1px solid #5a5a5a;
}

/* Уменьшаем ползунок громкости */
.volume-slider {
    width: 60px;
    min-width: 60px;
}

.btn-control:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Адаптивность */
@media (max-width: 768px) {
    .timer-display {
        font-size: 12px;
        min-width: 70px;
        padding: 3px 5px;
    }
    .btn-control {
        width: 36px;
        height: 36px;
    }
    
    .btn-control i {
        font-size: 16px;
    }
    
    .volume-icon {
        font-size: 14px;
        width: 18px;
    }
}