.footer-modal-open {
  overflow: hidden;
}

.footer-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: rgba(45, 41, 71, 0.42);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.footer-modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.footer-modal-card {
  width: min(1020px, 100%);
  max-height: calc(100dvh - 48px);
  border-radius: 32px;
  background: linear-gradient(180deg, #f7f1eb 0%, #fbf7f3 100%);
  box-shadow: 0 28px 60px rgba(217, 124, 86, 0.18);
  color: #3d3769;
  overflow: hidden;
  transform: translateY(16px) scale(0.98);
  transition: transform 220ms ease;
}

.footer-modal-overlay.is-open .footer-modal-card {
  transform: translateY(0) scale(1);
}

.footer-modal-shell {
  padding: 34px 44px 38px;
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
}

.footer-modal-close {
  margin-left: auto;
  display: flex;
  height: 42px;
  width: 42px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  color: #6e698c;
  cursor: pointer;
}

.footer-modal-close:hover {
  background: rgba(61, 55, 105, 0.08);
  color: #3d3769;
}

.footer-modal-title {
  margin: 0;
  font-family: "Fira Sans", sans-serif;
  font-size: clamp(2.6rem, 5vw, 4rem);
  line-height: 0.95;
  font-style: italic;
  font-weight: 700;
  color: #d97c56;
}

.footer-modal-description {
  max-width: 860px;
  margin: 14px 0 0;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  line-height: 1.2;
  color: #3d3769;
}

.footer-modal-form {
  margin-top: 34px;
}

.footer-modal-feedback {
  min-height: 24px;
  margin-top: 18px;
  font-size: 0.95rem;
  font-weight: 600;
}

.footer-modal-feedback[data-state="error"] {
  color: #b93826;
}

.footer-modal-feedback[data-state="success"] {
  color: #2f7d32;
}

.footer-modal-feedback[data-state="info"] {
  color: #5a5489;
}

.footer-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.footer-modal-field,
.footer-modal-captcha {
  width: 100%;
  border: 0;
  border-radius: 16px;
  background: #ffffff;
  color: #3d3769;
  font-size: 1rem;
  padding: 18px 22px;
  box-shadow: inset 0 0 0 1px rgba(61, 55, 105, 0.06);
}

.footer-modal-field::placeholder,
.footer-modal-captcha::placeholder {
  color: rgba(61, 55, 105, 0.55);
}

.footer-modal-field:focus,
.footer-modal-captcha:focus {
  outline: 2px solid rgba(89, 81, 158, 0.3);
  outline-offset: 2px;
}

.footer-modal-field--wide {
  grid-column: 1 / span 1;
}

.footer-modal-row {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 18px;
}

.footer-modal-actions {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.footer-modal-btn {
  min-height: 72px;
  border-radius: 9999px;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 600;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.footer-modal-btn:hover {
  transform: translateY(-1px);
}

.footer-modal-btn--ghost {
  border: 3px solid rgba(61, 55, 105, 0.65);
  background: transparent;
  color: #4b467f;
}

.footer-modal-btn--primary {
  border: 0;
  background: #4b467f;
  color: #fff6f0;
  box-shadow: 0 14px 28px rgba(217, 124, 86, 0.24);
}

.footer-modal-btn:disabled {
  cursor: wait;
  opacity: 0.78;
  transform: none;
}

@media (max-width: 900px) {
  .footer-modal-overlay {
    align-items: flex-start;
    padding: 12px;
  }

  .footer-modal-card {
    max-height: calc(100dvh - 24px);
    border-radius: 28px;
  }

  .footer-modal-shell {
    max-height: calc(100dvh - 24px);
    padding: 26px 22px 24px;
  }

  .footer-modal-grid,
  .footer-modal-row,
  .footer-modal-actions {
    grid-template-columns: 1fr;
  }

  .footer-modal-btn {
    min-height: 62px;
  }

  .footer-modal-close {
    position: sticky;
    top: 0;
    z-index: 1;
  }
}