/* Commercial Popup — overlay pubblico */
.cp-ad-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.cp-ad-overlay.cp-open {
    opacity: 1;
    visibility: visible;
}

.cp-ad-dialog {
    position: relative;
    width: min(92vw, 560px);
    max-height: min(88vh, 720px);
    overflow: auto;
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.cp-ad-close {
    position: absolute;
    top: 0.35rem;
    right: 0.45rem;
    z-index: 2;
    width: 2.25rem;
    height: 2.25rem;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.06);
    color: #212529;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.cp-ad-close:hover,
.cp-ad-close:focus {
    background: rgba(0, 0, 0, 0.12);
    outline: none;
    outline-offset: 2px;
}


.cp-ad-content img {
    max-width: 100%;
    height: auto;
}

html.cp-popup-open,
body.cp-popup-open {
    overflow: hidden;
    overscroll-behavior: none;
}

body.cp-popup-open {
    position: fixed;
    width: 100%;
    left: 0;
    right: 0;
}

@media (prefers-reduced-motion: reduce) {
    .cp-ad-overlay {
        transition: none;
    }
}
