/* player_modals — iframe overlay modal styles.
   Extracted from the legacy cofmod plugin (hooks/all.php) with the scroll-lock
   selector corrected from body.modal-open to body.zoom-modal-open so it matches
   the class the JS actually toggles. */

/* Modal styles */
.zoom-modal {
    display: none;
    position: fixed !important;
    z-index: 2147483647 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    animation: zoomFadeIn 0.3s;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    margin: 0 !important;
    padding: 0 !important;
    overflow: auto;
    isolation: isolate;
}

@keyframes zoomFadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}

.zoom-modal-content {
    position: relative !important;
    background: transparent;
    width: 90vw;
    height: 90vh;
    max-width: 1200px;
    margin: 0;
    z-index: 2147483647 !important;
    isolation: isolate;
}

.zoom-close {
    position: absolute;
    right: 12px;
    top: -26px;
    color: #fff;
    font-size: 58px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2147483647 !important;
}

.zoom-modal-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
}

/* Trigger image styles */
.trigger-image {
    cursor: pointer;
    max-width: 100%;
    height: auto;
}

.gallery-close-button {
    position: absolute !important;
    right: 10px !important;
    bottom: -40px !important; /* Move to bottom instead of top */
    top: auto !important; /* Remove top positioning */
    color: #fff !important;
    font-size: 38px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    z-index: 2147483647 !important;
    background: rgba(0, 0, 0, 0.5) !important; /* Optional: adds a semi-transparent background */
    padding: 0 10px !important;
    border-radius: 4px !important;
}

/* Optional hover effect */
.gallery-close-button:hover {
    background: rgba(0, 0, 0, 0.8) !important;
}

/* Tab-style close button */
.tab-style-close {
    position: absolute !important;
    right: -40px !important;
    top: 0 !important;
    background: #365F9F !important;
    padding: 8px 12px !important;
    border-radius: 0 4px 4px 0 !important;
    color: #fff !important;
    cursor: pointer !important;
    font-size: 24px !important;
    line-height: 24px !important;
    height: 40px !important;
    width: 40px !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2) !important;
    transition: background 0.3s ease !important;
}

.tab-style-close:hover {
    background: #939599 !important;
}

/* Optional: Add a subtle animation */
.tab-style-close {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        right: -60px;
        opacity: 0;
    }
    to {
        right: -40px;
        opacity: 1;
    }
}

/* Body class when modal is open */
body.zoom-modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}
