/* =============================================================
   JTBC 방송 홈페이지 레이어 팝업 - PC
   ============================================================= */

/* ── 팝업 래퍼 ────────────────────────────────────────────── */
.popup-wrap {
  position: fixed;
  /* 2026-09-30 11월 6일 이후에 위치 원복
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);*/
  right: 90px;
  bottom: 70px;
  z-index: 1000;
  background-color: #fff;
  box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.1);
  overflow: hidden;
  width: 450px;
  font-family: 'Pretendard Variable', 'Pretendard', sans-serif;
  letter-spacing: 0;
}

/* ── 헤더 : JTBC 로고 (공통) ──────────────────────────────── */
.popup-header {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #fff;
  height: 46px;
  padding: 0 20px;
}

.popup-header .logo-img {
  display: block;
  width: 72px;
  height: 37px;
  margin-bottom: 18px;
}

/* ── 텍스트형 컨텐츠 영역 : 공통 패딩 ───────────────────── */
.popup-type-text .popup-content {
  padding: 30px 26px 30px;
}

/* ── 텍스트형 헤더 : 로고 + 제목 + 하단 구분선 ──────────── */
.popup-type-text .popup-header {
  flex-direction: column;
  height: auto;
  padding: 0;
}

.popup-type-text .popup-header::after {
  content: '';
  display: block;
  width: 100%;
  height: 2px;
  background-color: #2a2a2a;
  margin-top: 16px;
}

/* ── 텍스트형 제목 ────────────────────────────────────────── */
.popup-type-text .popup-title {
  font-size: 24px;
  font-weight: 700;
  color: #111;
  text-align: center;
  line-height: 1.3;
}

/* ── 이미지형 바디 ────────────────────────────────────────── */
.popup-type-image .popup-body {
  position: relative;
  padding: 0;
  line-height: 0;
}

.popup-type-image .popup-body .popup-img {
  display: block;
  width: 450px;
  height: auto;
}

/* ── 텍스트형 바디 ────────────────────────────────────────── */
.popup-type-text .popup-body {
  padding-top: 24px;
}

.popup-type-text .popup-body .popup-desc {
  font-size: 16px;
  color: #5d6064;
  line-height: 1.5;
  max-height: 168px;
  overflow: hidden;
  white-space: pre-line;
}

/* ── 자세히 보기 버튼 ──────────────────────────────── */
.popup-wrap .popup-btn-detail {
  display: block;
  width: 200px;
  height: 47px;
  color: #fff;
  background-color: #797d84;
  font-size: 15px;
  line-height: 47px;
  font-weight: 600;
  text-align: center;
}

.popup-type-image .popup-btn-detail {
  position: absolute;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  z-index: 10;
}

.popup-type-text .popup-btn-detail {
  margin: 30px auto 0;
}

/* dialog 컨테이너 포커스 시 outline 제거 (JS 포커스 이동용) */
.popup-overlay:focus,
.popup-wrap:focus {
  outline: none;
}

/* 마우스/터치 포커스 시 outline 제거, 키보드 포커스는 유지 */
.popup-type-text .popup-btn-detail:focus:not(:focus-visible) {
  outline: none;
}

/* ── 푸터 ─────────────────────────────────────────────────── */
.popup-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #fff;
  border-top: 1px solid #e4e4e4;
  padding: 16px 26px;
}

/* 오늘 하루 보지 않기 */
.popup-btn-today {
  background: none;
  border: none;
  cursor: pointer;
  color: #5d6064;
  font-size: 14px;
  line-height: 14px;
  font-weight: 500;
  padding: 0;
  font-family: 'Pretendard Variable', 'Pretendard', sans-serif;
}

/* 닫기 버튼 */
.popup-btn-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #242424;
  font-size: 14px;
  line-height: 14px;
  font-weight: 600;
  padding: 0;
  font-family: 'Pretendard Variable', 'Pretendard', sans-serif;
}

/* ── Swiper 슬라이드 ── */
.popup-wrap .ui_slider_wrap {
  overflow: hidden;
  width: 450px;
  transform: translateZ(0);
  clip-path: inset(0);
}

.popup-wrap .ui_slider_body::after {
  content: '';
  display: table;
  clear: both;
}

.popup-wrap .ui_slider_item {
  float: left;
  width: 450px;
}

.popup-wrap .ui_btn_play {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

/* ── 인디케이터 ── */
.popup-wrap .rolling-wrap {
  position: relative;
}

.popup-wrap .ui_btn_dot {
  position: absolute;
  bottom: 30px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.popup-wrap .ui_btn_dot .ui_dot a {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #d0d0d0;
  text-indent: -9999px;
  overflow: hidden;
  transition: background-color 0.2s;
}

.popup-wrap .ui_btn_dot .ui_dot.on a {
  background-color: #BB50FF;
}

/* ── 다중 팝업 전용 override ── */
.popup-wrap .ui_slider_item {
  position: relative;
  display: flex;
  flex-direction: column;
}
.popup-wrap .ui_slider_item .popup-content {
  flex: 1;
  min-height: 450px;
  max-height: 450px;
  box-sizing: border-box;
}

.popup-wrap .ui_slider_item.popup-type-text .popup-btn-detail {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
}

/* ── 버튼 bottom 위치 : 인디케이터 유무로 분기 ── */
.popup-wrap .ui_slider_item .popup-btn-detail {
  bottom: 30px;
}
.popup-wrap:has(.ui_btn_dot) .ui_slider_item .popup-btn-detail {
  bottom: 48px;
}

/* -- swiper pagination -- */
.popup-wrap .swiper-pagination {
  position: absolute;
  bottom: 25px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  z-index: 10;
}

/* ── 버튼 bottom 위치 : 인디케이터 유무로 분기 ── */
.popup-wrap .swiper-slide .popup-btn-detail {
  bottom: 30px;
}
.popup-wrap:has(.swiper-pagination) .swiper-slide .popup-btn-detail {
  bottom: 48px;
}

/* ── 텍스트형 인디케이터 여백 : 인디케이터 유무로 분기 ── */
.popup-wrap:has(.swiper-pagination) .swiper-slide.popup-type-text .popup-content {
  padding-bottom: 46px;
}

.popup-wrap .swiper-pagination-bullet {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #d0d0d0;
  opacity: 1;
  transition: background-color 0.2s;
  text-indent: -9999px;
  overflow: hidden;
}

.popup-wrap .swiper-pagination-bullet.on {
  background-color: #BB50FF;
}