/* Lightweight Popup — popup.css */
#lwp-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
}
#lwp-overlay.lwp-active {
    display: flex;
    animation: lwpFadeIn .22s ease;
}
@keyframes lwpFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* #lwp-popup is the sole containing block — position:relative, no overflow */
#lwp-popup {
    position: relative;
    background: #fff;
    border-radius: 6px;
    width: 100%;
    box-shadow: 0 8px 40px rgba(0,0,0,.35);
    animation: lwpSlideIn .24s ease;
}
@keyframes lwpSlideIn {
    from { transform: translateY(-18px); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
}

/* ── Image ── */
#lwp-popup img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px; /* default: all corners rounded (image-only popup) */
}
#lwp-popup a {
    display: block;
    line-height: 0;
}

/* ── Image + Text: top corners only on the image, bottom corners on text ── */
#lwp-popup.lwp-type-image_html img {
    border-radius: 6px 6px 0 0;
}
#lwp-popup.lwp-type-image_html a {
    border-radius: 6px 6px 0 0;
    overflow: hidden; /* clip image to rounded top corners */
}

/* ── HTML / Text content area ── */
.lwp-html-content {
    padding: 28px 24px;
}
.lwp-html-content p:first-child { margin-top: 0; }
.lwp-html-content p:last-child  { margin-bottom: 0; }

/* ── Close button ── */
#lwp-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(0,0,0,.55);
    color: #fff;
    border: none;
    font-size: 20px;
    line-height: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    padding: 0;
    transition: background .15s;
}
#lwp-close:hover { background: rgba(0,0,0,.85); }

@media (max-width: 480px) {
    #lwp-overlay { padding: 16px; }
}
