.modal-open {
  overflow: hidden;
}

.modal {
  position: fixed;
  top: 5%!important;
  left: 0;
  z-index: 1050;
  display: none;
  width: 100%;
  height: 100%;
  overflow: hidden;
  outline: 0;
}

.modal.show {
  display: block;
}

.modal.fade .modal-dialog {
  transition: transform 0.3s ease-out;
  transform: translateY(-50px);
}

.modal.show .modal-dialog {
  transform: translateY(0);
}

.modal-dialog {
  position: relative;
  width: 60vw;            /* 너비 60% */
  height: 60vh;           /* 높이 60% */
  margin: auto;           /* 수직 수평 중앙 정렬 */
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 0.3rem;
  outline: 0;
  pointer-events: auto;
  overflow: hidden;
}

.modal-header,
.modal-footer {
  padding: 1rem;
  border-color: #dee2e6;
  background-color: #f8f9fa;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #dee2e6;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid #dee2e6;
}

.modal-body {
  flex: 1 1 auto;
  padding: 1rem;
  overflow-y: auto;
}

.modal-body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto; /* ✅ 중앙정렬 */
}

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1040;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-backdrop.fade {
  opacity: 0;
  transition: opacity 0.15s linear;
}

.modal-backdrop.show {
  opacity: 0.5;
}

/* ✅ 반응형 모바일 대응 */
@media (max-width: 575.98px) {
  .modal-dialog {
    width: 95vw;
    height: 90vh;
  }
  .modal-body {
    max-height: 70vh;
  }
}
