/* Modal de conversa do WhatsApp (integração QubeFlow CRM) */
.qf-wa-open, .qf-wa-open body { overflow: hidden; }

.qf-wa {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  font-family: inherit;
}
.qf-wa[hidden] { display: none; }

.qf-wa__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 20, 16, 0.55);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.qf-wa__dialog {
  position: relative;
  width: 100%;
  max-width: 380px;
  max-height: calc(100vh - 32px);
  overflow: auto;
  border-radius: 14px;
  background: #ECE5DD;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
  transform: translateY(16px) scale(0.98);
  opacity: 0;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.qf-wa.is-open .qf-wa__backdrop { opacity: 1; }
.qf-wa.is-open .qf-wa__dialog { transform: none; opacity: 1; }

.qf-wa__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 12px 16px;
  background: #075E54;
  color: #fff;
}

.qf-wa__avatar {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.qf-wa__avatar img { width: 32px; height: 32px; object-fit: contain; }

.qf-wa__who { flex: 1; min-width: 0; line-height: 1.25; }
.qf-wa__who strong { display: block; font-size: 1rem; font-weight: 600; }
.qf-wa__who small { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; opacity: 0.85; }
.qf-wa__dot { width: 8px; height: 8px; border-radius: 50%; background: #25D366; }

.qf-wa__close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}
.qf-wa__close:hover, .qf-wa__close:focus-visible { background: rgba(255, 255, 255, 0.15); }

.qf-wa__chat { padding: 18px 16px 16px; }

.qf-wa__bubble {
  position: relative;
  max-width: 88%;
  margin: 0 0 18px 8px;
  padding: 8px 12px 20px;
  border-radius: 0 10px 10px 10px;
  background: #fff;
  color: #111b21;
  font-size: 0.95rem;
  line-height: 1.4;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.12);
}
.qf-wa__bubble::before {
  content: "";
  position: absolute;
  top: 0;
  left: -8px;
  border-top: 10px solid #fff;
  border-left: 8px solid transparent;
}
.qf-wa__time {
  position: absolute;
  right: 10px;
  bottom: 4px;
  font-size: 0.7rem;
  color: #667781;
}

.qf-wa__field { margin-bottom: 12px; }
.qf-wa__field label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #075E54;
}
.qf-wa__field input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #d1d7db;
  border-radius: 22px;
  background: #fff;
  color: #111b21;
  font-size: 1rem;
  outline: none;
}
.qf-wa__field input:focus { border-color: #128C7E; box-shadow: 0 0 0 3px rgba(18, 140, 126, 0.2); }
.qf-wa__field input[aria-invalid="true"] { border-color: #d93025; }
.qf-wa__error { display: block; min-height: 0; margin-top: 4px; font-size: 0.8rem; color: #b3261e; }
.qf-wa__error:empty { display: none; }

.qf-wa__hp {
  position: absolute !important;
  left: -10000px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.qf-wa__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 6px;
  padding: 12px 16px;
  border: 0;
  border-radius: 24px;
  background: #25D366;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}
.qf-wa__submit:hover, .qf-wa__submit:focus-visible { background: #1ebe5b; }
.qf-wa__submit:focus-visible { outline: 3px solid #075E54; outline-offset: 2px; }
.qf-wa__submit:disabled { background: #7fd9a2; cursor: wait; }

.qf-wa__privacy {
  margin: 10px 0 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: #54656f;
  text-align: center;
}
.qf-wa__privacy a { color: #075E54; text-decoration: underline; }

@media (max-width: 575.98px) {
  .qf-wa { padding: 8px; align-items: flex-end; }
  .qf-wa__dialog { max-width: none; max-height: calc(100vh - 16px); min-height: 70vh; }
}

@media (prefers-reduced-motion: reduce) {
  .qf-wa__backdrop, .qf-wa__dialog { transition: none; }
}

/* Campo anti-robô dos formulários de contato */
.form-hp {
  position: absolute !important;
  left: -10000px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
