:root {
  --conversion-safe-bottom: max(14px, env(safe-area-inset-bottom));
}

.field > label {
  color: var(--ink);
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.76rem;
  font-weight: 750;
}

.benefit-number,
.process-number {
  color: #5f6b7d;
}

.checkbox-field em,
.form-legal {
  color: #5f6b7d;
}

.field {
  min-width: 0;
}

.field-hint {
  color: #667085;
  font-size: 0.72rem;
  line-height: 1.35;
}

.field-error {
  min-height: 0;
  color: #9b201d;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.35;
}

.field-error:empty {
  display: none;
}

.field input[aria-invalid="true"],
.field select[aria-invalid="true"] {
  border-color: #b42318;
  background-color: #fff8f7;
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.1);
}

.city-field {
  position: relative;
}

.city-suggestions {
  position: absolute;
  z-index: 20;
  top: calc(100% - 28px);
  right: 0;
  left: 0;
  overflow: auto;
  max-height: 240px;
  border: 1px solid #cfd6e1;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(6, 22, 50, 0.16);
  padding: 6px;
}

.city-suggestions[hidden] {
  display: none;
}

.city-suggestions-option {
  border-radius: 8px;
  cursor: pointer;
  padding: 10px 12px;
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.25;
}

.city-suggestions-option:hover,
.city-suggestions-option[aria-selected="true"] {
  background: var(--red-100);
  color: var(--red-950);
}

.form-status {
  outline: none;
}

.form-status.is-success {
  border-radius: 10px;
  background: var(--green-100);
  color: #166534;
  padding: 10px;
  font-weight: 700;
}

.submit-loading {
  display: none;
  align-items: center;
  gap: 8px;
}

.submit-loading::before {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: conversion-spin 0.7s linear infinite;
  content: "";
}

.button-submit.is-loading .submit-label,
.button-submit.is-loading .submit-arrow {
  display: none;
}

.button-submit.is-loading .submit-loading {
  display: inline-flex;
}

@keyframes conversion-spin {
  to { transform: rotate(360deg); }
}

.form-modal {
  overflow: visible;
  width: min(720px, calc(100% - 32px));
  max-width: 720px;
  max-height: calc(100vh - 28px);
  max-height: calc(100dvh - 28px);
  border: 0;
  border-radius: 24px;
  background: transparent;
  padding: 0;
  color: var(--ink);
}

