/* ===================================
   Video Modal Component Styles
   =================================== */

/* Fixed Video Button - Bottom Right */
.video-modal-trigger {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, var(--base-color, #2946f3) 0%, #5a6ff8 100%);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(41, 70, 243, 0.4);
    z-index: 999;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: white;
    font-size: 28px;
}

.video-modal-trigger:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 35px rgba(41, 70, 243, 0.5);
}

.video-modal-trigger:active {
    transform: translateY(-2px) scale(1.02);
}

.video-modal-trigger i {
    position: relative;
    z-index: 2;
}

/* Pulse Ring Animation */
.pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid var(--base-color, #2946f3);
    border-radius: 50%;
    animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
    opacity: 0;
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Modal Container */
.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* Modal Overlay */
.video-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #4d6aec;
    backdrop-filter: blur(100px);
    -webkit-backdrop-filter: blur(100px);
    opacity: 0.5;
}

/* Modal Content */
.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 100px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10001;
}

.video-modal.active .video-modal-content {
    transform: scale(1);
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn {
    0% {
        transform: scale(0.9) translateY(30px);
        opacity: 0;
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

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

.video-modal-close:hover {
    background: white;
    color: var(--base-color, #2946f3);
    border-color: white;
    transform: rotate(90deg);
}

/* Modal Body */
.video-modal-body {
    position: relative;
    width: 100%;
    padding: 0;
}

/* Video Container */
.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
}

.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 20px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .video-modal-trigger {
        width: 55px;
        height: 55px;
        bottom: 20px;
        right: 20px;
        font-size: 24px;
    }

    .video-modal-content {
        width: 95%;
        max-height: 80vh;
        border-radius: 15px;
    }

    .video-modal-close {
        top: -45px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .video-container {
        padding-bottom: 75%; /* Adjusted for mobile screens */
    }
}

@media (max-width: 480px) {
    .video-modal-trigger {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
        font-size: 22px;
    }

    .video-modal-content {
        border-radius: 12px;
    }

    .video-container video {
        border-radius: 12px;
    }
}

/* Accessibility */
.video-modal-trigger:focus,
.video-modal-close:focus {
    outline: 3px solid rgba(255, 255, 255, 0.5);
    outline-offset: 3px;
}

/* Prevent Body Scroll when Modal is Open */
body.video-modal-open {
    overflow: hidden;
}

/* Loading State */
.video-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    margin: -25px 0 0 -25px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-container.loading::before {
    opacity: 1;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
