/* ============================================
   hayan_popup6 - 3벌 분리 출력
   PC(1025+) / 태블릿(461~1024) / 모바일(~460)
   ============================================ */

/* 기본: 전부 숨김 — 실제 브레이크포인트는 PHP 인라인 style에서 동적 출력 */
.popup6-pc-wrap,
.popup6-tablet-wrap,
.popup6-mobile-wrap { display: none; }

/* ============================================
   공통 스타일
   ============================================ */
.popup6-individual {
  position: fixed;
  z-index: 2147483647;
  background: #fff;
  border: 1px solid #222;
  box-shadow: 2px 2px 15px rgba(0,0,0,0.3);
  overflow: hidden;
  border-radius: 8px;
}
.popup6-swiper-wrap {
  position: fixed;
  z-index: 2147483647;
  background: #fff;
  border: 1px solid #222;
  box-shadow: 2px 2px 15px rgba(0,0,0,0.3);
  overflow: hidden;
  border-radius: 8px;
}
.popup6-header {
  height: 45px;
  padding: 8px 12px;
  background: #222;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
}
.popup6-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 25px;
  cursor: pointer;
}
.popup6-body {
  overflow: visible;
}
.popup6-body img.popup6-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  object-position: top center;
}
/* 비율이 있을 때 이미지 crop */
.popup6-body[style*="aspect-ratio"] img.popup6-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.popup6-body a {
  display: block;
  width: 100%;
}
.popup6-footer {
  background: #f9f9f9;
  padding: 0 12px;
  height: 40px;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.popup6-today-btn {
  background: none;
  border: 1px solid #ccc;
  color: #666;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.popup6-today-btn:hover {
  background: #eee;
  border-color: #999;
  color: #333;
}
.popup6-hide-ui {
  display: none !important;
}

/* ============================================
   pagination 기본 (도트) — body 밖에 배치
   ============================================ */
.popup6-pagination-wrap {
  position: relative;
  text-align: center;
  padding: 0;
}
.popup6-pagination-wrap .swiper-pagination {
  position: relative !important;
  bottom: auto !important;
}

/* ============================================
   하단 탭 스타일 (popup6-has-tab) — popup5 참고
   ============================================ */
.popup6-has-tab .popup6-pagination-wrap {
  padding: 0;
}
.popup6-has-tab .popup6-pagination-wrap .swiper-pagination {
  background-color: #333;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  height: 40px;
  padding: 0 !important;
  color: #fff;
  border-radius: 0;
}
.popup6-has-tab .popup6-pagination-wrap .swiper-pagination .swiper-pagination-bullet {
  background: none !important;
  border: none !important;
  color: #fff !important;
  font-size: 12px !important;
  font-weight: normal !important;
  opacity: 1 !important;
  width: 100%;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 0;
  margin: 0 !important;
  padding: 0 5px;
  cursor: pointer;
}
.popup6-has-tab .popup6-pagination-wrap .swiper-pagination .swiper-pagination-bullet-active {
  background: var(--primary, #2563eb) !important;
  color: #fff !important;
  font-weight: bold !important;
}

/* Swiper 화살표 */
.popup6-swiper .swiper-button-prev,
.popup6-swiper .swiper-button-next {
  color: #fff;
  width: 30px;
  height: 30px;
  background: rgba(0,0,0,0.3);
  border-radius: 50%;
}
.popup6-swiper .swiper-button-prev:after,
.popup6-swiper .swiper-button-next:after {
  font-size: 14px;
}

/* Swiper 도트 */
.popup6-swiper .swiper-pagination {
  position: absolute;
  bottom: 8px;
  left: 0;
  width: 100%;
  z-index: 10;
}
.popup6-swiper .swiper-pagination-bullet {
  background: rgba(255,255,255,0.5);
  opacity: 1;
  width: 8px;
  height: 8px;
}
.popup6-swiper .swiper-pagination-bullet-active {
  background: #fff;
}

/* ============================================
   PC 전용 (1025px+)
   ============================================ */
.popup6-pc-wrap .popup6-individual {
  /* 인라인 style로 left/top/width 적용 (clamp 포함) */
}
.popup6-pc-wrap .popup6-individual .popup6-header {
  cursor: move;
}
.popup6-pc-wrap .popup6-individual .popup6-body {
  max-height: 80vh;
  overflow-y: auto;
}
.popup6-pc-wrap .popup6-swiper-wrap {
  left: 100px;
  top: 100px;
  width: 500px;
}

/* ============================================
   태블릿 전용 (461~1024px)
   ============================================ */
.popup6-tablet-wrap .popup6-individual {
  max-width: 90vw;
}
.popup6-tablet-wrap .popup6-individual .popup6-body {
  max-height: 80vh;
  overflow-y: auto;
}
.popup6-tablet-wrap .popup6-swiper-wrap {
  left: 50%;
  top: 5vh;
  transform: translateX(-50%);
  width: 80%;
  max-width: 600px;
}

/* ============================================
   모바일 전용 (460px-)
   ============================================ */

/* 모바일 하단 고정 (popup6-bottom) */
.popup6-mobile-wrap .popup6-bottom {
  bottom: 0;
  left: 0;
  right: 0;
  top: auto;
  width: 100%;
  border-radius: 12px 12px 0 0;
  border-left: none;
  border-right: none;
}
.popup6-mobile-wrap .popup6-bottom .popup6-body {
  max-height: 70vh;
  overflow: hidden;
}

/* 모바일 센터 모달 (popup6-center) */
.popup6-mobile-wrap .popup6-center {
  left: 0;
  right: 0;
  top: 5vh;
  bottom: auto;
  width: 80%;
  margin: 0 auto;
  border-radius: 8px;
  max-height: 90vh;
}
.popup6-mobile-wrap .popup6-center .popup6-body {
  max-height: calc(90vh - 130px);
  overflow: hidden;
}

/* 모바일 개별 분리형 */
.popup6-mobile-wrap .popup6-individual {
  left: 5% !important;
  right: 5% !important;
  top: auto !important;
  bottom: 0;
  width: 90% !important;
  border-radius: 12px 12px 0 0;
}
.popup6-mobile-wrap .popup6-individual .popup6-body {
  max-height: 70vh;
  overflow-y: auto;
}

/* 모바일 오버레이 (센터모달용) — display는 PHP 인라인에서 동적 제어 */
.popup6-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  z-index: 2147483640;
  transition: opacity 0.3s ease;
}

/* ============================================
   팝업 다시열기 버튼
   ============================================ */
.popup-reopen-btn_out {
  position: fixed;
  left: 0;
  top: 0;
  height: 1px;
  z-index: 999999999 !important;
  width: 100%;
  float: left;
}
.popup-reopen-btn_out .contentContainer {
  position: relative;
}
.popup-reopen-btn {
  position: absolute;
  right: 0;
  top: 10px;
  z-index: 2147483650;
  border: 0;
  background: var(--primary, #2563eb);
  color: #fff;
  cursor: pointer;
  padding: 5px 7px 5px 25px;
  border-radius: 50px;
  font-size: 14px;
}
@media (max-width: 460px) {
  .popup-reopen-btn {
    right: 60px;
    top: 12px;
    padding: 5px 8px 5px 15px;
  }
}
.popup-reopen-btn em {
  width: 25px;
  height: 25px;
  background-color: #333;
  border-radius: 100%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  margin-left: 6px;
}
