/* 모달 이미지 슬라이더 스타일 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-container {
  position: relative;
  background-color: #fff;
  width: 90%;
  max-width: 600px; /* 이미지 너비에 맞춤 */
  max-height: 80vh; /* 높이 제한 늘림 */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 30px;
  height: 30px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 10;
}

.modal-close:before, .modal-close:after {
  content: '';
  position: absolute;
  width: 15px;
  height: 2px;
  background-color: #fff;
}

.modal-close:before {
  transform: rotate(45deg);
}

.modal-close:after {
  transform: rotate(-45deg);
}

.modal-slider {
  width: 100%;
  flex: 1;
  overflow-y: auto; /* 세로 스크롤만 허용 */
  overflow-x: hidden; /* 가로 스크롤 제거 */
}

.modal-slider .swiper-slide {
  display: flex;
  justify-content: center;
  align-items: flex-start; /* 상단 정렬로 변경 */
}

.modal-slider .swiper-slide img {
  max-width: 100%;
  height: auto; /* 비율 유지 */
  object-fit: contain;
}

.modal-pagination {
  display: flex;
  justify-content: center;
  margin-top: 15px;
  margin-bottom: 15px;
  flex-shrink: 0; /* 크기 고정 */
}

.modal-pagination-bullet {
  width: 60px;
  height: 4px;
  background-color: #ddd;
  margin: 0 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.modal-pagination-bullet.active {
  background-color: var(--point-green);
}

/* 모달 푸터 스타일 */
.modal-footer {
  display: flex;
  align-items: center;
  border-top: 1px solid #eee;
  flex-shrink: 0; /* 크기 고정 */
  background-color: #fff; /* 배경색 추가 */
  width: 100%; /* 너비 100% */
  box-sizing: border-box; /* 패딩 포함 */
}

.modal-divider {
  width: 1px;
  height: 24px;
  background-color: #ddd;
  margin: 0;
}

/* 모달 버튼 공통 스타일 */
.modal-btn {
  flex: 1; /* 버튼이 공간을 균등하게 차지 */
  border: none;
  border-radius: 0; /* 모서리 제거 */
  padding: 15px 0; /* 상하 패딩만 적용 */
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-align: center;
}

/* 기본 버튼 (닫기) */
.modal-btn-primary {
  background-color: #fff;
  color: var(--point-green);
}

.modal-btn-primary:hover {
  background-color: #f9f9f9;
}

/* 보조 버튼 (오늘 하루 보지 않기) */
.modal-btn-secondary {
  background-color: #fff;
  color: #666;
}

/* 모바일 뷰 스타일 */
@media (max-width: 768px) {
  .modal-container {
    width: 95%;
    max-width: none;
    max-height: 90vh; /* 모바일에서도 높이 제한 늘림 */
  }
  
  .modal-pagination {
    display: flex; /* 모바일에서도 페이지네이션 표시 */
    margin-top: 10px;
    margin-bottom: 10px;
  }
  
  .modal-pagination-bullet {
    width: 40px; /* 모바일에서는 조금 작게 */
  }
  
  .modal-navigation {
    display: block; /* 모바일에서도 네비게이션 버튼 표시 */
  }
  
  .modal-button-prev,
  .modal-button-next {
    width: 36px;
    height: 36px;
  }
  
  .modal-footer {
    padding: 12px 15px;
    flex-direction: row; /* 모바일에서도 가로 배치 유지 */
  }
  
  .modal-btn {
    padding: 8px 15px;
    font-size: 13px;
  }
}

/* PC 뷰 네비게이션 버튼 */
.modal-navigation {
  position: absolute;
  top: 50%;
  width: 100%;
  transform: translateY(-50%);
  z-index: 10;
}

.modal-button-prev,
.modal-button-next {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.modal-button-prev {
  left: 15px;
}

.modal-button-next {
  right: 15px;
}

.modal-button-prev:after,
.modal-button-next:after {
  content: '';
  width: 24px;
  height: 24px;
  border-top: 4px solid #666;
  border-right: 4px solid #666;
}

.modal-button-prev:after {
  transform: rotate(-135deg);
  margin-left: 5px;
}

.modal-button-next:after {
  transform: rotate(45deg);
  margin-right: 5px;
}

/* 모달 열기 버튼 스타일 */
.modal-open-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
  background-color: var(--point-green);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
}

.modal-open-btn:hover {
  background-color: #03b8c3;
}

@media (max-width: 768px) {
  .modal-open-btn {
    top: 10px;
    right: 10px;
    padding: 8px 15px;
    font-size: 12px;
  }
}

/* Swiper 오버라이드 스타일 */
.modal-slider .swiper-wrapper {
  align-items: flex-start;
}

/* 체크박스 스타일 재정의 */
.modal-footer input[type="checkbox"] {
  appearance: auto !important; /* appearance: none 재정의 */
  -webkit-appearance: auto !important;
  -moz-appearance: auto !important;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  vertical-align: middle;
  cursor: pointer;
}

.modal-footer label {
  font-size: 14px;
  color: #666;
  cursor: pointer;
  vertical-align: middle;
  user-select: none; /* 텍스트 선택 방지 */
}

/* 체크박스 컨테이너 스타일 */
.modal-footer .modal-btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  cursor: default; /* 컨테이너 자체는 커서 변경 없음 */
}