.form-modal::backdrop {
  background: rgba(3, 13, 32, 0.78);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.form-modal-shell {
  position: relative;
  overflow: auto;
  max-height: calc(100vh - 28px);
  max-height: calc(100dvh - 28px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 34px 90px rgba(3, 13, 32, 0.38);
}

.form-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(120deg, #fff7f6, #fff);
  padding: 22px 24px 18px;
}

.form-modal-header .form-step {
  margin-bottom: 5px;
}

.form-modal-header h2 {
  margin: 0 0 4px;
  font-size: clamp(1.25rem, 3vw, 1.65rem);
}

.form-modal-header p:last-child {
  max-width: 560px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.form-modal-close {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #d7dde6;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-size: 1.65rem;
  line-height: 1;
}

.form-modal-close:hover {
  border-color: var(--red-700);
  color: var(--red-800);
}

.form-modal-close:focus-visible {
  outline: 3px solid rgba(206, 42, 46, 0.28);
  outline-offset: 2px;
}

.form-modal [data-form-modal-content] > .form-card {
  border: 0;
  border-radius: 0 0 24px 24px;
  box-shadow: none;
  padding: 22px 24px 24px;
}

.form-modal .form-card-heading {
  display: none;
}

.form-modal .form-grid {
  gap: 13px 16px;
}

.form-modal .field {
  gap: 5px;
}

.form-modal .field input,
.form-modal .field select {
  height: 46px;
}

.form-modal .consent-group {
  gap: 9px;
  margin-top: 0;
  padding-top: 14px;
}

.form-modal .button-submit {
  min-height: 48px;
  margin-top: 16px;
}

.form-modal .form-legal {
  margin-top: 8px;
}

body.is-form-modal-open {
  overflow: hidden;
}

.mobile-form-cta {
  display: none;
}

.thank-you-body {
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 14% 12%, rgba(242, 138, 27, 0.2), transparent 28%),
    linear-gradient(135deg, var(--red-950), var(--red-800) 60%, var(--navy-950));
  color: #fff;
}

.thank-you-header {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 26px 0;
}

.thank-you-lockup {
  display: flex;
  align-items: center;
  gap: 16px;
}

.thank-you-lockup img:first-child {
  width: 118px;
  height: auto;
  filter: brightness(0) invert(1);
}

.thank-you-lockup img:last-child {
  width: 152px;
  height: auto;
}

.thank-you-lockup .brand-divider {
  width: 1px;
  height: 30px;
  background: rgba(255, 255, 255, 0.35);
}

.thank-you-main {
  display: grid;
  width: min(920px, calc(100% - 36px));
  min-height: calc(100vh - 120px);
  min-height: calc(100dvh - 120px);
  margin: 0 auto;
  align-content: center;
  padding: 30px 0 70px;
}

.thank-you-card {
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 32px 90px rgba(3, 13, 32, 0.34);
  color: var(--ink);
  padding: clamp(28px, 5vw, 58px);
}

.thank-you-success-icon {
  display: grid;
  width: 66px;
  height: 66px;
  margin-bottom: 22px;
  place-items: center;
  border-radius: 50%;
  background: var(--green-100);
  color: #167a4a;
  font-size: 2rem;
  font-weight: 900;
}

.thank-you-card h1 {
  max-width: 720px;
  margin-bottom: 14px;
  font-size: clamp(2rem, 5vw, 3.4rem);
}

.thank-you-card > p:not(.form-step) {
  max-width: 720px;
  color: var(--ink-soft);
}

.thank-you-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.thank-you-urgent {
  display: grid;
  align-items: center;
  grid-template-columns: 1fr auto;
  gap: 22px;
  margin-top: 34px;
  border: 1px solid #f2cf9f;
  border-radius: 18px;
  background: #fff8ed;
  padding: 22px;
}

.thank-you-urgent h2 {
  margin-bottom: 6px;
  font-size: 1.2rem;
}

.thank-you-urgent p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.button-whatsapp {
  background: #167a4a;
  color: #fff;
  white-space: nowrap;
}

.button-whatsapp:hover {
  background: #0f653d;
}

@media (max-width: 760px) {
  .form-modal {
    width: calc(100% - 20px);
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
    border-radius: 18px;
  }

  .form-modal-shell {
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
    border-radius: 18px;
  }

  .form-modal-header {
    gap: 12px;
    padding: 14px 14px 11px;
  }

  .form-modal-header h2 {
    font-size: 1.2rem;
  }

  .form-modal-header p:last-child {
    display: none;
  }

  .form-modal-close {
    width: 36px;
    height: 36px;
  }

  .form-modal [data-form-modal-content] > .form-card {
    border-radius: 0 0 18px 18px;
    padding: 13px 14px 15px;
  }

  .form-modal .form-grid {
    grid-template-columns: 1fr 1fr;
    gap: 9px 10px;
  }

  .form-modal .field-full,
  .form-modal .city-field,
  .form-modal .consent-group {
    grid-column: 1 / -1;
  }

  .form-modal .field input,
  .form-modal .field select {
    height: 43px;
    padding-right: 11px;
    padding-left: 11px;
    font-size: 0.87rem;
  }

  .form-modal .field > label {
    font-size: 0.7rem;
  }

  .form-modal .field-hint {
    display: none;
  }

  .form-modal .checkbox-field {
    gap: 8px;
    font-size: 0.72rem;
    line-height: 1.28;
  }

  .form-modal .consent-group {
    gap: 7px;
    padding-top: 10px;
  }

  .form-modal .button-submit {
    min-height: 45px;
    margin-top: 11px;
    font-size: 0.82rem;
  }

  .form-modal .form-legal {
    display: none;
  }

  .form-modal .form-status {
    margin-top: 7px;
    font-size: 0.75rem;
  }

  .mobile-form-cta {
    position: fixed;
    z-index: 40;
    right: 14px;
    bottom: var(--conversion-safe-bottom);
    left: 14px;
    display: flex;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(120deg, var(--red-900), var(--red-700));
    box-shadow: 0 16px 40px rgba(6, 22, 50, 0.28);
    color: #fff;
    font-family: Inter, system-ui, sans-serif;
    font-size: 0.9rem;
    font-weight: 800;
    text-align: center;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  }

  .mobile-form-cta.is-hidden {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px);
  }

  .thank-you-header {
    padding: 20px 0;
  }

  .thank-you-lockup img:first-child { width: 92px; }
  .thank-you-lockup img:last-child { width: 124px; }

  .thank-you-main {
    min-height: auto;
    padding: 18px 0 42px;
  }

  .thank-you-card {
    border-radius: 20px;
    padding: 26px 20px;
  }

  .thank-you-urgent {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 18px;
  }

  .thank-you-actions,
  .thank-you-actions .button,
  .thank-you-urgent .button {
    width: 100%;
  }
}

@media (max-width: 390px), (max-height: 700px) {
  .form-modal-header {
    padding-top: 10px;
    padding-bottom: 8px;
  }

  .form-modal-header .form-step {
    display: none;
  }

  .form-modal [data-form-modal-content] > .form-card {
    padding-top: 10px;
  }

  .form-modal .form-grid {
    gap: 7px 8px;
  }

  .form-modal .field input,
  .form-modal .field select {
    height: 40px;
  }

  .form-modal .consent-group {
    padding-top: 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .submit-loading::before,
  .mobile-form-cta {
    animation: none;
    transition: none;
  }
}
