.legal-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: none;
  align-items: stretch;
  justify-content: stretch;
  background: #fdfaf7;
}

.legal-overlay.visible {
  display: flex;
}

.legal-panel {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  background: #fdfaf7;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: legalPopIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.legal-panel.closing {
  animation: legalFadeOut 0.22s ease forwards;
}

.legal-header {
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #2a0a10 0%, #4a0e16 100%);
  color: #fff;
}

.legal-header h2 {
  font-family: "Playfair Display", serif;
  font-size: 22px;
  margin: 0;
}

.legal-close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease;
}

.legal-close:hover {
  background: rgba(0, 0, 0, 0.4);
  transform: scale(1.05);
}

.legal-body {
  padding: 20px 24px 24px;
  overflow-y: auto;
  color: #2a0a10;
  line-height: 1.6;
  flex: 1;
}

.legal-body p {
  margin-bottom: 12px;
  font-size: 14px;
}

@keyframes legalPopIn {
  0% {
    transform: scale(0.82);
    opacity: 0;
  }
  60% {
    transform: scale(1.04);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes legalFadeOut {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(0.9);
    opacity: 0;
  }
}

@media (max-width: 767px) {
  .legal-panel {
    max-width: 100%;
    margin: 0;
    border-radius: 0;
  }

  .legal-body {
    padding: 16px 18px 20px;
  }
}
