:root {
  color-scheme: dark;
  --wa-app: #0b141a;
  --wa-header: #202c33;
  --wa-surface: #202c33;
  --wa-surface-strong: #182229;
  --wa-outgoing: #005c4b;
  --wa-green: #00a884;
  --wa-green-bright: #25d366;
  --wa-text: #e9edef;
  --wa-muted: #8696a0;
  --wa-line: #2a3942;
  --wa-security: #d9bd75;
  --wa-error: #ff8b96;
  --notice-height: 30px;
  --visual-viewport-height: 100dvh;
  --composer-bottom-padding: max(8px, env(safe-area-inset-bottom));
  --composer-height: calc(57px + var(--composer-bottom-padding));
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: #071015;
  -webkit-text-size-adjust: 100%;
}

body {
  display: flex;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  flex-direction: column;
  align-items: center;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  color: var(--wa-text);
  background:
    radial-gradient(circle at 50% -20%, rgba(37, 211, 102, 0.13), transparent 34rem),
    #071015;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(37, 211, 102, 0.72);
  outline-offset: 2px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.is-hidden {
  display: none !important;
}

/* Letreiro solicitado, incorporado à linguagem visual do WhatsApp. */
.human-notice {
  position: relative;
  z-index: 20;
  display: flex;
  width: min(100%, 640px);
  height: calc(var(--notice-height) + env(safe-area-inset-top));
  flex: 0 0 auto;
  align-items: flex-end;
  overflow: hidden;
  padding-top: env(safe-area-inset-top);
  color: #dfe8e5;
  background: #005c4b;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(0, 0, 0, 0.26);
  border-left: 1px solid rgba(255, 255, 255, 0.04);
}

.human-notice__viewport {
  position: relative;
  display: flex;
  width: 100%;
  height: var(--notice-height);
  align-items: center;
  overflow: hidden;
  padding-right: max(66px, calc(58px + env(safe-area-inset-right)));
  padding-left: max(8px, env(safe-area-inset-left));
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 3%, #000 92%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 3%, #000 92%, transparent 100%);
}

.human-notice__track {
  display: flex;
  width: max-content;
  flex: 0 0 auto;
  will-change: transform;
  animation: human-ticker 28s linear infinite;
}

.human-notice__group {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  padding-right: 52px;
}

.human-notice__item {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.human-notice__item i {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--wa-green-bright);
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.14);
}

.human-notice__static {
  display: none;
  padding-right: max(10px, env(safe-area-inset-right));
  padding-left: max(10px, env(safe-area-inset-left));
  overflow: hidden;
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.human-notice__toggle {
  position: absolute;
  right: max(3px, env(safe-area-inset-right));
  bottom: 2px;
  display: inline-flex;
  min-width: 44px;
  height: 26px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 7px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #e9edef;
  background: rgba(17, 27, 33, 0.9);
  box-shadow: -12px 0 18px 9px #005c4b;
  cursor: pointer;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
}

.human-notice__toggle-icon {
  font-size: 9px;
  letter-spacing: -0.16em;
}

.human-notice.is-paused .human-notice__track {
  animation-play-state: paused;
}

/* A aplicação deixa de ser uma landing e passa a ser uma conversa. */
.landing {
  display: flex;
  width: min(100%, 640px);
  height: calc(100vh - var(--notice-height) - env(safe-area-inset-top));
  height: calc(100svh - var(--notice-height) - env(safe-area-inset-top));
  height: calc(100dvh - var(--notice-height) - env(safe-area-inset-top));
  height: calc(var(--visual-viewport-height, 100dvh) - var(--notice-height) - env(safe-area-inset-top));
  min-height: 0;
  flex: 1 1 auto;
  padding-right: env(safe-area-inset-right);
  padding-left: env(safe-area-inset-left);
}

.chat-shell {
  position: relative;
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  overflow: hidden;
  background: var(--wa-app);
  border-right: 1px solid rgba(255, 255, 255, 0.055);
  border-left: 1px solid rgba(255, 255, 255, 0.055);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
}

.chat-header {
  position: relative;
  z-index: 10;
  display: flex;
  width: 100%;
  height: 66px;
  flex: 0 0 66px;
  align-items: center;
  gap: 3px;
  padding: 7px 8px 7px 4px;
  background: var(--wa-header);
  border-bottom: 1px solid rgba(255, 255, 255, 0.035);
}

.wa-back {
  display: inline-flex;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #d5dce0;
  text-decoration: none;
  font-size: 31px;
  font-weight: 300;
  line-height: 1;
}

.wa-back:hover {
  background: rgba(255, 255, 255, 0.06);
}

.lawyer {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  align-items: center;
  gap: 10px;
}

.lawyer__portrait {
  position: relative;
  width: 43px;
  height: 43px;
  flex: 0 0 43px;
  overflow: hidden;
  border-radius: 50%;
  background: #2a3942;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.lawyer__portrait::after {
  position: absolute;
  right: 0;
  bottom: 1px;
  width: 10px;
  height: 10px;
  border: 2px solid var(--wa-header);
  border-radius: 50%;
  background: var(--wa-green-bright);
  content: "";
}

.lawyer__initials {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #b6c0c6;
  font-size: 11px;
  font-weight: 700;
}

.lawyer__portrait img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
}

