/* Styles for the play button */
.wp-block-gtgroup-video-modal {
    text-align: center;
    margin: 20px 0;
}

.gtgroup-video-modal-play-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    display: inline-block; /* To ensure icon width/height apply correctly */
}

.gtgroup-video-modal-play-button img {
    display: block; /* Remove extra space below img */
}

/* Modal Overlay */
.gtgroup-video-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Dark overlay */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999; /* Ensure it's on top */
    overflow-y: auto; /* Allow scrolling for larger videos/smaller screens */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

/* Modal Content */
.gtgroup-video-modal-content {
    position: relative;
    background-color: #000; /* Black background for video */
    padding: 0;
    max-width: 90%; /* Max width for modal */
    max-height: 90vh; /* Max height based on viewport height */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-width: 70%;
}

/* Video Player */
.gtgroup-video-modal-player {
    width: 100%;
    /* max-width: 1280px; */ /* Max width for video */
    height: auto;
    display: block;
}

/* Close Button */
.gtgroup-video-modal-close {
    position: absolute;
    top: .75em;
    right: .75em;
    color: #fff;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 100000; /* Ensure close button is clickable */
    width: 1.5em;
    height: 1.5em;
    background: #000;
    display: block;
    align-items: center;
    line-height: 1.75em;
    border-radius: 5rem;
}

.gtgroup-video-modal-close:hover,
.gtgroup-video-modal-close:focus {
    opacity: .75;
    text-decoration: none;
    cursor: pointer;
}

/* Prevent body scrolling when modal is open */
body.gtgroup-modal-open {
    overflow: hidden;
    padding-right: 15px !important;
}

/* Editor-specific styles (for preview in Gutenberg) */
.gtgroup-video-modal-editor-wrap {
    background: #f9f9f9;
    border: 1px dashed #ccc;
    padding: 15px;
    text-align: center;
    z-index: 100;
    position: relative;
}