/* Site Popup Modal Styles */
.site-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 36, 0.18); /* 옅은 dim — 뒷배경 그대로 보임 */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    gap: 18px;
    flex-wrap: wrap;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    overflow: hidden; /* overlay 내부 스크롤 차단 — 팝업 완전 고정 */
}

/* Lock body scroll while popup is open */
body.site-popup-open {
    overflow: hidden !important;
    /* keep current scroll position visually */
    touch-action: none;
}

.site-popup-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

.site-popup-card {
    width: 100%;
    max-width: 560px;
    flex: 0 1 560px;
    background: #ffffff;
    color: #0f1724;
    border-radius: 20px;
    border: 1px solid rgba(15, 23, 36, 0.1);
    box-shadow: 0 28px 70px rgba(15, 23, 36, 0.38);
    padding: 44px 40px 32px;
    position: relative;
    transform: translateY(12px);
    transition: transform 0.25s ease, opacity 0.25s ease;
    font-family: 'Inter', 'Noto Sans KR', sans-serif;
    display: flex;
    flex-direction: column;
}

.site-popup-overlay.is-visible .site-popup-card {
    transform: translateY(0);
}

.site-popup-card.is-closing {
    opacity: 0;
    transform: translateY(20px);
}

.site-popup-card h3 {
    margin: 0 0 14px;
    font-size: 24px;
    line-height: 1.35;
    font-weight: 700;
    color: #0f1724;
    padding-right: 36px;
}

.site-popup-card p {
    margin: 0 0 20px;
    line-height: 1.75;
    color: #475569;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 16px;
    flex-grow: 1;
}

.site-popup-card .site-popup-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2563eb, #38bdf8);
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    padding: 13px 24px;
    border-radius: 12px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    align-self: flex-start;
}

.site-popup-card .site-popup-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

.site-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(15, 23, 36, 0.06);
    color: #475569;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s ease, color 0.18s ease;
}

.site-popup-close:hover {
    background: rgba(15, 23, 36, 0.12);
    color: #0f1724;
}

.site-popup-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(15, 23, 36, 0.08);
    font-size: 12.5px;
    color: #64748b;
    flex-wrap: wrap;
}

.site-popup-dismiss {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
}

.site-popup-dismiss input {
    width: 15px;
    height: 15px;
    accent-color: #2563eb;
    cursor: pointer;
}

.site-popup-dismiss-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 8px;
    background: rgba(15, 23, 36, 0.06);
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid rgba(15, 23, 36, 0.08);
    cursor: pointer;
    transition: background 0.18s ease;
}

.site-popup-dismiss-btn:hover {
    background: rgba(15, 23, 36, 0.12);
}

@media (max-width: 900px) {
    .site-popup-overlay {
        flex-direction: column;
        overflow-y: auto;
        padding: 18px;
    }
    .site-popup-card {
        max-width: 100%;
        flex: 0 0 auto;
    }
}

@media (max-width: 480px) {
    .site-popup-card {
        padding: 26px 20px 20px;
    }

    .site-popup-card h3 {
        font-size: 18px;
    }

    .site-popup-footer {
        flex-direction: column;
        align-items: stretch;
    }
}