.lawyer__portrait img[src=""],
.lawyer__portrait img:not([src]) {
  display: none;
}

.lawyer__identity {
  min-width: 0;
}

.lawyer__identity strong {
  display: block;
  overflow: hidden;
  color: var(--wa-text);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lawyer__identity p {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 3px 0 0;
  color: #b4c0c6;
  font-size: 12px;
  line-height: 1;
}

.wa-presence-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--wa-green-bright);
}

.wa-header__actions {
  display: flex;
  height: 44px;
  flex: 0 0 auto;
  align-items: center;
  gap: 2px;
  color: #d5dce0;
}

.wa-header__actions > span {
  position: relative;
  display: grid;
  width: 38px;
  height: 42px;
  place-items: center;
}

.wa-video-icon::before {
  width: 19px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 2px;
  content: "";
}

.wa-video-icon::after {
  position: absolute;
  right: 5px;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-right: 0;
  border-bottom: 5px solid transparent;
  border-left: 6px solid currentColor;
  content: "";
}

.wa-phone-icon::before {
  width: 17px;
  height: 9px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 13px 13px;
  content: "";
  transform: rotate(45deg);
}

.wa-menu-icon {
  font-size: 27px;
  line-height: 1;
}

.chat-stage {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  overflow: hidden;
  color: var(--wa-text);
  background: var(--wa-app);
}

.chat-stage::before {
  position: absolute;
  z-index: -2;
  inset: 0;
  background-color: var(--wa-app);
  background-image: url("./wallpaper-legal-dark.webp?v=20260801-1");
  background-repeat: repeat;
  background-position: center top;
  background-size: 430px 430px;
  content: "";
  opacity: 0.68;
  pointer-events: none;
}

.chat-stage::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 20, 26, 0.14), rgba(11, 20, 26, 0.36));
  content: "";
  pointer-events: none;
}

.chat-context {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: stretch;
  padding: 8px 11px 0;
}

.wa-date-chip {
  align-self: center;
  margin: 0 0 8px;
  padding: 5px 10px;
  border-radius: 7px;
  color: #aebac1;
  background: rgba(17, 27, 33, 0.94);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.28);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1;
  text-transform: uppercase;
}

.wa-system-message {
  display: flex;
  width: min(92%, 480px);
  align-self: center;
  align-items: flex-start;
  justify-content: center;
  gap: 5px;
  margin: 0 0 8px;
  padding: 7px 10px;
  border-radius: 7px;
  color: var(--wa-security);
  background: rgba(24, 34, 41, 0.95);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.24);
  text-align: center;
  font-size: 11.5px;
  line-height: 1.32;
}

