/*
  표준 모달 컴포넌트 (divetobada.com 디자인 시스템 규칙)
  - .modal-content 검정 테두리 2px, radius 1rem
  - 헤더/본문 사이 구분선 없음
*/

.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 100;
}

.modal-overlay[hidden] {
  display: none;
}

.modal-content {
  background-color: #fff;
  border: 2px solid #000;
  border-radius: 1rem;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.5rem;
}

.modal-header {
  margin-bottom: 1rem;
}

.modal-title-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.modal-title-wrapper .modal-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-title-wrapper .modal-subtitle {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.modal-body {
  display: flex;
  flex-direction: column;
}

.confirm-message {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--foreground);
  line-height: 1.6;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

@media (max-width: 640px) {
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .modal-content {
    max-width: 100%;
    border-radius: 1rem 1rem 0 0;
    border-bottom: none;
    animation: slideUpModal 0.3s ease-out forwards;
  }
}

@keyframes slideUpModal {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}
