/* ── 오버레이 ── */
.legal-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.legal-modal-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* ── 모달 박스 ── */
.legal-modal {
  position: relative;
  background: #ffffff;
  width: min(720px, 90vw);
  max-height: 80vh;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  transform: translateY(16px);
  transition: transform 0.25s ease;
}

.legal-modal-overlay.is-visible .legal-modal {
  transform: translateY(0);
}

/* ── 헤더 ── */
.legal-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px 16px;
  border-bottom: 1px solid #e0e0e0;
  flex-shrink: 0;
}

.legal-modal__tabs {
  display: flex;
  gap: 24px;
}

.legal-modal__tab {
  font-family: 'A2Z', sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: #acacac;
  background: none;
  border: none;
  padding: 0 0 6px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.legal-modal__tab.is-active {
  color: #272727;
  border-bottom-color: #272727;
}

.legal-modal__close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #272727;
  font-size: 20px;
  line-height: 1;
  transition: opacity 0.2s;
}

.legal-modal__close:hover {
  opacity: 0.5;
}

/* ── 본문 ── */
.legal-modal__body {
  overflow-y: auto;
  padding: 28px 32px 32px;
  flex: 1;
}

.legal-modal__body h2 {
  font-family: 'A2Z', sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #272727;
  margin: 0 0 20px;
}

.legal-modal__body h3 {
  font-family: 'A2Z', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #272727;
  margin: 24px 0 8px;
}

.legal-modal__body p,
.legal-modal__body li {
  font-family: 'A2Z', sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: -0.01em;
  color: #444444;
}

.legal-modal__body ol,
.legal-modal__body ul {
  padding-left: 20px;
  margin: 8px 0;
}

.legal-modal__body a {
  color: #272727;
  text-decoration: underline;
  cursor: pointer;
}

.legal-modal__body a:hover {
  opacity: 0.6;
}

.legal-modal__body .legal-updated {
  margin-top: 32px;
  color: #acacac;
  font-size: 12px;
}

/* ── 콘텐츠 전환 애니메이션 ── */
.legal-modal__body.is-switching {
  opacity: 0;
  transition: opacity 0.15s ease;
}

.legal-modal__body.is-switched {
  opacity: 1;
  transition: opacity 0.15s ease;
}
