/* triplepopup 프론트 팝업 — Apple-style clean · PLAYWEBON */
#rx-popup-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.42);
    -webkit-backdrop-filter: saturate(120%) blur(8px);
    backdrop-filter: saturate(120%) blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    animation: rxpop-fade 0.3s ease;
}
@keyframes rxpop-fade { from { opacity: 0; } to { opacity: 1; } }

.rx-popup-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: rxpop-rise 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes rxpop-rise {
    from { opacity: 0; transform: translateY(14px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* 카드 무대 — 좌우 버튼은 이 위에 absolute 로 겹쳐 올림 */
.rx-popup-stage { position: relative; }

.rx-popup-viewport {
    overflow: hidden;
    border-radius: 20px;
}

.rx-popup-track {
    display: flex;
    align-items: flex-start;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

/* 좌우 네비 버튼 — 프로스트 글래스 */
.rx-popup-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.72);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
    color: #1d1d1f;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.16);
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    padding: 0;
}
.rx-popup-nav-btn svg { display: block; }
.rx-popup-nav-btn:hover {
    background: rgba(255,255,255,0.95);
    box-shadow: 0 8px 24px rgba(0,0,0,0.22);
    transform: translateY(-50%) scale(1.06);
}
.rx-popup-nav-btn:active {
    transform: translateY(-50%) scale(0.94);
}
.rx-popup-nav-btn.prev { left: 14px; }
.rx-popup-nav-btn.next { right: 14px; }

/* 카드 */
.rx-popup-card {
    flex-shrink: 0;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 12px 40px rgba(0,0,0,0.20);
}

/* 이미지 영역 — 높이는 첨부 이미지의 원본 비율에 맞춰 JS가 지정 */
.rx-popup-media {
    position: relative;
    flex: 0 0 auto;
    width: 100%;
    overflow: hidden;
}
.rx-popup-media.clickable { cursor: pointer; }
.rx-popup-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.rx-popup-card:hover .rx-popup-media.clickable img { transform: scale(1.045); }

/* 상단 배지 (오버레이) */
.rx-popup-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 2;
    display: inline-block;
    padding: 0.4em 0.95em;
    border-radius: 980px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #fff;
    line-height: 1.5;
    white-space: nowrap;
    box-sizing: border-box;
    -webkit-backdrop-filter: saturate(140%) blur(2px);
    backdrop-filter: saturate(140%) blur(2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    transition: filter 0.25s ease, transform 0.25s ease;
}
.rx-popup-card:hover .rx-popup-badge {
    filter: brightness(0.9) saturate(1.1);
    transform: scale(1.04);
}

/* 이미지 위 카피 (에디토리얼) */
.rx-popup-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 70px 24px 24px;
    background: linear-gradient(to top, rgba(0,0,0,0.80) 0%, rgba(0,0,0,0.36) 54%, rgba(0,0,0,0) 100%);
    pointer-events: none;
    box-sizing: border-box;
}
.rx-popup-title {
    color: #fff;
    font-weight: 700;
    font-size: 24px;
    line-height: 1.24;
    letter-spacing: -0.022em;
    white-space: pre-line;
    text-shadow: 0 1px 8px rgba(0,0,0,0.38);
}
.rx-popup-sub {
    color: #f0f0f2;
    font-size: 15px;
    line-height: 1.46;
    letter-spacing: -0.012em;
    margin-top: 9px;
    white-space: pre-line;
    text-shadow: 0 1px 6px rgba(0,0,0,0.38);
}

/* 하단 CTA 버튼 (단색) */
.rx-popup-footer {
    flex-shrink: 0;
    padding: 0 20px;
    height: 54px;
    line-height: 54px;
    text-align: center;
    color: #fff;
    font-weight: 600;
    font-size: 15.5px;
    letter-spacing: -0.012em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rx-popup-footer.clickable {
    cursor: pointer;
    transition: opacity 0.2s ease;
}
.rx-popup-footer.clickable:hover { opacity: 0.9; }

/* 하단 바 */
.rx-popup-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    width: 100%;
}

.rx-popup-today-close,
.rx-popup-close-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.82);
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 500;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 2px;
    font-family: inherit;
    transition: color 0.18s ease;
}
.rx-popup-today-close:hover,
.rx-popup-close-btn:hover { color: #fff; }

/* 모바일 반응형 */
@media (max-width: 767px) {
    .rx-popup-nav-btn { width: 40px; height: 40px; }
    .rx-popup-nav-btn svg { width: 20px; height: 20px; }
    .rx-popup-nav-btn.prev { left: 10px; }
    .rx-popup-nav-btn.next { right: 10px; }
    .rx-popup-title { font-size: 21px; }
    .rx-popup-sub { font-size: 14px; }
}

/* 모션 최소화 선호 */
@media (prefers-reduced-motion: reduce) {
    #rx-popup-overlay, .rx-popup-wrap { animation: none; }
    .rx-popup-track,
    .rx-popup-media img { transition: none; }
}
