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

/* 팝업 노출 시 뒷배경 스크롤 방지 */
body.is-popup-open {
  overflow: hidden;
}

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

/* ── 딤드 오버레이 ────────────────────────────────────────── */
.popup-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── 팝업 래퍼 ────────────────────────────────────────────── */
.popup-wrap {
  position: relative;
  background-color: #fff;
  box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.1);
  overflow: hidden;
  width: calc(100vw - 40px);
  max-width: 330px;
  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 16px;
}

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

/* ── 텍스트형 컨텐츠 영역 : 공통 패딩 ───────────────────── */
.popup-type-text .popup-content {
  width: 100%;
  box-sizing: border-box;
  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: 22px;/*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: 100%;
  height: auto;
}

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

.popup-type-text .popup-body .popup-desc {
  font-size: 15px;/*16px;*/
  color: #5d6064;
  line-height: 1.5;
  max-height: 168px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 7;
  text-overflow: ellipsis;
  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;
}

/* ── 푸터 ─────────────────────────────────────────────────── */
.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 .swiper-wrapper {
  align-items: flex-start;
}
.popup-wrap .swiper-slide {
  height: auto;
}

/* 슬라이드 2개 이상일 때만 비활성 슬라이드 높이 제거 */
.popup-wrap .swiper-wrapper:has(.swiper-slide:nth-child(2)) .swiper-slide:not(.swiper-slide-active) {
  height: 0 !important;
  overflow: hidden;
}

.popup-wrap .swiper-pagination {
  position: absolute;
  bottom: 20px;
  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;
}