/* BWITIX Pop-up Ad — overlay + container + animation */

.bwitix-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    animation: popupFadeIn 0.3s var(--ease, cubic-bezier(0.22, 1, 0.36, 1)) forwards;
}

.bwitix-popup-container {
    position: relative;
    max-width: 560px;
    width: 90vw;
    max-height: 85vh;
    overflow: hidden;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.32), 0 8px 24px rgba(0, 0, 0, 0.18);
    transform: scale(0.92);
    animation: popupScaleIn 0.36s var(--ease, cubic-bezier(0.22, 1, 0.36, 1)) forwards;
    animation-delay: 0.06s;
}

.bwitix-popup-image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 85vh;
    object-fit: contain;
    cursor: pointer;
    user-select: none;
    -webkit-user-drag: none;
}

.bwitix-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s ease, transform 0.18s ease;
}

.bwitix-popup-close:hover {
    background: rgba(0, 0, 0, 0.78);
    transform: scale(1.06);
}

.bwitix-popup-close:active {
    transform: scale(0.96);
}

.bwitix-popup-close i {
    font-size: 20px;
    line-height: 1;
}

body.bwitix-popup-open {
    overflow: hidden !important;
}

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

@keyframes popupScaleIn {
    to { transform: scale(1); }
}

@media (max-width: 600px) {
    .bwitix-popup-overlay {
        padding: 16px;
    }
    .bwitix-popup-container {
        width: 94vw;
        max-height: 82vh;
        border-radius: 14px;
    }
    .bwitix-popup-image {
        max-height: 82vh;
    }
    .bwitix-popup-close {
        width: 34px;
        height: 34px;
        top: 8px;
        right: 8px;
    }
}
