/*
    TLV Art Exhibition Popup — temporary promo (remove after the exhibition ends).

    To disable instantly site-wide: open js/exhibition-popup.js and set ENABLED = false.
    To remove for good: delete this file, js/exhibition-popup.js, and the two include
    lines (<link>/<script>) referencing them from each page template.
*/

.exhibition-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 54, 59, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.exhibition-popup-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

.exhibition-popup-container {
    position: relative;
    /* Subtract the overlay's own 24px padding on each side so the container
       (and the close button pinned just outside its corner) never overflows
       the viewport, even on narrow phones. min-width:0 overrides the flex
       item's default auto minimum, which would otherwise floor the container
       at the image's full intrinsic width and force it to overflow. */
    min-width: 0;
    max-width: min(560px, 100vw - 48px);
    max-height: calc(100vh - 48px);
    transform: scale(0.96);
    transition: transform 0.4s ease;
}

.exhibition-popup-overlay.is-visible .exhibition-popup-container {
    transform: scale(1);
}

.exhibition-popup-image {
    display: block;
    width: 100%;
    height: auto;
    max-height: calc(100vh - 48px);
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.exhibition-popup-close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-beige-background, #FFFAF0);
    color: var(--color-dark-green, #05363B);
    border: none;
    font-size: 22px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.exhibition-popup-close:hover {
    background: var(--color-orange, #F3A93C);
    color: var(--color-white-text, #fff);
    transform: scale(1.08);
}

@media (max-width: 480px) {
    .exhibition-popup-close {
        top: -10px;
        right: -10px;
        width: 32px;
        height: 32px;
        font-size: 19px;
    }
}
