/* i5_announcement_popup – modal styles */

.i5-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.72);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.i5-popup-overlay.i5-popup-visible {
    display: flex;
    opacity: 1;
}

/* Modal box */
.i5-popup-modal {
    position: relative;
    background: #fff;
    border-radius: 6px;
    max-width: 720px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
    transform: translateY(-16px);
    transition: transform 0.25s ease;
}

.i5-popup-overlay.i5-popup-visible .i5-popup-modal {
    transform: translateY(0);
}

/* Close button — always on top, floats over the image */
.i5-popup-close {
    position: absolute;
    top: 8px;
    right: 12px;
    z-index: 2;
    background: rgba(255, 255, 255, 0.85);
    border: none;
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
    color: #555;
    padding: 2px 8px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}

.i5-popup-close:hover,
.i5-popup-close:focus {
    color: #111;
    background: rgba(255, 255, 255, 1);
    outline: none;
}

/* Body: image as background, content free-positioned on top of it */
.i5-popup-body {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
}

.i5-popup-images {
    position: relative;
    width: 100%;
    line-height: 0;
}

.i5-popup-img {
    width: 100%;
    height: auto;
    display: block;
}

/* Content overlays the whole image area; position freely with inline
   styles / absolute-positioned children inside the WYSIWYG content */
.i5-popup-content {
    position: absolute;
    inset: 0;
    color: #444;
    font-size: 0.97rem;
    line-height: 1.6;
    overflow: auto;
}

.i5-popup-content p:last-child {
    margin-bottom: 0;
}

/* Responsive: ensure overlay works on small screens */
@media (max-width: 480px) {
    .i5-popup-overlay {
        padding: 8px;
    }

    .i5-popup-content {
        padding: 12px 16px 16px;
    }
}
