@charset "utf-8";

/* 공통 팝업 스타일 */
.layer-popup,
.date-popup {
  position: fixed;
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10002;
  display: none;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  width: 600px;
  animation: fadeIn 0.3s ease-in-out;
}

/* 팝업별 위치 (좌표로 지정된 경우는 유지) */
#popup_date { top: {$layout_info->y_s1}px; left: {$layout_info->x_s1}px; }
#popup_date02 { top: {$layout_info->y_s2}px; left: {$layout_info->x_s2}px; }
#popup_date03 { top: {$layout_info->y_s4}px; left: {$layout_info->x_s4}px; }
#popup_date04 { top: {$layout_info->y_s3}px; left: {$layout_info->x_s3}px; }
#popup_date05 { top: 200px; left: 1450px; }

.date-popup img {
  width: 100%;
  max-height: 80vh; /* ✅ 브라우저 높이의 80%를 넘지 않도록 제한 */
  height: auto;
  object-fit: contain; /* ✅ 이미지 비율 유지하면서 내부에 꽉 채움 */
  display: block;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}


/* 버튼 영역 스타일 */
.popup-buttons-fixed {
  display: flex;
  justify-content: center;
  gap: 10px;
  background: #f5f7fa;
  padding: 16px;
  border-top: 1px solid #eee;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
}

.popup-buttons-fixed button {
  background-color: #2dd4bf; /* 기본: 민트 */
  color: white;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 500;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.popup-buttons-fixed button:hover {
  background-color: #0f766e; /* 호버 시: 진한 민트 */
}

/* 레거시 버튼 호환성 */
.layer-popup button,
.date-popup button {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
}

.layer-popup img,
.date-popup img {
  max-width: 100%;
  display: block;
}

.layer-popup ul,
.date-popup ul {
  list-style: none;
  padding: 0;
  margin: 0;
  height: 30px;
  display: flex;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.layer-popup li,
.date-popup li {
  flex: 1;
  text-align: center;
  font-size: 14px;
  background-color: #323232;
  color: white;
  line-height: 30px;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
  .date-popup {
    width: 90vw;
    max-width: 90vw;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 12px;
  }

  .popup-buttons-fixed {
    flex-direction: column;
    gap: 10px;
    padding: 16px;
  }

  .popup-buttons-fixed button {
    width: 100%;
    font-size: 16px;
    padding: 14px 0;
  }
}

/* 애니메이션 효과 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}
