/* Scoped styles to prevent conflicts */
.property-video-card .video-wrapper {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(108, 96, 254, 0.3); /* var(--havenlytics-primary) */
}

.property-video-card .video-thumbnail {
    position: relative;
    height: 500px;
    overflow: hidden;
    background: linear-gradient(45deg, #0d2b42, #1a3d5c);
}

.property-video-card .video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    transition: transform var(--havenlytics-transitionTime);
}

.property-video-card .video-thumbnail:hover img {
    transform: scale(1.05);
}

/* Animated Play Button */
.property-video-card .havenlytics_property_video-btn-main {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.property-video-card .havenlytics_property_video-play-button {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--havenlytics-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--havenlytics-transitionTime);
    box-shadow: 0 0 30px rgba(108, 96, 254, 0.6);
}

.property-video-card .havenlytics_property_video-play-button:hover {
    transform: translate(-50%, -50%) scale(1.1);
    background: var(--havenlytics-btnPrimaryHover);
    box-shadow: 0 0 40px rgba(108, 96, 254, 0.8);
}

.property-video-card .havenlytics_property_video-icon {
    width: 0;
    height: 0;
    border-left: 30px solid #fff;
    border-top: 18px solid transparent;
    border-bottom: 18px solid transparent;
    position: relative;
    z-index: 2;
    left: 4px;
}

.property-video-card .havenlytics_property_video-play-button::before,
.property-video-card .havenlytics_property_video-play-button::after,
.property-video-card .havenlytics_property_video-pulse-ring {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(108, 96, 254, 0.4); /* pulse color */
    animation: havenlytics_property_video-pulse 2s ease-out infinite;
    z-index: 1;
}

.property-video-card .havenlytics_property_video-play-button::after {
    animation-delay: 0.5s;
}

.property-video-card .havenlytics_property_video-pulse-ring {
    animation-delay: 1s;
}

@keyframes havenlytics_property_video-pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* Video Popup */
.havenlytics_property_video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 20, 40, 0.98);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999999999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--havenlytics-transitionTime);
    backdrop-filter: blur(10px);
}

.havenlytics_property_video-overlay.active {
    opacity: 1;
    visibility: visible;
}

.havenlytics_property_video-container {
    width: 90%;
    max-width: 1200px;
    position: relative;
    transform: scale(0.95);
    transition: all var(--havenlytics-transitionTime);
}

.havenlytics_property_video-overlay.active .havenlytics_property_video-container {
    transform: scale(1);
}

.havenlytics_property_video-player {
    width: 100%;
    height: 80vh;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    background: #000;
}

.havenlytics_property_video-player iframe,
.havenlytics_property_video-player video {
    width: 100%;
    height: 100%;
    border: none;
}

.havenlytics_property_video-close {
    position: absolute;
    top: -30px;
    right: -30px;
    width: 60px;
    height: 60px;
    background: var(--havenlytics-alert);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--havenlytics-transitionTime);
    z-index: 10;
    border: none;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
}

.havenlytics_property_video-close:hover {
    transform: rotate(90deg) scale(1.1);
    background: #c0392b;
}

.havenlytics_property_video-close i {
    color: white;
    font-size: 30px;
}

.havenlytics_property_video-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    border: 8px solid rgba(255, 255, 255, 0.1);
    border-top: 8px solid var(--havenlytics-primary);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    animation: havenlytics_property_video-spin 1.5s linear infinite;
    display: none;
}

@keyframes havenlytics_property_video-spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 900px) {
    .property-video-card .video-thumbnail {
        height: 400px;
    }

    .havenlytics_property_video-player {
        height: 65vh;
    }
}

@media (max-width: 600px) {
    .property-video-card .video-thumbnail {
        height: 300px;
    }

    .havenlytics_property_video-player {
        height: 50vh;
    }

    .havenlytics_property_video-close {
        top: -20px;
        right: -20px;
        width: 50px;
        height: 50px;
    }

    .property-video-card .havenlytics_property_video-play-button {
        width: 80px;
        height: 80px;
    }

    .property-video-card .havenlytics_property_video-icon {
        border-left-width: 24px;
        border-top-width: 14px;
        border-bottom-width: 14px;
    }
}
