/* ============================================================
   Popup Image Shortcode - popup-image.css
   ============================================================ */

/* Trigger (the clickable element) */
.popup-image-trigger {
    cursor: pointer;
    display: inline-block;
}

/* Full-screen overlay */
.popup-image-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: popupFadeIn 0.2s ease;
}

.popup-image-overlay.is-active {
    display: flex;
}

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

/* Image container */
.popup-image-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: popupSlideIn 0.2s ease;
}

@keyframes popupSlideIn {
    from { transform: scale(0.94); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

.popup-image-container img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    display: block;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

/* Close button */
.popup-image-close {
    position: absolute;
    top: -42px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 38px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    z-index: 1;
    transition: opacity 0.2s, transform 0.2s;
    opacity: 0.85;
}

.popup-image-close:hover {
    opacity: 1;
    transform: scale(1.15);
}

@media (max-width: 600px) {
    .popup-image-close {
        top: -36px;
        font-size: 30px;
    }
}
