/**
 * Qianxiaoyi Popup Ad Styles
 */

/* Overlay: fullscreen darkened background */
.qx-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999999;
    justify-content: center;
    align-items: center;
}

.qx-popup-overlay.qx-popup-visible {
    display: flex;
}

/* Modal wrapper — transparent padding for close button clearance */
.qx-popup-modal {
    position: relative;
    padding: 20px;
    max-width: 95vw;
    max-height: 90vh;
    box-sizing: border-box;
}

/* Content area — the visible white card */
.qx-popup-content {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    box-sizing: border-box;
}

/* Close button — sits in the transparent padding zone */
.qx-popup-close {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    color: #ffffff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
    z-index: 1;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.qx-popup-close:hover,
.qx-popup-close:focus {
    background: rgba(0, 0, 0, 0.85);
}

.qx-popup-close:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.qx-popup-close:focus:not(:focus-visible) {
    outline: none;
}

.qx-popup-close:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .qx-popup-modal {
        padding: 16px;
        max-width: 98vw;
        max-height: 95vh;
    }

    .qx-popup-content {
        border-radius: 6px;
    }

    .qx-popup-close {
        top: 0;
        right: 0;
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
}
