/* =====================================================================
   홈 첫 로드 이벤트 팝업 (event-popup)
   · 딤드 오버레이 + 스크롤 잠금(Lenis 포함)
   · 팝업 가로 630px, 이미지 영역 / 상단 닫기 / 하단(오늘 하루 보지 않기·닫기) 퍼블리싱
   ===================================================================== */

/* 스크롤 잠금 (팝업 열렸을 때 body/html) */
html.ep-lock,
body.ep-lock {
  overflow: hidden !important;
  touch-action: none;
}

/* 딤드 오버레이 */
.ep-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.62);
  opacity: 0;
  transition: opacity 0.25s ease;
  -webkit-overflow-scrolling: touch;
}
.ep-overlay[hidden] {
  display: none;
}
.ep-overlay.is-open {
  opacity: 1;
}

/* 팝업 다이얼로그 (가로 630px) */
.ep-dialog {
  position: relative;
  width: 630px;
  max-width: 100%;
  max-height: calc(100vh - 40px);
  max-height: calc(100svh - 40px);
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  transform: translateY(14px) scale(0.98);
  transition: transform 0.28s ease;
}
.ep-overlay.is-open .ep-dialog {
  transform: none;
}

/* 상단 닫기 버튼 (이미지 위 우측) */
.ep-close-top {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease;
}
.ep-close-top:hover {
  background: rgba(0, 0, 0, 0.6);
}
.ep-close-top svg {
  width: 20px;
  height: 20px;
}

/* 이미지 영역 (여기에 이벤트 이미지 삽입) */
.ep-image {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  background: #101010;
}
.ep-image img {
  display: block;
  width: 100%;
  height: auto;
}

/* 하단 바 (오늘 하루 보지 않기 · 닫기) */
.ep-foot {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: #111D33;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}
.ep-nomore {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.ep-nomore input {
  width: 16px;
  height: 16px;
  accent-color: #c9b189;
  cursor: pointer;
}
.ep-close-bottom {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: none;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  cursor: pointer;
  transition: color 0.2s ease;
}
.ep-close-bottom:hover {
  color: #fff;
}

@media (max-width: 640px) {
  .ep-overlay {
    padding: 14px;
  }
  .ep-foot {
    padding: 11px 14px;
    font-size: 12.5px;
  }
}