.wa-system-message > span {
  flex: 0 0 auto;
  font-size: 10px;
}

.wa-system-message p {
  margin: 0;
}

.wa-business-card {
  display: flex;
  width: max-content;
  max-width: 92%;
  align-self: center;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 9px;
  color: #d1d7db;
  background: rgba(17, 27, 33, 0.92);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.22);
}

.wa-business-card img {
  display: block;
  width: 28px;
  height: auto;
  opacity: 0.9;
}

.wa-business-card strong,
.wa-business-card p {
  display: block;
  margin: 0;
}

.wa-business-card strong {
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.2;
}

.wa-business-card p {
  margin-top: 2px;
  color: var(--wa-muted);
  font-size: 10.5px;
  line-height: 1.2;
}

.message-row {
  display: flex;
  width: 100%;
  flex: 0 0 auto;
}

.message-row--incoming {
  justify-content: flex-start;
}

.message-row--outgoing {
  justify-content: flex-end;
}

.message-bubble {
  position: relative;
  width: fit-content;
  max-width: min(84%, 430px);
  padding: 7px 9px 6px;
  border-radius: 8px;
  color: var(--wa-text);
  background: var(--wa-surface);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.28);
  font-size: 14.5px;
  line-height: 1.34;
  overflow-wrap: anywhere;
  animation: message-in 180ms ease-out both;
}

.message-bubble--incoming {
  border-top-left-radius: 2px;
}

.message-bubble--incoming::before {
  position: absolute;
  top: 0;
  left: -7px;
  width: 0;
  height: 0;
  border-top: 0 solid transparent;
  border-right: 8px solid var(--wa-surface);
  border-bottom: 9px solid transparent;
  content: "";
}

.message-bubble--outgoing {
  border-top-right-radius: 2px;
  background: var(--wa-outgoing);
}

.message-bubble--outgoing::after {
  position: absolute;
  top: 0;
  right: -7px;
  width: 0;
  height: 0;
  border-top: 0 solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 8px solid var(--wa-outgoing);
  content: "";
}

.message-bubble p {
  margin: 0;
}

.message-bubble label {
  cursor: text;
}

.message-bubble time {
  display: inline-block;
  float: right;
  margin: 5px 0 -1px 12px;
  color: #8e9ba3;
  font-size: 10.5px;
  line-height: 1;
  white-space: nowrap;
}

.message-bubble--outgoing time {
  color: #9cc9be;
}

.message-bubble--outgoing time b {
  color: #53bdeb;
  font-weight: 700;
  letter-spacing: -0.16em;
}

#name-answer-preview {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.wa-intro-message {
  margin-bottom: 2px;
}

.wa-intro-message .message-bubble {
  max-width: min(78%, 400px);
}

.wa-flow {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
}

.form-step {
  position: relative;
  display: none;
  min-height: 0;
  flex: 1 1 auto;
}

.form-step.is-active {
  display: flex;
  flex-direction: column;
  padding-bottom: var(--composer-height);
}

.wa-step-messages {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 8px;
  padding: 7px 11px 40px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.wa-step-messages::-webkit-scrollbar {
  display: none;
}

#phone-step .wa-step-messages {
  flex: 1 1 auto;
  padding-bottom: 40px;
}

.composer {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 5;
  display: flex;
  min-height: var(--composer-height);
  align-items: center;
  gap: 7px;
  padding: 8px 8px var(--composer-bottom-padding);
  background: var(--wa-app);
}

.field {
  position: relative;
  display: flex;
  height: 49px;
  min-width: 0;
  flex: 1 1 auto;
  align-items: center;
  padding: 0 76px 0 44px;
  border: 1px solid transparent;
  border-radius: 25px;
  background: #202c33;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.field:focus-within {
  border-color: rgba(37, 211, 102, 0.48);
  box-shadow: 0 0 0 2px rgba(0, 168, 132, 0.12);
}

