/* ==========================================================================
   POPUP — Global modal shown once per 24h via cookie
   Scoped to .ba-popup-* classes to avoid conflicts.
   ========================================================================== */

/* Backdrop */
.ba-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

/* Modal box */
.ba-popup-modal {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    max-width: 760px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(85, 69, 150, 0.25);
    transform: translateY(16px);
    transition: transform 0.3s ease;
}

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

/* Close button */
.ba-popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    font-size: 20px;
    line-height: 1;
    color: #554596;
    transition: background 0.2s ease, transform 0.2s ease;
    padding: 0;
}

.ba-popup-close:hover {
    background: #ffffff;
    transform: scale(1.1);
}

/* Image content */
.ba-popup-image-wrap {
    display: block;
    line-height: 0;
}

.ba-popup-image-wrap img {
    width: 100%;
    height: auto;
    display: block;
}

/* HTML content */
.ba-popup-html-wrap {
    padding: 32px;
    font-family: 'Bariol', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #000000;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 600px) {
    .ba-popup-overlay {
        padding: 8px;
    }

    .ba-popup-modal {
        max-width: 100%;
        max-height: 95vh;
        border-radius: 8px;
    }

    .ba-popup-html-wrap {
        padding: 20px 16px;
    }
}
