/* ============================================================
   Botão Flutuante WhatsApp + Mini-Form — COMPONENTE GNR v1.4
   ============================================================
   CÓPIA VERBATIM de:
   memoria-agencia/banco-de-design/nichos/servicos-locais/componente-botao-whatsapp-modal.md

   ⚠️ NÃO editar as regras abaixo. Se precisar mudar comportamento,
   muda no componente canônico e re-copia — senão a RG Port vira um
   fork silencioso do padrão da casa.

   Única customização permitida (e prevista pelo próprio doc, §2):
   a cor da `.mobile-cta-bar`, no fim do arquivo — a marca é dark-dominante.
   ============================================================ */

#gnrWppModal, #gnrWppModal *, #gnrWppModal *::before, #gnrWppModal *::after,
.gnr-wpp-float, .gnr-wpp-float * {
  box-sizing: border-box !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}
.gnr-wpp-float svg, #gnrWppModal .gnr-wpp-icon svg, #gnrWppModal .gnr-wpp-submit svg { fill: #fff !important; }

.gnr-wpp-float {
  position: fixed; bottom: 20px; right: 20px; z-index: 9998;
  background-color: #25d366 !important; border-radius: 50%;
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  cursor: pointer; text-decoration: none;
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.gnr-wpp-float:hover { background-color: #128c7e !important; transform: scale(1.08); box-shadow: 0 6px 16px rgba(0,0,0,0.3); }
.gnr-wpp-float:active { transform: scale(0.95); }
/* No mobile a barra de CTA fixa substitui a bolha (evita 2 alvos verdes) */
@media (max-width: 767px) { .gnr-wpp-float { display: none !important; } }

.gnr-wpp-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 9999; align-items: center; justify-content: center; padding: 16px; }
.gnr-wpp-modal-open { display: flex; animation: gnrWppFade 0.2s ease; }
@keyframes gnrWppFade { from { opacity: 0 } to { opacity: 1 } }

.gnr-wpp-card { background: #fff !important; border-radius: 16px; width: 100%; max-width: 380px; padding: 24px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); position: relative; }
.gnr-wpp-close {
  position: absolute; top: 8px; right: 8px;
  background: none !important; border: 0 !important; box-shadow: none !important;
  font-size: 28px !important; color: #999 !important; cursor: pointer; line-height: 1;
  width: 44px !important; height: 44px !important; min-width: 0 !important; padding: 0 !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
}
.gnr-wpp-close:hover { color: #333 !important; background: none !important; }
.gnr-wpp-submit:active { transform: scale(0.97) !important; }
.gnr-wpp-submit:focus-visible, .gnr-wpp-close:focus-visible { outline: 2px solid #25d366 !important; outline-offset: 2px !important; }

.gnr-wpp-header { display: flex; align-items: center; gap: 12px; margin-bottom: 18px }
.gnr-wpp-icon { background: #25d366 !important; border-radius: 50%; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.gnr-wpp-title { font-size: 18px !important; font-weight: 700 !important; color: #111 !important; margin: 0 !important; }
.gnr-wpp-subtitle { font-size: 13px !important; color: #666 !important; margin: 4px 0 0 0 !important; }

.gnr-wpp-field { margin-bottom: 12px }
.gnr-wpp-field label { display: block !important; font-size: 13px !important; color: #444 !important; margin-bottom: 6px !important; font-weight: 500 !important; }
.gnr-wpp-field input {
  width: 100% !important; padding: 12px 14px !important; border: 1px solid #ddd !important; border-radius: 10px !important;
  font-size: 15px !important; outline: none; height: auto !important; margin: 0 !important; transition: border 0.2s; color: #111 !important; background: #fff !important;
}
.gnr-wpp-field input::placeholder { color: #999 !important; opacity: 1 !important; }
.gnr-wpp-field input:focus { border-color: #25d366 !important; background: #fff !important; }
.gnr-wpp-field input.gnr-wpp-error { border-color: #e74c3c !important; }

.gnr-wpp-submit {
  width: 100% !important; background: #25d366 !important; color: #fff !important; border: 0 !important; border-radius: 10px !important; padding: 14px !important;
  font-size: 15px !important; font-weight: 600 !important; cursor: pointer; display: flex !important; align-items: center; justify-content: center; gap: 8px;
  transition: background 0.2s, transform 0.15s ease; margin-top: 4px;
}
.gnr-wpp-submit:hover { background: #128c7e !important; }

/* Barra de CTA fixa no mobile (some no desktop) */
.mobile-cta-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9997;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,0.92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 -1px 0 rgba(15,15,15,0.08), 0 -8px 24px -12px rgba(15,15,15,0.18);
  transform: translateY(120%); transition: transform 300ms cubic-bezier(0.16,1,0.3,1);
}
.mobile-cta-bar.is-visible { transform: translateY(0); }
@media (min-width: 768px) { .mobile-cta-bar { display: none !important; } }

/* ── ÚNICA customização RG Port (prevista no doc §2) ──────────
   A marca é dark-dominante (hero e rodapé em #211f20), então a barra
   clara do padrão original destoava. Mesmo tom do mockup aprovado. */
.mobile-cta-bar {
  background: rgba(33,31,32,0.96);
  box-shadow: 0 -1px 0 rgba(255,255,255,0.08), 0 -8px 24px -12px rgba(0,0,0,0.5);
}


/* ── Telefone em duas caixas (DDD + numero) ──────────────────────────────
   Visualmente UMA linha: o olho ve um campo so, mas o DDD nao tem como
   ficar de fora sem a pessoa perceber. */
.gnr-wpp-tel { display: flex; gap: .5rem; align-items: stretch; }
.gnr-wpp-tel #gnrWppFormDDD { flex: 0 0 3.75rem; width: 3.75rem; text-align: center; }
.gnr-wpp-tel #gnrWppFormCelular { flex: 1 1 auto; min-width: 0; }
.gnr-wpp-tel #gnrWppFormDDD[hidden] { display: none; }

.gnr-wpp-dica {
  margin: .4rem 0 0; font-size: .8125rem; line-height: 1.35; color: #b45309;
}
.gnr-wpp-intl {
  margin: .45rem 0 0; padding: 0; border: 0; background: none;
  font: inherit; font-size: .8125rem; color: #6b7280;
  text-decoration: underline; cursor: pointer;
}
.gnr-wpp-intl:hover { color: #374151; }
