/* styles/overlay.css - Overlay controls styling */

/* Overlay Container */
.overlay-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.25) 100%);
    z-index: 50;
    display: none;
}

.overlay-container.visible {
    display: block;
}

/* Top Section */
.top-section {
    position: absolute;
    top: 0;
    right: 0;
    padding: 24px;
    z-index: 10;
}

/* Exit Button */
.exit-button {
    width: 120px;
    height: 48px;
    background-color: #CC3333;
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.exit-button:hover,
.exit-button:focus {
    background-color: #FF4444;
    transform: scale(1.05);
}

.exit-button:active {
    transform: scale(0.95);
}

/* Middle Section */
.middle-section {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    z-index: 5;
}

/* Control Containers (Brightness & Volume) */
.control-container {
    position: fixed;
    width: 45px;
    height: 300px;
    max-height: 300px;
    min-height: 225px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 23px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 9px 6px;
    top: 50%;
    z-index: 15;
    transition: background 0.3s ease, border-color 0.3s ease;
    will-change: transform;
    pointer-events: auto;
}

/* Disable all transitions when dragging */
.control-container.dragging {
    transition: none !important;
    transform: translate(0, -50%) !important;
}

/* Active state for control containers */
.control-container.active {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.6);
}

/* Default position for control containers when overlay is visible */
.overlay-container .brightness-container,
.overlay-container .volume-container {
    transform: translate(0, -50%);
}

.brightness-container {
    left: 24px;
}

.volume-container {
    right: 24px;
}

.control-container:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Control Icons */
.control-icon {
    width: 24px;
    height: 24px;
    color: #ffffff;
    margin-bottom: 9px;
    flex-shrink: 0;
}

/* Vertical Slider Container */
.vertical-slider {
    flex: 1;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 9px;
}

/* Custom Vertical Range Slider */
.vertical-range {
    -webkit-appearance: slider-vertical; /* WebKit */
    -webkit-appearance: none;
    appearance: none;
    width: 6px;
    height: 100%;
    max-height: 165px;
    background: rgba(255, 255, 255, 0.25);
    outline: none;
    border-radius: 4px;
    cursor: pointer;
    writing-mode: vertical-lr;
    direction: rtl;
}

/* Slider thumb for WebKit browsers */
.vertical-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    border: 2px solid #000000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Slider thumb for Firefox */
.vertical-range::-moz-range-thumb {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    border: 2px solid #000000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Brightness specific styling */
.brightness-container .vertical-range::-webkit-slider-thumb {
    background: #FFD700;
}

.brightness-container .vertical-range::-moz-range-thumb {
    background: #FFD700;
}

/* Volume specific styling */
.volume-container .vertical-range::-webkit-slider-thumb {
    background: #32CD32;
}

.volume-container .vertical-range::-moz-range-thumb {
    background: #32CD32;
}

/* Media Controls */
.media-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 48px;
}

/* Media Buttons */
.media-button {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Main Play/Pause Button */
.media-button.main-button {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.9);
    padding: 24px;
}

/* Media Button Hover Effects */
.media-button:hover,
.media-button:focus {
    background: rgba(255, 255, 255, 0.95);
}

.media-button.main-button:hover,
.media-button.main-button:focus {
    background: rgba(255, 255, 255, 1.0);
}

.media-button:active {
    background: rgba(255, 255, 255, 0.95);
}

/* SVG icons in media buttons */
.media-button svg {
    width: 100%;
    height: 100%;
    fill: #000000;
}

/* Bottom Section */
.bottom-section {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 16px 24px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 10;
}

/* Current Channel Name */
.current-channel-name {
    color: #ffffff;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 12px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .middle-section {
        padding: 12px 16px;
        gap: 24px;
    }

    .control-container {
        width: 38px;
        min-height: 188px;
    }

    .vertical-range {
        height: 150px;
    }

    .media-button {
        width: 50px;
        height: 50px;
        padding: 12px;
    }

    .media-button.main-button {
        width: 70px;
        height: 70px;
        padding: 16px;
    }
}

@media (max-width: 768px) {
    .top-section,
    .bottom-section {
        padding: 16px;
    }

    .middle-section {
        padding: 8px 12px;
        gap: 16px;
    }

    .control-container {
        width: 34px;
        min-height: 150px;
    }

    .control-icon {
        width: 18px;
        height: 18px;
    }

    .vertical-range {
        height: 120px;
    }
    
    .exit-button {
        width: 100px;
        height: 40px;
        font-size: 12px;
    }
    
    .current-channel-name {
        font-size: 16px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .control-container {
        border-width: 2px;
        border-color: #ffffff;
    }
    
    .vertical-range {
        background: #333333;
    }
    
    .media-button {
        border: 2px solid #ffffff;
    }
}