/* Модальні вікна футера: Politique de confidentialité / Cookies / Avertissement */

.legal-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  padding: 16px;
  overflow-y: auto;
  background-color: rgba(9, 6, 20, 0.72);
  -webkit-tap-highlight-color: transparent;
}

.legal-modal.is-open {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.legal-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin-block: 24px;
  padding: 44px 20px 24px;
  background-color: var(--background, #130c2a);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius-sm, 24px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  animation: legal-modal-in 250ms ease-out;
}

.legal-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  color: var(--color-light, #ffffff);
  transition: background-color 200ms ease, color 200ms ease;
}

.legal-modal__close:hover,
.legal-modal__close:focus-visible {
  background-color: var(--primary, #1877f2);
}

.legal-modal__title {
  margin-bottom: 16px;
  padding-right: 28px;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.3;
}

.legal-modal__text {
  max-height: 55vh;
  overflow-y: auto;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--secondary, #8f8cb8);
}

.legal-modal__text p + p {
  margin-top: 12px;
}

html.legal-modal-lock,
html.legal-modal-lock body {
  overflow: hidden;
}

@keyframes legal-modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (min-width: 576px) {
  .legal-modal__dialog {
    padding: 48px 32px 32px;
  }

  .legal-modal__title {
    font-size: 24px;
  }
}

@media (min-width: 768px) {
  .legal-modal.is-open {
    align-items: center;
  }

  .legal-modal__text {
    font-size: 15px;
  }
}

@media (min-width: 992px) {
  .legal-modal__dialog {
    max-width: 640px;
    padding: 56px 48px 40px;
  }

  .legal-modal__title {
    font-size: 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .legal-modal__dialog {
    animation: none;
  }
}
