/* ---------- Widget de chat WhatsApp ---------- */
:root { --wa-cta: #0c7c3e; }
.wa-widget {
  --wa-launch-size: 64px;
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(17px, env(safe-area-inset-bottom));
  z-index: 46;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  /* Apenas o ícone e o painel aberto recebem cliques sobre a página. */
  pointer-events: none;
}
:root:not([data-variant="dark"]) .wa-widget.open::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgb(13 31 27 / 24%);
  pointer-events: none;
}
.wa-launch {
  position: relative;
  width: var(--wa-launch-size);
  height: var(--wa-launch-size);
  padding: 0;
  border: 3px solid #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  pointer-events: auto;
  background: var(--wa-cta);
  color: #fff;
  box-shadow: 0 0 0 1px #123b2d55, 0 4px 12px #102f2559, 0 10px 24px #102f2529;
  transition: transform .22s, filter .2s;
}
.wa-launch:hover { transform: scale(1.06); filter: brightness(1.04); }
.wa-launch:active { transform: scale(.95); }
.wa-launch .wa-ic-open { width: 38px; height: 38px; }
.wa-launch .wa-ic-close, .wa-launch .wa-notice, .wa-widget.open .wa-ic-open { display: none; }
.wa-widget.open .wa-ic-close { display: block; }
.wa-widget[data-state=notification] .wa-notice {
  position: absolute;
  top: -5px;
  right: -5px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  box-sizing: border-box;
  border: 2px solid white;
  border-radius: 50%;
  background: #c92f3b;
  color: white;
  font: 700 13px/1 system-ui, sans-serif;
  pointer-events: none;
}
.wa-pop {
  width: 380px;
  max-width: calc(100vw - 32px);
  transform-origin: bottom right;
  transform: translateY(10px) scale(.9);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: transform .28s cubic-bezier(.2,.9,.3,1), opacity .2s;
  --chat-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  display: flex;
  flex-direction: column;
  max-height: min(76dvh, calc(100dvh - var(--wa-launch-size) - max(17px, env(safe-area-inset-bottom)) - 20px));
  min-height: 0;
  overflow: hidden;
  border: 1px solid #d7d9d8;
  border-radius: 16px;
  background: #fff;
  color: #111b21;
  font-family: var(--chat-font);
  box-shadow: 0 8px 28px #0b141a26, 0 1px 4px #0b141a17;
}
:root:not([data-variant="dark"]) .wa-pop {
  border-color: #75877e;
  box-shadow: 0 18px 48px #102f254d, 0 3px 10px #102f2533;
}
.wa-widget.open .wa-pop { transform: none; visibility: visible; opacity: 1; pointer-events: auto; }
.wa-pop-head {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 12px;
  padding: 14px 12px 14px 17px;
  min-height: 76px;
  background: #103f35;
  color: #fff;
}
.wa-avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid #dce7e2;
  background: #fff;
  color: #152d24;
}
.wa-pop-id { flex: 1; min-width: 0; }
.wa-pop-id b { display: block; font: 650 17px/1.25 var(--chat-font); }
.wa-pop-id span { display: flex; align-items: center; gap: 6px; margin-top: 3px; color: #e0efe8; font: 400 13px/1.35 var(--chat-font); }
.wa-pop-id span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #72e5a5; }
.wa-close {
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  cursor: pointer;
  flex: 0 0 44px;
  height: 44px;
  align-self: flex-start;
  border-radius: 22px;
  background: transparent;
  color: #fff;
}
@media (hover: hover) { .wa-close:hover { background: #ffffff20; } }
.wa-close:focus-visible { outline: 2px solid #b6f5d4; outline-offset: -4px; }
.wa-thread {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  min-height: 0;
  padding: 14px 17px 19px;
  background: #fff;
  scrollbar-width: thin;
  scrollbar-color: #b7c5bf transparent;
}
.wa-chat-day {
  display: table;
  margin: 0 auto 12px;
  color: #62706a;
  font: 400 12px/1.35 var(--chat-font);
}
.wa-received {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  padding-right: 12px;
}
.wa-sender-avatar {
  width: 29px;
  height: 29px;
  background: #f2f6f4;
}
.wa-msg.wa-interactive {
  min-width: 0;
  max-width: 284px;
  padding: 11px 13px 9px;
  border-radius: 14px 14px 14px 4px;
  background: #f0f3f2;
  color: #172720;
}
.wa-sender { display: block; margin-bottom: 4px; color: #32604c; font: 600 12px/1.35 var(--chat-font); }
.wa-interactive > p {
  display: flow-root;
  margin: 0;
  font: 400 15px/1.42 var(--chat-font);
}
.wa-greeting-title {
  display: block;
  margin-bottom: 4px;
  font: 650 16px/1.3 var(--chat-font);
}
.wa-interactive .wa-sent-time {
  float: right;
  padding: 0 0 0 8px;
  margin-top: 5px;
  color: #5a6862;
  font: 400 11px/1.4 var(--chat-font);
  font-variant-numeric: tabular-nums;
}
.wa-questions {
  display: grid;
  justify-items: end;
  gap: 6px;
  margin-top: 13px;
}
.wa-question {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid #388265;
  border-radius: 999px;
  background: #fff;
  color: #176044;
  font: 500 14px/1.35 var(--chat-font);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
@media (hover: hover) { .wa-question:hover { background: #edf7f2; border-color: #176044; } }
.wa-question:active { background: #e2f0e8; }
.wa-launch:focus-visible { outline: 3px solid #365bdd; outline-offset: 2px; }
.wa-questions .wa-question:focus-visible { outline: 2px solid #137357; outline-offset: -3px; }
.wa-pop [hidden] { display: none; }
.wa-pop[data-chat="site"] { height: 600px; }
.wa-chat-info {
  margin: 11px 0 0 36px;
  color: #506059;
  font: 400 12px/1.45 var(--chat-font);
}
.wa-chat-info a, .wa-other-channel, .wa-chat-retry { color: #155d42; text-decoration: underline; text-underline-offset: 2px; }
.wa-history { display: flex; flex-direction: column; gap: 10px; margin-top: 17px; }
.wa-line {
  align-self: flex-start;
  max-width: 90%;
  padding: 9px 12px;
  background: #f0f3f2;
  color: #172720;
  border-radius: 13px 13px 13px 4px;
  font: 400 15px/1.42 var(--chat-font);
  overflow-wrap: anywhere;
}
.wa-line[data-author="visitor"] { align-self: flex-end; background: #daf2e6; border-radius: 13px 13px 4px 13px; }
.wa-line-body { display: block; white-space: pre-wrap; }
.wa-line time { display: block; margin-top: 3px; color: #59665f; text-align: right; font-size: 11px; }
.wa-chat-feedback {
  flex: none;
  padding: 7px 15px;
  background: #f2f6f4;
  color: #304b3f;
  font: 400 12px/1.4 var(--chat-font);
}
.wa-chat-retry { padding: 4px; border: 0; cursor: pointer; background: transparent; font: inherit; font-weight: 650; }
.wa-site-footer { flex: none; padding: 8px 12px; border-top: 1px solid #d8e2dc; background: #fff; }
.wa-compose {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 4px 3px 12px;
  border: 1px solid #8ca197;
  border-radius: 12px;
}
.wa-compose:focus-within { outline: 2px solid #24815b; outline-offset: 1px; }
.wa-compose input {
  flex: 1;
  min-width: 0;
  padding: 5px 0;
  background: #fff;
  color: #14271c;
  border: 0;
  outline: 0;
  font: 400 16px/1.35 var(--chat-font);
}
.wa-compose input::placeholder { color: #64736a; }
.wa-compose button {
  display: grid;
  place-items: center;
  height: 42px;
  width: 42px;
  flex: none;
  border: 0;
  border-radius: 9px;
  background: #176044;
  color: #fff;
  cursor: pointer;
}
.wa-compose button:disabled { background: #e1e9e4; color: #607166; cursor: default; }
.wa-channels { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; }
.wa-other-channel, .wa-account-open { display: inline-block; padding: 5px; font: 500 13px/1.35 var(--chat-font); }
.wa-account-open { color: #155d42; text-decoration: underline; text-underline-offset: 2px; }
.wa-signout { padding: 5px; border: 0; background: transparent; color: #52615a; cursor: pointer; font: 400 12px/1.35 var(--chat-font); text-decoration: underline; }
.wa-confirm-exit { max-width: min(360px, 92vw); padding: 20px; border: 1px solid #819388; border-radius: 14px; background: #fff; color: #172720; font: 400 15px/1.45 var(--chat-font); }
.wa-confirm-exit::backdrop { background: #102a2080; }
.wa-confirm-exit h2 { margin: 0 0 8px; font-size: 19px; }
.wa-confirm-exit p { margin: 0 0 12px; }
.wa-confirm-exit [role=status]:empty { display: none; }
.wa-confirm-exit > div { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.wa-confirm-exit button { min-height: 44px; padding: 6px 10px; border: 1px solid #8ca197; border-radius: 8px; background: #fff; color: #155d42; font: 600 13px/1.3 var(--chat-font); cursor: pointer; }
.wa-confirm-exit .wa-exit-confirm { border-color: #176044; background: #176044; color: #fff; }
.wa-site-footer :focus-visible, .wa-chat-info a:focus-visible, .wa-chat-retry:focus-visible { outline: 2px solid #176044; outline-offset: 2px; }
.wa-compose input:focus-visible { outline: 0; }
@media (max-height: 480px) {
  .wa-widget.open:has(.wa-pop[data-chat="site"]) .wa-launch { display: none; }
  .wa-pop[data-chat="site"] { max-height: calc(100dvh - max(17px, env(safe-area-inset-bottom)) - 10px); }
  .wa-pop[data-chat="site"] .wa-pop-head { padding-block: 4px; min-height: 52px; }
}
@media (max-width: 360px) {
  .wa-thread { padding-inline: 12px; }
  .wa-received { padding-right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .wa-pop, .wa-interactive { animation: none; transition: none; }
}
@media (max-width: 560px) {
  .wa-widget { --wa-launch-size: 60px; }
  .wa-launch .wa-ic-open { width: 36px; height: 36px; }
}

.wa-landing-channel { display: flex; justify-content: flex-end; margin-top: 9px; }
.wa-private-page { margin: 0; min-height: 100dvh; display: grid; place-items: center; padding: 16px; background: #edf3ef; }
.wa-private-page, .wa-private-page * { box-sizing: border-box; }
.wa-private-page > svg { position: absolute; }
.wa-pop.wa-private-panel {
  width: min(100%, 490px);
  max-width: 100%;
  height: min(730px, calc(100dvh - 32px));
  max-height: none;
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: none;
  transition: none;
}
@media (max-width: 540px), (max-height: 480px) {
  .wa-private-page { padding: 0; }
  .wa-pop.wa-private-panel { width: 100%; max-width: 100%; height: 100dvh; border: 0; border-radius: 0; }
}

