/**
 * QuickTime-style Video Player CSS
 * Styles for the custom video player in preview windows
 */

/* Video Preview Window */
.preview-window.video-preview .preview-body {
    padding: 0;
    overflow: hidden;
    background-color: #000;
    border-radius: 0 0 12px 12px;
}

.preview-window.video-preview .window-content {
    background-color: #000;
    padding: 0;
}

/* Video Container */
.video-container {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: #000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden; /* Prevent content from spilling outside */
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Maintain aspect ratio */
}

/* QuickTime Controls */
.quicktime-controls {
    position: absolute;
    bottom: 1rem;
    width: calc(100% - 8rem);
    background-color: rgba(40, 40, 40, 0.8);
    padding: 12px;
    box-sizing: border-box;
    transition: opacity 0.3s ease;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: 0.5rem;
    margin: 0 4rem;
}

/* Controls Row */
.qt-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 8px;
}

/* Timeline Row */
.qt-timeline-container {
    width: 100%;
    display: flex;
    align-items: center;
    margin-top: 8px;
}

.qt-timeline {
    position: relative;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    flex: 1;
    cursor: pointer;
    overflow: hidden;
}

.qt-progress {
    position: absolute;
    height: 100%;
    background-color: #fff;
    border-radius: 2px;
    width: 0;
}

.qt-scrubber {
    position: absolute;
    width: 12px;
    height: 12px;
    background-color: #fff;
    border-radius: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    left: 0;
    cursor: pointer;
}

/* Control Buttons */
.qt-buttons {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 10px;
}

.qt-left-controls, .qt-center-controls, .qt-right-controls {
    display: flex;
    align-items: center;
}

.qt-play-pause, .qt-prev, .qt-next, .qt-fullscreen, .qt-volume-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 5px;
    color: #fff !important;
}

.qt-center-controls button {
    width: 36px;
    height: 36px;
}

.qt-play-pause {
    width: 40px;
    height: 40px;
}
.qt-play-pause svg, .qt-prev svg, .qt-next svg {
    fill: #fff !important;
    width: 24px;
    height: 24px;
}

.qt-time {
    color: #fff;
    font-size: 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0 10px;
    min-width: 80px;
    text-align: center;
    font-weight: 300;
}

.qt-fullscreen {
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 30px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
	    color: #fff;
}

.qt-fullscreen svg {
    fill: #fff;
    width: 16px;
    height: 16px;
}

/* Volume Control */
.qt-volume {
    display: flex;
    align-items: center;
    margin-left: 10px;
}

.qt-volume-button {
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 30px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.qt-volume-button svg {
    fill: #fff !important;
    stroke: none;
    width: 20px;
    height: 20px;
}

.qt-volume-slider {
    position: relative;
    width: 60px;
    height: 4px;
    background-color: rgba(255,255,255,0.3);
    border-radius: 2px;
    margin-left: 5px;
    cursor: pointer;
}

.qt-volume-track {
    position: absolute;
    height: 100%;
    background-color: #fff;
    width: 50%; /* Default volume */
}

.qt-volume-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background-color: #fff;
    border-radius: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    left: 50%; /* Default volume */
    cursor: pointer;
}

/* Fullscreen Mode */
.video-container:fullscreen {
    width: 100vw;
    height: 100vh;
    background-color: #000;
}

.video-container:fullscreen video {
    width: 100%;
    height: 100%;
    max-height: calc(100% - 40px);
}

/* Mobile Styles */
@media (max-width: 767px) {
    .qt-volume-slider {
        display: none;
    }
    
    .qt-time {
        font-size: 10px;
    }
    
    .qt-buttons {
        height: 20px;
    }
    
    .qt-timeline {
        height: 6px;
    }
    
    .qt-scrubber {
        width: 12px;
        height: 12px;
    }
}
