/* Video Modal Styles */

/* Expandable video wrapper */
.feature-video-wrapper--expandable {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.feature-video-wrapper--expandable:hover {
    transform: scale(1.01);
}

.feature-video-wrapper--expandable .feature-video-container {
    position: relative;
}

/* Expand hint overlay */
.feature-video-expand-hint {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    color: white;
    border-radius: var(--radius-md, 0.5rem);
    font-size: 0.875rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.feature-video-wrapper--expandable:hover .feature-video-expand-hint {
    opacity: 1;
}

.feature-video-expand-hint svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Modal overlay */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 2rem;
}

.video-modal.is-active {
    opacity: 1;
    visibility: visible;
}

/* Modal content */
.video-modal__content {
    position: relative;
    width: 100%;
    max-width: 1400px;
    max-height: 90vh;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.video-modal.is-active .video-modal__content {
    transform: scale(1);
}

.video-modal__video-container {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: var(--radius-xl, 1rem);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.video-modal__video {
    display: block;
    width: 100%;
    height: auto;
    max-height: 85vh;
    object-fit: contain;
}

/* Close button */
.video-modal__close {
    position: absolute;
    top: -3rem;
    right: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.video-modal__close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.video-modal__close svg {
    width: 24px;
    height: 24px;
}

/* Video controls hint */
.video-modal__controls-hint {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.75rem 1.5rem;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    color: white;
    border-radius: var(--radius-md, 0.5rem);
    font-size: 0.875rem;
    opacity: 0;
    animation: fadeInOut 3s ease-in-out;
    pointer-events: none;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; }
    10%, 90% { opacity: 1; }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .video-modal {
        padding: 1rem;
    }
    
    .video-modal__close {
        top: -2.5rem;
        width: 40px;
        height: 40px;
    }
    
    .video-modal__close svg {
        width: 20px;
        height: 20px;
    }
    
    .feature-video-expand-hint span {
        display: none;
    }
    
    .feature-video-expand-hint {
        padding: 0.5rem;
        bottom: 0.5rem;
        right: 0.5rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .video-modal,
    .video-modal__content,
    .feature-video-wrapper--expandable,
    .video-modal__close {
        transition: none;
    }
    
    .video-modal__controls-hint {
        animation: none;
        opacity: 1;
    }
}

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