/* 팝업 모달 오버레이 - 단일 배경 */
.popup-modals-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  pointer-events: auto;
  z-index: 10000;
}

.popup-modals-overlay.open {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 데스크탑에서 다중 팝업 컨테이너 */
.popup-modals-overlay .popup-modals-container {
  display: flex;
  gap: 30px;
  justify-content: center;
  align-items: center;
  width: auto;
  height: auto;
}

/* 모바일에서 다중 팝업 컨테이너 */
.popup-modals-overlay .popup-modals-container-mobile {
  display: flex;
  flex-direction: column;
  gap: 15px;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
  height: auto;
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
}

/* 팝업 모달 기본 스타일 */
.popup-modal {
  display: none;
  opacity: 0;
  transform: translateY(100px);
  transition: all 0.3s ease-out;
}

.popup-modal.open {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* 팝업 모달 콘텐츠 */
.popup-modal-content {
  position: relative;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  max-width: 90vw;
  max-height: 90vh;
  overflow: hidden;
}

/* 팝업 이미지 컨테이너 */
.popup-modal-image-container {
  position: relative;
}

.popup-modal-image {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
}

/* 팝업 컨트롤 */
.popup-modal-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.9);
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.popup-modal-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}

.popup-modal-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.popup-modal-close-btn {
  background: #ff4757;
  color: white;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.2s ease;
}

.popup-modal-close-btn:hover {
  background: #ff3742;
}

/* 데스크탑 (1024px 이상) */
@media (min-width: 1024px) {
  .popup-modal-content {
    max-width: 600px;
  }

  .popup-modal-image {
    max-width: 600px;
    max-height: 500px;
  }

  .popup-modal-controls {
    padding: 20px 25px;
  }

  .popup-modal-checkbox {
    font-size: 16px;
  }

  .popup-modal-close-btn {
    width: 35px;
    height: 35px;
    font-size: 20px;
  }
}

/* 태블릿 (768px ~ 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .popup-modal-content {
    max-width: 500px;
  }

  .popup-modal-image {
    max-width: 500px;
    max-height: 400px;
  }

  .popup-modal-controls {
    padding: 18px 22px;
  }

  .popup-modal-checkbox {
    font-size: 15px;
  }

  .popup-modal-close-btn {
    width: 32px;
    height: 32px;
    font-size: 19px;
  }
}

/* 모바일 (767px 이하) */
@media (max-width: 767px) {
  .popup-modal-content {
    max-width: 95vw;
    margin: 20px;
  }

  .popup-modal-image {
    max-width: 100%;
    max-height: 70vh;
  }

  .popup-modal-controls {
    padding: 12px 15px;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .popup-modal-checkbox {
    font-size: 13px;
  }

  .popup-modal-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 25px;
    height: 25px;
    font-size: 16px;
    background: var(--primary-color);
    color: white;
    border-radius: 4px;
    backdrop-filter: blur(5px);
  }

  .popup-modal-close-btn:hover {
    background: rgba(255, 255, 255, 1);
  }
}
