/* Modal: fundo com blur */
.form-modal {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.form-modal.visivel {
  pointer-events: all;
  opacity: 1;
}

.form-overlay {
  position: absolute;
  inset: 0;
  background: rgba(31, 42, 36, 0.55);
  backdrop-filter: blur(6px) saturate(1.2);
  -webkit-backdrop-filter: blur(6px) saturate(1.2);
  z-index: 0;
}

/* ANIMAÇÃO DE ENTRADA E SAÍDA */
.form-container {
  position: relative;
  background: var(--bg-alt);
  padding: 40px;
  border-radius: 16px;
  width: 90%;
  max-width: 420px;
  z-index: 1;
  border: 1px solid var(--line-soft);
  box-shadow:
    0 24px 60px -12px rgba(31, 42, 36, 0.25),
    0 4px 12px rgba(31, 42, 36, 0.08);

  transform: translateY(8px) scale(0.98);
  opacity: 0;
  transition:
    transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1),
    opacity 0.25s ease;
}

.form-modal.visivel .form-container {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.form-container .head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: row;
  margin-bottom: 28px;
}

.form-container h2 {
  text-align: left;
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(22px, 2.4vw, 26px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
}

.form-container h2 em {
  font-style: italic;
  color: var(--green-ink);
}

.form-fechar {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 18px;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 400;
  line-height: 1;
  width: 36px;
  height: 36px;
  max-width: 36px;
  max-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.form-fechar:hover {
  background: var(--line-soft);
  transform: scale(1.04);
}

.form-container input {
  display: block;
  width: 100%;
  margin-bottom: 12px;
  padding: 14px 16px;
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 15px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.form-container input::placeholder {
  color: var(--ink-mute);
}

.form-container input:focus {
  outline: none;
  border-color: var(--green-deep);
  box-shadow: 0 0 0 3px rgba(62, 138, 92, 0.12);
}

.form-container .button {
  display: block;
  margin-top: 20px;
}

.form-container .button:hover {
  filter: none;
}

.form-container button.whatsapp-submit {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 16px 24px;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;

  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #fff;
  background: linear-gradient(180deg, #6DC491 0%, var(--green) 50%, #4DA972 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    0 -1px 0 rgba(0, 0, 0, 0.1) inset,
    0 10px 24px -6px rgba(62, 138, 92, 0.45),
    0 2px 6px rgba(31, 42, 36, 0.12);

  transition:
    transform 0.2s cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 0.3s ease;
}

.form-container button.whatsapp-submit:hover {
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    0 -1px 0 rgba(0, 0, 0, 0.1) inset,
    0 16px 32px -8px rgba(62, 138, 92, 0.55),
    0 4px 10px rgba(31, 42, 36, 0.16);
}

.form-container button.whatsapp-submit:active {
  transform: translateY(0);
}

.wa-btn-text {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  color: #fff;
}

.wa-btn-icon {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 999px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.22);
  transition: background 0.25s ease, transform 0.25s ease;
}

.form-container button.whatsapp-submit:hover .wa-btn-icon {
  transform: translateX(2px) scale(1.04);
  background: rgba(255, 255, 255, 0.24);
}

.wa-icon {
  width: 14px;
  height: 14px;
  display: block;
}

@media (max-width: 480px) {
  .form-container {
    padding: 32px 24px;
    border-radius: 14px;
  }

  .form-container .head {
    margin-bottom: 24px;
  }

  .form-container h2 {
    font-size: clamp(20px, 5vw, 22px);
  }

  .form-container input {
    padding: 13px 14px;
    font-size: 15px;
  }

  .form-container button.whatsapp-submit {
    padding: 15px 20px;
  }

  .wa-btn-text {
    font-size: 14px;
  }
}

/* TEMA DARK OPCIONAL */
.form-modal.black .form-container {
  background: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.form-modal.black .form-container h2 {
  color: #fff;
}

.form-modal.black .form-container h2 em {
  color: var(--green);
}

.form-modal.black .form-fechar {
  color: rgba(255, 255, 255, 0.7);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.form-modal.black .form-fechar:hover {
  background: rgba(255, 255, 255, 0.08);
}

.form-modal.black .form-container input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
}

.form-modal.black .form-container input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.form-modal.black .form-container input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(90, 183, 128, 0.18);
}

@media (min-width: 1080px) {
  .form-container {
    padding: 44px;
    max-width: 440px;
  }
}
