.contact-popup {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.contact-popup.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.contact-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 8, 8, 0.78);
  backdrop-filter: blur(4px);
}

.contact-popup__dialog {
  position: relative;
  width: min(760px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  transform: translateY(18px);
  transition: transform 0.25s ease;
}

.contact-popup.is-open .contact-popup__dialog {
  transform: translateY(0);
}

.contact-popup__form {
  padding: 54px;
}

.contact-popup__form textarea.form-control {
  min-height: 150px;
}

.contact-popup__close {
  position: absolute;
  z-index: 2;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--black-color);
  border-radius: 50%;
  background: transparent;
  color: var(--black-color);
  font-size: 22px;
  line-height: 40px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.contact-popup__close:hover,
.contact-popup__close:focus-visible {
  color: var(--theme-color);
  background: var(--black-color);
}

body.contact-popup-open {
  overflow: hidden;
}

.form-consent {
  max-width: 720px;
  margin: 0;
  color: rgba(36, 32, 31, 0.72);
  font-size: 13px;
  line-height: 1.55;
}

.form-consent a {
  color: var(--black-color);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.form-consent a:hover {
  color: #866f53;
}

.form-error-message {
  width: 100%;
  margin: 0 0 20px;
  color: #9d241f;
  font-size: 14px;
}

.contact-form button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.contact-form .form-control:focus,
.contact-form textarea.form-control:focus {
  border-color: #666666;
}

.form-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.legal-page {
  min-height: 52vh;
  padding: 110px 0;
}

.legal-page__content {
  width: 100%;
}

.legal-page__content .sec-title {
  margin-bottom: 28px;
}

.legal-page__content p {
  font-size: 18px;
  line-height: 1.7;
}

.thank-you-page {
  min-height: 58vh;
  display: flex;
  align-items: center;
  padding: 120px 0;
  text-align: center;
}

.thank-you-page__content {
  max-width: 760px;
  margin: 0 auto;
}

.thank-you-page__content p {
  margin: 20px auto 34px;
  font-size: 20px;
}

@media (max-width: 767px) {
  .contact-popup {
    padding: 12px;
  }

  .contact-popup__dialog {
    max-height: calc(100vh - 24px);
  }

  .contact-popup__form {
    padding: 64px 22px 30px;
  }

  .contact-popup__close {
    top: 12px;
    right: 12px;
  }

  .legal-page,
  .thank-you-page {
    padding: 75px 0;
  }

  .legal-page__content p,
  .thank-you-page__content p {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-popup,
  .contact-popup__dialog {
    transition: none;
  }
}
