/* 커스텀 팝업 스타일 */

/* 오버레이 */
.custom-popup-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

/* 딤 배경 */
.custom-popup-dim {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
}

/* 팝업 컨테이너 (여러 팝업 아이템을 담는 래퍼) */
.custom-popup-container {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 90vh;
  opacity: 0;
  transform: scale(0.8);
  transition:
    opacity 1.3s ease,
    transform 1.3s ease;
}

/* 팝업 활성화 시 애니메이션 */
.custom-popup-overlay.active .custom-popup-container {
  opacity: 1;
  transform: scale(1);
}

/* 팝업 콘텐츠 영역 (JS가 동적 주입) - Grid로 같은 셀에 겹쳐서 표시 */
.custom-popup-content {
  display: grid;
}

.custom-popup-content > .custom-popup-item {
  grid-area: 1 / 1;
}

/* 개별 팝업 아이템 */
.custom-popup-item {
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  background: #fff;
}

/* 팝업 본문 (popup.content HTML 주입 영역) */
.custom-popup-body {
  line-height: 0;
  max-width: 1700px;
  max-height: 800px;
  overflow: hidden;
}

.custom-popup-body p {
  margin: 0;
}

.custom-popup-body a {
  display: block;
}

.custom-popup-body img {
  width: auto;
  max-width: 90vw;
  max-height: 80vh;
  height: auto;
  display: block;
  object-fit: contain;
}

/* 하단바 */
.custom-popup-footer {
  display: flex;
  padding: 0 20px;
  width: 100%;
  height: 40px;
  justify-content: space-between;
  align-items: center;
  background: black;
  color: white;
}

/* 버튼 */
.custom-popup-btn {
  font-size: 14px;
  color: white;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px 0;
}

.custom-popup-btn:hover {
  text-decoration: underline;
}
