/* BrindeMais — WhatsApp floating button + lead modal.
   Plain CSS (the theme's tailwind.css has no build step). Brand hexes: ink
   #151142, flame #e8512e; WhatsApp green #25D366. */

.bm-wa {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 9990;
}

/* ── Floating action button ─────────────────────────────────────────────── */
.bm-wa__fab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  padding: 0;
  border: 0;
  border-radius: 9999px;
  background: #25d366;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  animation: bm-wa-pulse 2.4s ease-out infinite;
}
.bm-wa__fab:hover {
  transform: scale(1.06);
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.55);
}
.bm-wa__fab svg {
  width: 2rem;
  height: 2rem;
}

@keyframes bm-wa-pulse {
  0%   { box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45), 0 0 0 0 rgba(37, 211, 102, 0.45); }
  70%  { box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45), 0 0 0 14px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45), 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Hide the FAB while the modal is open. */
.bm-wa.is-open .bm-wa__fab { display: none; }

/* ── Overlay ────────────────────────────────────────────────────────────── */
.bm-wa__overlay {
  position: fixed;
  inset: 0;
  z-index: 9991;
  background: rgba(21, 17, 66, 0.5);
  backdrop-filter: blur(2px);
}

/* ── Modal ──────────────────────────────────────────────────────────────── */
.bm-wa__modal {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 9992;
  width: min(360px, calc(100vw - 2rem));
  max-height: calc(100vh - 2.5rem);
  overflow-y: auto;
  border-radius: 1.25rem;
  background: #fff;
  box-shadow: 0 24px 60px rgba(21, 17, 66, 0.28);
  font-family: inherit;
  animation: bm-wa-in 0.2s ease-out;
}

@keyframes bm-wa-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.bm-wa__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, #25d366 0%, #128c4b 100%);
  color: #fff;
  border-radius: 1.25rem 1.25rem 0 0;
}
.bm-wa__header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 auto;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.18);
}
.bm-wa__header-icon svg { width: 1.6rem; height: 1.6rem; }
.bm-wa__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
}
.bm-wa__subtitle {
  margin: 0.1rem 0 0;
  font-size: 0.78rem;
  opacity: 0.9;
}
.bm-wa__close {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s ease;
}
.bm-wa__close:hover { background: rgba(255, 255, 255, 0.32); }
.bm-wa__close svg { width: 1.1rem; height: 1.1rem; }

/* ── Form ───────────────────────────────────────────────────────────────── */
.bm-wa__form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1.1rem 1.25rem 1.35rem;
}
.bm-wa__field { display: flex; flex-direction: column; gap: 0.3rem; }
.bm-wa__field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #151142;
}
.bm-wa__field input,
.bm-wa__field select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid #e2e0f0;
  border-radius: 0.6rem;
  background: #fff;
  font: inherit;
  font-size: 0.9rem;
  color: #151142;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.bm-wa__field input:focus,
.bm-wa__field select:focus {
  outline: none;
  border-color: #25d366;
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.18);
}
.bm-wa__field input.is-invalid,
.bm-wa__field select.is-invalid {
  border-color: #e8512e;
  box-shadow: 0 0 0 3px rgba(232, 81, 46, 0.15);
}

.bm-wa__error {
  margin: 0;
  font-size: 0.8rem;
  color: #e8512e;
  font-weight: 600;
}

/* ── Submit ─────────────────────────────────────────────────────────────── */
.bm-wa__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
  padding: 0.75rem 1rem;
  border: 0;
  border-radius: 0.7rem;
  background: #25d366;
  color: #fff;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
}
.bm-wa__submit:hover { background: #1fb959; }
.bm-wa__submit[disabled] { opacity: 0.7; cursor: progress; }

.bm-wa__spinner {
  display: none;
  width: 1.05rem;
  height: 1.05rem;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-top-color: #fff;
  border-radius: 9999px;
  animation: bm-wa-spin 0.7s linear infinite;
}
.bm-wa__submit.is-loading .bm-wa__spinner { display: inline-block; }
.bm-wa__submit.is-loading .bm-wa__submit-label { opacity: 0.85; }

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

/* ── Mobile ─────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .bm-wa__modal {
    right: 0.75rem;
    left: 0.75rem;
    bottom: 0.75rem;
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bm-wa__fab { animation: none; }
  .bm-wa__modal { animation: none; }
  .bm-wa__spinner { animation-duration: 1.4s; }
}