.field input {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--wa-text);
  background: transparent;
  caret-color: var(--wa-green-bright);
  font-size: 16px;
}

.field input::placeholder {
  color: #8696a0;
  opacity: 1;
}

.wa-emoji,
.wa-attachment,
.wa-camera {
  position: absolute;
  z-index: 7;
  display: grid;
  width: 32px;
  height: 42px;
  place-items: center;
  color: #9aa8b0;
  pointer-events: none;
}

.wa-emoji {
  left: 17px;
  font-size: 24px;
  font-weight: 300;
}

.wa-attachment {
  right: 107px;
  font-size: 23px;
  transform: rotate(-35deg);
}

.wa-camera {
  right: 75px;
}

.wa-camera::before {
  width: 21px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 4px;
  content: "";
}

.wa-camera::after {
  position: absolute;
  width: 6px;
  height: 6px;
  border: 2px solid currentColor;
  border-radius: 50%;
  content: "";
}

.wa-send {
  display: grid;
  width: 49px;
  height: 49px;
  flex: 0 0 49px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--wa-green);
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.24);
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease;
}

.wa-send:hover {
  background: #06b28e;
}

.wa-send:active {
  transform: scale(0.94);
}

.wa-send:disabled {
  cursor: wait;
  opacity: 0.62;
}

.wa-send b {
  display: block;
  margin-left: -2px;
  font-size: 21px;
  font-weight: 400;
  line-height: 1;
  transform: rotate(-12deg);
}

.field--phone {
  padding-right: 15px;
  padding-left: 56px;
}

.country-code {
  position: absolute;
  left: 16px;
  color: #aebac1;
  font-size: 14px;
  font-weight: 600;
}

.back-action {
  flex: 0 0 44px;
  align-self: flex-start;
  min-height: 44px;
  margin: 0 11px 4px auto;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  color: #b8c5cb;
  background: rgba(17, 27, 33, 0.92);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  font-size: 11.5px;
}

.field-error {
  position: absolute;
  right: 15px;
  bottom: calc(var(--composer-height) + 35px);
  left: 15px;
  z-index: 8;
  margin: 0;
  color: var(--wa-error);
  text-align: center;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.2;
  pointer-events: none;
}

.field-error:empty {
  display: none;
}

.privacy {
  position: absolute;
  right: 40px;
  bottom: calc(var(--composer-height) + 5px);
  left: 40px;
  z-index: 4;
  margin: 0;
  overflow: hidden;
  color: rgba(209, 215, 219, 0.58);
  max-height: 28px;
  font-size: 10.5px;
  line-height: 1.25;
  text-align: center;
  overflow-wrap: anywhere;
  pointer-events: none;
}

html[data-active-step="2"] .privacy {
  bottom: calc(var(--composer-height) + 53px);
}

html[data-active-step="2"] .field-error {
  bottom: calc(var(--composer-height) + 83px);
}

.loading-state,
.result-state {
  position: relative;
  z-index: 4;
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: flex-start;
  padding: 15px 12px 88px;
}

.loading-state .message-bubble {
  display: flex;
  align-items: center;
  gap: 10px;
}

.loading-state strong,
.loading-state p,
.result-state h3,
.result-state p {
  margin: 0;
}

.loading-state strong,
.result-state h3 {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.loading-state p,
.result-state p {
  margin-top: 3px;
  color: #c2cbd0;
  font-size: 12.5px;
}

.spinner {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--wa-green-bright);
  border-radius: 50%;
  animation: spin 0.72s linear infinite;
}

.result-state__icon {
  display: inline-grid;
  width: 24px;
  height: 24px;
  float: left;
  place-items: center;
  margin: 0 8px 5px 0;
  border-radius: 50%;
  color: #fff;
  background: #b84d59;
  font-weight: 800;
}

.result-state__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.result-state__actions .primary-action,
.fallback-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--wa-green);
  cursor: pointer;
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
}

.fallback-link {
  color: #dce5e2;
  background: var(--wa-header);
}

