/* Site popup — Next PopupListOverlay / PopupSlideOverlay 대응 */

.site-popup-root {
    box-sizing: border-box;
    z-index: 9000;
}

.site-popup-root[hidden] {
    display: none !important;
}

/* —— 나열 (list): 딤·스크롤락 없음, 카드만 fixed —— */
.site-popup-root.is-list {
    position: static;
    inset: auto;
    display: block;
    padding: 0;
    pointer-events: none;
}

.site-popup-root.is-list .site-popup-card {
    pointer-events: auto;
}

.site-popup-root.is-list-mobile .site-popup-card--list {
    position: fixed;
    top: 10px;
    left: 50%;
    z-index: 9000;
    width: calc(100vw - 20px);
    max-width: none;
    transform: translate(-50%, 12px);
}

.site-popup-root.is-list-mobile .site-popup-card--list.is-ready {
    transform: translate(-50%, 0);
}

.site-popup-root.is-list-desktop .site-popup-card--list {
    width: min(90vw, 420px);
}

/* —— 슬라이드 (slide): 전체 딤 + 중앙 1장 —— */
.site-popup-root.is-slide {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.site-popup-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(23, 23, 23, 0.4);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.site-popup-root.is-slide.is-ready .site-popup-backdrop {
    opacity: 1;
}

.site-popup-stage {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    max-height: 100%;
}

.site-popup-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border-radius: 1rem; /* rounded-2xl */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1); /* shadow-lg */
    opacity: 0;
    transform: translateY(12px);
    transition:
        opacity 0.4s ease,
        transform 0.4s ease;
}

.site-popup-card.is-ready {
    opacity: 1;
    transform: translateY(0);
}

.site-popup-card--slide {
    width: min(90vw, 420px);
}

.site-popup-media {
    display: block;
    width: 100%;
    line-height: 0;
    background: #f5f5f5;
}

.site-popup-media img {
    display: block;
    width: 100%;
    height: auto;
}

.site-popup-media a {
    display: block;
}

.site-popup-actions {
    display: flex;
    background: #fff;
    border-top: 1px solid #e5e5e5;
}

.site-popup-actions button {
    flex: 1;
    margin: 0;
    padding: 10px 16px;
    border: 0;
    background: transparent;
    font-size: 12px;
    line-height: 1.3;
    color: #171717;
    cursor: pointer;
}

.site-popup-actions button + button {
    border-left: 1px solid #e5e5e5;
}

.site-popup-actions button:hover {
    background: #fafafa;
}

.site-popup-actions button:focus-visible {
    outline: 2px solid #171717;
    outline-offset: -2px;
}

/* Swiper (slide, 2장+) */
.site-popup-swiper {
    position: relative;
    width: 100%;
}

.site-popup-swiper .swiper-slide {
    height: auto;
}

.site-popup-nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    margin-top: -2.5rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #171717;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.site-popup-nav--prev {
    left: 0.5rem;
}

.site-popup-nav--next {
    right: 0.5rem;
}

.site-popup-pagination {
    position: absolute;
    right: 0;
    bottom: 3.25rem;
    left: 0;
    z-index: 2;
    text-align: center;
}

.popup-slide-swiper .swiper-pagination-bullet {
    background: #a3a3a3;
    opacity: 1;
}

.popup-slide-swiper .swiper-pagination-bullet-active {
    background: #171717;
}

@media (prefers-reduced-motion: reduce) {
    .site-popup-card,
    .site-popup-backdrop {
        transition: none;
    }

    .site-popup-root.is-list-mobile .site-popup-card--list {
        transform: translateX(-50%);
    }

    .site-popup-root.is-list-mobile .site-popup-card--list.is-ready {
        transform: translateX(-50%);
    }

    .site-popup-card {
        transform: none;
    }

    .site-popup-card.is-ready {
        transform: none;
    }
}
