/**
 * Fullscreen Video Modal
 * Mobile-optimized video playback experience
 */

/* Modal Overlay */
.video-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-modal-overlay.active {
    display: flex;
    opacity: 1;
    align-items: center;
    justify-content: center;
}

/* Modal Content */
.video-modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 1200px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Video Player Container */
.video-modal-player {
    position: relative;
    width: 100%;
    max-width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.video-modal-player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Close Button */
.video-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #ffffff;
    transition: all 0.2s ease;
    z-index: 10001;
    padding: 0;
    line-height: 1;
}

.video-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.video-modal-close:active {
    transform: scale(0.95);
}

/* Video Info Below Player */
.video-modal-info {
    width: 100%;
    max-width: 900px;
    margin-top: 20px;
    text-align: left;
    color: #ffffff;
}

.video-modal-info h3 {
    font-size: 20px;
    margin: 0 0 8px 0;
    color: #ffffff;
}

.video-modal-info p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    line-height: 1.5;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .video-modal-content {
        padding: 0;
        max-height: 100vh;
    }

    .video-modal-player {
        border-radius: 0;
        max-width: 100%;
        width: 100%;
    }

    .video-modal-close {
        top: env(safe-area-inset-top, 20px);
        right: 16px;
        width: 44px;
        height: 44px;
        font-size: 20px;
    }

    .video-modal-info {
        padding: 16px;
        margin-top: 0;
    }

    .video-modal-info h3 {
        font-size: 18px;
    }

    .video-modal-info p {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .video-modal-close {
        top: max(env(safe-area-inset-top), 12px);
        right: 12px;
    }
}

/* Prevent body scroll when modal is open */
body.video-modal-open {
    overflow: hidden;
}

/* Animations */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.video-modal-overlay.active .video-modal-player {
    animation: modalFadeIn 0.3s ease;
}

/* Accessibility */
.video-modal-close:focus {
    outline: 3px solid #FFB81C;
    outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .video-modal-overlay,
    .video-modal-close,
    .video-modal-player {
        transition: none;
        animation: none;
    }
}