.honeypot {
  position: fixed !important;
  top: -9999px !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.noscript {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 30px;
  color: var(--wa-text);
  background: var(--wa-app);
  text-align: center;
}

.noscript a {
  color: var(--wa-green-bright);
}

@keyframes human-ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes message-in {
  from { opacity: 0; transform: translateY(5px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

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

@media (min-width: 720px) {
  body {
    padding-right: max(14px, env(safe-area-inset-right));
    padding-left: max(14px, env(safe-area-inset-left));
  }

  .human-notice,
  .landing {
    width: min(100%, 640px);
  }

  .human-notice {
    margin-top: 10px;
    border-radius: 12px 12px 0 0;
  }

  .landing {
    height: calc(var(--visual-viewport-height, 100dvh) - var(--notice-height) - 20px);
    margin-bottom: 10px;
    padding: 0;
  }

  .chat-shell {
    border-radius: 0 0 12px 12px;
  }

  .message-bubble {
    max-width: min(68%, 430px);
  }
}

@media (max-width: 460px) {
  .human-notice__toggle-text {
    display: none;
  }

  .human-notice__viewport {
    padding-right: max(51px, calc(45px + env(safe-area-inset-right)));
  }

  .wa-header__actions > span {
    width: 34px;
  }

  .lawyer {
    gap: 8px;
  }

  .lawyer__identity strong {
    max-width: 145px;
  }

  .message-bubble {
    max-width: 88%;
  }
}

@media (max-width: 350px) {
  .wa-video-icon {
    display: none !important;
  }

  .lawyer__identity strong {
    max-width: 128px;
  }

  .wa-attachment,
  .wa-camera {
    display: none;
  }

  #name-step .field {
    padding-right: 15px;
  }
}

@media (max-width: 280px) {
  .wa-phone-icon {
    display: none !important;
  }

  .lawyer__identity strong {
    max-width: 76px;
  }

  .privacy {
    right: 16px;
    left: 16px;
  }

  .message-bubble {
    max-width: 94%;
  }
}

@media (max-height: 720px) {
  .chat-header {
    height: 60px;
    flex-basis: 60px;
  }

  .wa-business-card {
    margin-bottom: 7px;
    padding-top: 5px;
    padding-bottom: 5px;
  }

  .wa-system-message {
    margin-bottom: 6px;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .chat-context {
    padding-top: 6px;
  }

  .wa-intro-message .message-bubble p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
}

@media (max-height: 620px) {
  .wa-date-chip,
  .wa-business-card,
  .wa-intro-message {
    display: none;
  }

  .chat-context {
    padding-top: 7px;
  }

  .wa-system-message {
    width: min(94%, 470px);
    margin-bottom: 2px;
    padding: 5px 8px;
    font-size: 10.5px;
  }

  .wa-step-messages {
    padding-top: 6px;
  }

  .privacy {
    font-size: 10px;
  }
}

@media (max-height: 500px) {
  .wa-system-message,
  .chat-context {
    display: none;
  }

  .chat-header {
    height: 56px;
    flex-basis: 56px;
  }

  .wa-step-messages {
    padding-top: 8px;
  }
}

html.is-keyboard-open,
html[data-keyboard-open="true"] {
  --composer-bottom-padding: 8px;
  --composer-height: 65px;
}

html.is-keyboard-open .human-notice,
html[data-keyboard-open="true"] .human-notice {
  display: none;
}

html.is-keyboard-open .landing,
html[data-keyboard-open="true"] .landing {
  position: fixed;
  top: var(--visual-viewport-offset-top, 0px);
  right: 0;
  left: 0;
  width: min(100%, 640px);
  height: var(--visual-viewport-height, 100dvh);
  flex: 0 0 auto;
  margin: 0 auto;
  padding-bottom: 0;
}

html.is-keyboard-open .chat-context,
html[data-keyboard-open="true"] .chat-context,
html.is-keyboard-open .privacy,
html[data-keyboard-open="true"] .privacy {
  display: none;
}

html.is-keyboard-open .chat-header,
html[data-keyboard-open="true"] .chat-header {
  height: calc(54px + env(safe-area-inset-top));
  flex-basis: calc(54px + env(safe-area-inset-top));
  padding-top: calc(7px + env(safe-area-inset-top));
}

html.is-keyboard-open .wa-step-messages,
html[data-keyboard-open="true"] .wa-step-messages {
  padding-top: 8px;
}

html.is-keyboard-open .composer,
html[data-keyboard-open="true"] .composer {
  padding-bottom: 8px;
}

/* Ícones vetoriais e retomada: acabamento próximo ao WhatsApp sem depender de fontes/emoji. */
.wa-back svg,
.wa-header-icon svg,
.wa-composer-icon svg,
.wa-send-icon,
.wa-lock {
  display: block;
}

.wa-back svg {
  width: 27px;
  height: 27px;
  fill: currentColor;
}

.wa-header-icon svg {
  width: 25px;
  height: 25px;
  fill: currentColor;
}

.wa-video-icon::before,
.wa-video-icon::after,
.wa-phone-icon::before,
.wa-camera::before,
.wa-camera::after {
  content: none;
}

.wa-menu-icon svg {
  width: 22px;
  height: 22px;
}

.wa-lock {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  fill: currentColor;
}

.wa-composer-icon svg {
  width: 25px;
  height: 25px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.wa-composer-icon.wa-emoji {
  font-size: 0;
}

.wa-composer-icon.wa-emoji svg path {
  stroke-width: 1.7;
}

.wa-composer-icon.wa-attachment {
  font-size: 0;
  transform: rotate(-8deg);
}

.wa-composer-icon.wa-camera svg {
  width: 24px;
  height: 24px;
}

.wa-send-icon {
  width: 25px;
  height: 25px;
  margin-left: 2px;
  fill: currentColor;
}

.return-dialog {
  position: fixed;
  z-index: 1200;
  inset: 0;
  display: grid;
  place-items: end center;
  color: var(--wa-text);
}

.return-dialog.is-hidden {
  display: none;
}

.return-dialog__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(3px);
}

.return-dialog__sheet {
  position: relative;
  width: min(100%, 520px);
  padding: 30px 22px max(22px, env(safe-area-inset-bottom));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px 24px 0 0;
  background: #202c33;
  box-shadow: 0 -16px 50px rgba(0, 0, 0, 0.4);
  text-align: center;
  animation: return-sheet-in 220ms cubic-bezier(.2,.8,.2,1) both;
}

.return-dialog__identity {
  position: relative;
  width: 52px;
  margin: 0 auto 10px;
}

.return-dialog__avatar {
  width: 52px;
  height: 52px;
  overflow: hidden;
  border-radius: 50%;
  background: #2a3942;
}

.return-dialog__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.return-dialog__identity .wa-presence-dot {
  position: absolute;
  right: 0;
  bottom: 1px;
  width: 11px;
  height: 11px;
  border: 2px solid #202c33;
}

.return-dialog__eyebrow {
  margin: 0 0 5px;
  color: #53bdeb;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.return-dialog h3 {
  margin: 0;
  font-size: clamp(20px, 5vw, 24px);
  font-weight: 600;
  line-height: 1.2;
}

.return-dialog__sheet > p:not(.return-dialog__eyebrow):not(.return-dialog__privacy) {
  max-width: 390px;
  margin: 10px auto 0;
  color: #aebac1;
  font-size: 15px;
  line-height: 1.45;
}

.return-dialog__actions {
  display: grid;
  gap: 9px;
  margin-top: 22px;
}

.return-dialog__actions button {
  min-height: 50px;
  padding: 0 18px;
  border-radius: 25px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.return-dialog__continue {
  border: 0;
  color: #071a14;
  background: #25d366;
}

.return-dialog__new {
  border: 1px solid rgba(134, 150, 160, 0.42);
  color: #e9edef;
  background: transparent;
}

.return-dialog__privacy {
  margin: 13px 0 0;
  color: #8696a0;
  font-size: 11px;
}

@keyframes return-sheet-in {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 700px) {
  .return-dialog {
    place-items: center;
  }

  .return-dialog__sheet {
    border-radius: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .return-dialog__sheet {
    animation: none;
  }
}

/* Motor v3: o teclado reduz apenas a altura útil, sem deslocar a interface
   pelo offset variável da barra do navegador. */
html.is-keyboard-open .human-notice,
html[data-keyboard-open="true"] .human-notice {
  display: none !important;
}

html.is-keyboard-open .landing,
html[data-keyboard-open="true"] .landing {
  position: fixed;
  inset: 0 !important;
  width: min(100%, 640px);
  height: var(--visual-viewport-height, 100dvh);
  margin: 0 auto;
  padding: 0;
}

html.is-keyboard-open .wa-step-messages,
html[data-keyboard-open="true"] .wa-step-messages {
  justify-content: flex-end;
}

#name-question-message .message-bubble > p,
#phone-question-message .message-bubble > p {
  margin: 7px 0 0;
  color: #aebac1;
  font-size: 12px;
  line-height: 1.35;
}

.chat-helper em {
  font-style: italic;
}

@media (max-height: 420px) {
  .chat-stage {
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }

  .human-notice__track {
    display: none;
  }

  .human-notice__static {
    display: block;
  }

  .human-notice__toggle {
    display: none;
  }

  .human-notice__viewport {
    padding-right: 0;
    mask-image: none;
  }
}

/* Experiência conversacional global: digitando e transição de cadastro. */
.message-row.is-typing-pending {
  display: none;
}

.wa-typing-row {
  margin-bottom: 2px;
}

.wa-typing-bubble {
  display: inline-flex;
  min-width: 58px;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 12px;
}

.wa-typing-bubble > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8696a0;
  animation: direct-typing-dot 1.12s ease-in-out infinite;
}

.wa-typing-bubble > span:nth-child(2) {
  animation-delay: .14s;
}

.wa-typing-bubble > span:nth-child(3) {
  animation-delay: .28s;
}

.lawyer__identity.is-typing p {
  color: #25d366;
}

.loading-state {
  position: absolute;
  z-index: 10;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 340px);
  align-content: center;
  align-items: center;
  justify-content: center;
  justify-items: center;
  min-height: 0;
  margin: 0;
  padding: 18px;
  place-items: center;
  color: #e9edef;
  background:
    radial-gradient(circle at 50% 30%, rgba(0, 168, 132, .22), transparent 38%),
    linear-gradient(rgba(11, 20, 26, .91), rgba(11, 20, 26, .97));
  backdrop-filter: blur(2px);
}

.direct-transition {
  width: 100%;
  max-width: 340px;
  padding: 22px 18px 18px;
  border: 1px solid rgba(134, 150, 160, .22);
  border-radius: 18px;
  background: rgba(24, 34, 41, .95);
  box-shadow: 0 22px 55px rgba(0, 0, 0, .4);
  text-align: center;
}

.question-keyword {
  color: inherit;
  font-weight: 700;
}

.direct-transition__avatar {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 0 auto 12px;
  border: 3px solid #202c33;
  border-radius: 50%;
}

.direct-transition__avatar::before,
.direct-transition__avatar::after,
.direct-transition__avatar > i {
  position: absolute;
  border: 1px solid rgba(37, 211, 102, .5);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.direct-transition__avatar::before {
  inset: -8px;
  animation: direct-transition-pulse 1.5s ease-out infinite;
}

.direct-transition__avatar::after {
  inset: -15px;
  animation: direct-transition-pulse 1.5s .45s ease-out infinite;
}

.direct-transition__avatar > i {
  inset: -3px;
  border-color: #25d366;
}

.direct-transition__avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 20%;
}

.direct-transition__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 7px;
  color: #aebac1;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.direct-transition__eyebrow i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #25d366;
  box-shadow: 0 0 0 3px rgba(37, 211, 102, .12);
}

.loading-state .direct-transition > strong {
  display: block;
  margin: 0;
  color: #f0f2f3;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -.02em;
}

.loading-state .direct-transition > p {
  min-height: 34px;
  margin: 6px 0 14px;
  color: #aebac1;
  font-size: 12px;
  line-height: 1.45;
}

.direct-transition__progress {
  height: 4px;
  overflow: hidden;
  margin-bottom: 15px;
  border-radius: 999px;
  background: rgba(134, 150, 160, .18);
}

.direct-transition__progress i {
  display: block;
  width: 28%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #00a884, #25d366);
  box-shadow: 0 0 12px rgba(37, 211, 102, .36);
  transition: width 320ms ease;
}

.direct-transition__steps {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.direct-transition__steps li {
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 7px 8px;
  border-radius: 9px;
  color: #667781;
  transition: color 220ms ease, background 220ms ease;
}

.direct-transition__steps li > span {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid rgba(134, 150, 160, .25);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 750;
}

.direct-transition__steps b,
.direct-transition__steps small {
  display: block;
}

.direct-transition__steps b {
  font-size: 11px;
  font-weight: 650;
}

.direct-transition__steps small {
  margin-top: 2px;
  font-size: 9px;
}

.direct-transition__steps li.is-active {
  color: #e9edef;
  background: rgba(0, 168, 132, .11);
}

.direct-transition__steps li.is-active > span {
  border-color: #25d366;
  color: #071a14;
  background: #25d366;
  box-shadow: 0 0 0 4px rgba(37, 211, 102, .1);
}

.direct-transition__steps li.is-complete {
  color: #aebac1;
}

.direct-transition__steps li.is-complete > span {
  border-color: #00a884;
  color: #25d366;
  background: rgba(0, 168, 132, .13);
}

html.is-keyboard-open .human-notice,
html[data-keyboard-open="true"] .human-notice {
  position: fixed;
  top: var(--visual-viewport-offset-top, 0px);
  right: 0;
  left: 0;
  display: flex;
  margin: 0 auto;
}

html.is-keyboard-open .landing,
html[data-keyboard-open="true"] .landing {
  top: calc(var(--visual-viewport-offset-top, 0px) + var(--notice-height) + env(safe-area-inset-top));
  height: calc(var(--visual-viewport-height, 100dvh) - var(--notice-height) - env(safe-area-inset-top));
}

@keyframes direct-typing-dot {
  0%, 60%, 100% { opacity: .38; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-4px); }
}

@keyframes direct-transition-pulse {
  0% { opacity: .7; transform: scale(.94); }
  75%, 100% { opacity: 0; transform: scale(1.13); }
}

@media (max-height: 590px) {
  .loading-state {
    padding: 8px 12px;
  }

  .direct-transition {
    padding: 13px 14px 11px;
  }

  .direct-transition__avatar {
    width: 50px;
    height: 50px;
    margin-bottom: 7px;
  }

  .direct-transition__eyebrow {
    margin-bottom: 3px;
    font-size: 8px;
  }

  .loading-state .direct-transition > strong {
    font-size: 16px;
  }

  .loading-state .direct-transition > p {
    min-height: 0;
    margin: 3px 0 8px;
    font-size: 10px;
  }

  .direct-transition__progress {
    margin-bottom: 7px;
  }

  .direct-transition__steps {
    gap: 3px;
  }

  .direct-transition__steps li {
    grid-template-columns: 23px minmax(0, 1fr);
    padding: 3px 6px;
  }

  .direct-transition__steps li > span {
    width: 23px;
    height: 23px;
  }

  .direct-transition__steps small {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wa-typing-bubble > span,
  .direct-transition__avatar::before,
  .direct-transition__avatar::after {
    animation: none;
  }
}
