/* Container styles */
.blinds-installment-video-container {
    position: relative;
    width: 100%;
    height: auto;
    margin: 0 auto;
}
/* Thumbnail styles */
.blinds-installment-video-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* This maintains 16:9 aspect ratio */
    overflow: hidden;
    cursor: pointer;
}


.blinds-installment-video-thumbnail-image {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    min-height: 100% !important; /* Force minimum height */
    opacity: 1 !important; /* Ensure visibility */
    display: block !important; /* Prevent display issues */
}


/* Play button styles */
.blinds-installment-video-play-button-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.blinds-installment-video-thumbnail .blinds-installment-video-play-button {
    position: static;
    width: 115px;
    height: auto;
    object-fit: contain;
    transition: transform 0.2s ease-in-out;
}

.blinds-installment-video-thumbnail:hover .blinds-installment-video-play-button {
    transform: scale(1.1);
}

/* Modal styles */
.blinds-installment-video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.blinds-installment-video-modal.active {
    display: block;
}

.blinds-installment-video-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.blinds-installment-video-modal.active .blinds-installment-video-modal-overlay {
    opacity: 1;
}

.blinds-installment-video-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 90%;
    max-width: 800px;
    opacity: 0;
    transition: all 0.3s ease-in-out;
}

.blinds-installment-video-modal.active .blinds-installment-video-modal-content {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* Video wrapper styles */
.blinds-installment-video-modal-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background-color: #000;
    border-radius: 10px;
}

.blinds-installment-video-modal-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.blinds-installment-video-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
}

.blinds-installment-video-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Close button styles */
.blinds-installment-video-modal-close {
    position: absolute;
    top: -30px;
    left: -30px;
    width: 68px;
    height: 68px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    z-index: 1;
    transition: transform 0.3s ease;
}

.blinds-installment-video-modal-close:hover {
    transform: rotate(180deg);
    background: none;
}

.blinds-installment-video-modal-close svg {
    width: 100%;
    height: 100%;
}

/* Responsive styles */
@media screen and (max-width: 767px) {
    .blinds-installment-video-thumbnail {
        width: 100%;
    }

    .blinds-installment-video-modal-close {
        width: 56px;
        height: 56px;
        left: -10px;
        top: -15px;
    }
}

/* Elementor editor specific styles */
.elementor-editor-active .blinds-installment-video-modal {
    display: none !important;
}

/* Support for dark mode */
@media (prefers-color-scheme: dark) {
    .blinds-installment-video-modal-overlay {
        background-color: rgba(0, 0, 0, 0.8);
    }
}

/* Fix for iOS Safari */
@supports (-webkit-touch-callout: none) {
    .blinds-installment-video-modal-wrapper {
        -webkit-overflow-scrolling: touch;
    }
}