/* ── Overlay ── */
.yi-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    animation: yiFadeIn 0.25s ease;
}

/* ── Popup Box ── */
.yi-popup-box {
    background: #fff;
    padding: 28px 24px 24px;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0,0,0,.25);
    max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
    box-sizing: border-box;
    /* position + coordinates are set inline by JS */
}

/* ── Close Button ── */
.yi-popup-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 32px;
    height: 32px;
    line-height: 30px;
    text-align: center;
    font-size: 26px;
    font-weight: bold;
    cursor: pointer;
    color: #555;
    background: transparent;
    border: none;
    border-radius: 50%;
    padding: 0;
    transition: background .15s, color .15s, transform .15s;
    z-index: 1;
}
.yi-popup-close:hover {
    background: rgba(0,0,0,.08);
    color: #000;
    transform: scale(1.12);
}

/* ── Progress indicator ── */
.yi-popup-progress {
    text-align: center;
    font-size: 12px;
    color: #999;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* ── Content area ── */
.yi-popup-content {
    padding-block: 12px;
}

/* ── Responsive: on very small screens the box goes full-width ── */
@media (max-width: 480px) {
    .yi-popup-box {
        border-radius: 0 !important;
        inset: 50% auto !important;
        transform: translateY(-50%) !important;
        width: 100% !important;
        max-width: 100vw !important;
        height: max-content;
    }
}

/* ── Animation ── */
@keyframes yiFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
