.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: 10px 12px 12px;
  overflow-y: auto;
  color: #2a0a10;
  line-height: 1.6;
  flex: 1;
  /* Scrollbar styling for webkit */
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.2) transparent;
}

.legal-body::-webkit-scrollbar {
  width: 6px;
}
.legal-body::-webkit-scrollbar-track {
  background: transparent;
}
.legal-body::-webkit-scrollbar-thumb {
  background-color: rgba(0,0,0,0.2);
  border-radius: 10px;
}

.legal-content {
  max-width: 800px;
  margin: 0 auto;
}

.last-update {
  font-size: 13px;
  color: #888;
  font-style: italic;
  margin-bottom: 24px;
}

.legal-content h3 {
  font-family: "Playfair Display", serif;
  font-size: 20px;
  color: #7b1e2b;
  margin: 32px 0 16px;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 8px;
}

.legal-content h4 {
  font-size: 16px;
  font-weight: 600;
  color: #2a0a10;
  margin: 24px 0 12px;
}

.legal-content p {
  margin-bottom: 16px;
  font-size: 15px;
  line-height: 1.7;
  color: #4a4a4a;
  text-align: justify;
}

.legal-list {
  list-style: none;
  padding: 0;
  margin-bottom: 24px;
}

.legal-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 12px;
  font-size: 15px;
  line-height: 1.6;
  color: #4a4a4a;
}

.legal-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #7b1e2b;
  font-weight: bold;
}

.contact-list li {
    font-weight: 500;
}

.contact-list a {
    color: #7b1e2b;
    text-decoration: underline;
}

@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: 8px 9px 10px;
  }

  .legal-content p {
      text-align: left;
      font-size: 14px;
  }
  
  .legal-content h3 {
      font-size: 18px;
      margin-top: 24px;
  }
}
