/* Somente adaptacoes de comportamento necessarias na conversao React -> HTML. */
.mobile-nav[hidden] { display: none !important; }
.mobile-agent-link {
  justify-content: center !important;
  min-height: 42px;
  margin-top: 8px;
  border-radius: 9px;
  background: var(--teal);
  color: #fff !important;
}

/* Decisao funcional mantida: o painel da calculadora nao acompanha o scroll. */
.calc-panel { position: static; }

/* Compacta a transicao entre secoes sem alterar o espacamento interno dos blocos. */
html {
  scroll-padding-top: 76px;
}
.section {
  padding-block: 40px;
}
.hero {
  min-height: 0;
  padding-top: 92px;
}
.hero-layout { min-height: 0; }
@media (min-width: 901px) {
  .hero-visual { min-height: 0; max-height: clamp(520px, 42vw, 600px); }
  .hero-brand-placement { width: 100%; left: 0; }
}
.calc-page-hero {
  padding-top: 92px;
}

@media (min-width: 901px) {
  .calc-page-hero .calc-layout {
    column-gap: 14px;
    align-items: stretch;
  }
  .calc-page-hero .calc-results {
    height: 100%;
  }
  .calc-page-hero .calc-compare,
  .calc-page-hero .calc-benefits {
    flex-grow: 1;
  }
}

/* CTA da calculadora: leva ao agente da home com a simulacao na URL. */
.calc-cta-button svg { width: 16px; height: 16px; }

/* Aviso na home para quem chega da calculadora. */
.calc-handoff-note {
  max-width: 1030px;
  margin: 0 auto 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid #bfe3e1;
  border-radius: 12px;
  background: #e9f7f6;
  color: var(--teal-dark);
  font-size: .84rem;
  line-height: 1.45;
}
.calc-handoff-note svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-top: 1px;
}

.roi-modal-primary,
.roi-modal-secondary {
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
}
.roi-modal-primary { background: var(--teal); color: #fff; }
.roi-modal-primary:hover { background: var(--teal-dark); }
.roi-modal-secondary { border-color: rgba(255,255,255,.14); color: rgba(255,255,255,.78); }
.roi-modal-primary svg { width: 15px; }

.ai-chat-window {
  display: flex;
  flex-direction: column;
}
.ai-chat-feed {
  /* Mantem o chat alto em telas amplas, mas evita que a escala do sistema
     torne o card maior do que a altura util do navegador. */
  height: clamp(400px, 62vh, 560px);
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-color: #9ecbc8 #edf3f3;
  scrollbar-width: thin;
}
.ai-chat-feed::-webkit-scrollbar { width: 9px; }
.ai-chat-feed::-webkit-scrollbar-track { background: #edf3f3; }
.ai-chat-feed::-webkit-scrollbar-thumb {
  border: 2px solid #edf3f3;
  border-radius: 999px;
  background: #9ecbc8;
}
.ai-chat-feed::-webkit-scrollbar-thumb:hover { background: var(--teal); }
.ai-chat-composer label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.chat-composer textarea {
  flex: 1;
  height: 50px;
  min-height: 50px;
  max-height: 120px;
  resize: none;
  border: 1px solid #dce3e5;
  border-radius: 10px;
  padding: 13px 15px;
  color: var(--ink);
  outline: none;
  font-size: .88rem;
  line-height: 1.45;
}
.chat-composer textarea:focus {
  border-color: #71bab6;
  box-shadow: 0 0 0 3px #e1f3f2;
}
.chat-composer button {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 0;
  background: var(--teal);
  font-size: .875rem;
  font-weight: 500;
  line-height: 1.25rem;
  cursor: pointer;
}
.chat-composer button:hover { background: var(--teal-dark); }
.chat-composer button:disabled { opacity: .5; cursor: not-allowed; }
.chat-composer button svg { width: 16px; height: 16px; }

.ai-chat-message-user {
  margin-left: auto;
  justify-content: flex-end;
}
.ai-chat-message-user .ai-chat-bubble {
  background: var(--teal);
  border-color: var(--teal);
  border-radius: 13px 4px 13px 13px;
  color: #fff;
}
.ai-chat-message-bot .ai-chat-bubble {
  padding: 13px 16px;
  background: #fff;
  border: 1px solid #e0e5e7;
  border-radius: 4px 13px 13px 13px;
  box-shadow: 0 4px 13px rgba(44,65,74,.05);
  color: #46545c;
  font-size: .83rem;
}
.ai-chat-message:not(.chat-message) {
  display: flex;
  gap: 11px;
  max-width: 74%;
  margin-bottom: 15px;
}
.ai-chat-message:not(.chat-message) .ai-chat-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--teal);
  color: #fff;
  font-size: .67rem;
  font-weight: 700;
}
.ai-chat-message p { margin: 0 0 7px; }
.ai-chat-message p:last-child { margin-bottom: 0; }
.ai-chat-message ul,
.ai-chat-message ol {
  margin: 8px 0 10px;
  padding-left: 20px;
}
.ai-chat-message li + li { margin-top: 4px; }
.ai-chat-message-user p { color: #fff; }
.ai-chat-message-bot .ai-chat-level-heading {
  display: block;
  width: fit-content;
  margin: 14px 0 7px;
  color: var(--teal-dark);
  font-weight: 800;
  line-height: 1.35;
}
.ai-chat-message-bot .ai-chat-level-heading:first-child {
  margin-top: 0;
}
.ai-chat-bubble > .ai-chat-action-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.ai-chat-action {
  width: auto;
  max-width: 100%;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: 1px solid #8fcac6;
  border-radius: 10px;
  background: #fff;
  color: var(--teal-dark);
  font: inherit;
  font-size: .8rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.ai-chat-action:hover:not(:disabled) {
  border-color: var(--teal);
  background: #e9f7f6;
  transform: translateY(-1px);
}
.ai-chat-action:focus-visible {
  outline: 3px solid #ccebea;
  outline-offset: 2px;
}
.ai-chat-action:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
}
.ai-chat-typing {
  align-items: center;
  gap: 4px;
  width: max-content;
  margin-left: 45px;
  padding: 12px 15px;
  border: 1px solid #e0e5e7;
  border-radius: 4px 13px 13px;
  background: #fff;
}
.ai-chat-typing:not([hidden]) { display: flex; }
.ai-chat-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8aa3a1;
  animation: chat-dot 1.2s infinite;
}
.ai-chat-typing span:nth-child(2) { animation-delay: .15s; }
.ai-chat-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes chat-dot {
  0%, 60%, 100% { transform: translateY(0); opacity: .45; }
  30% { transform: translateY(-4px); opacity: 1; }
}

@media (max-width: 900px) {
  .section {
    padding-block: 36px;
  }
  .hero {
    padding-top: 84px;
  }
  .calc-page-hero {
    padding-top: 84px;
  }
  .hero-layout { gap: 40px; }
  .hero-visual { min-height: 0; max-height: 600px; }
  .hero-brand-placement { width: 100%; left: 0; }
}

@media (min-width: 768px) and (max-width: 1279px) {
  .site-header .header-inner {
    width: calc(100% - 24px);
    max-width: 1180px;
    height: 76px;
    display: flex;
    gap: clamp(6px, 1vw, 14px);
  }
  .site-header .brand-link {
    flex: 0 0 138px;
    width: 138px;
  }
  .site-header .brand-link img {
    width: 138px;
    height: 80px;
  }
  .site-header .header-cta {
    display: inline-flex;
    flex: 0 0 auto;
    margin-left: 0;
    padding-inline: 10px;
    font-size: .8rem;
  }
  .site-header .desktop-nav {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    margin-left: 0;
    gap: clamp(8px, 1vw, 14px);
    justify-content: center;
  }
  .site-header .desktop-nav a {
    flex: 0 0 auto;
    font-size: .8rem;
    white-space: nowrap;
  }
  .site-header .mobile-menu-button { display: none; }
}

@media (min-width: 768px) and (max-width: 900px) {
  .site-header .brand-link { flex-basis: 110px; width: 110px; }
  .site-header .brand-link img { width: 110px; height: 66px; }
  .site-header .desktop-nav { gap: 8px; }
  .site-header .desktop-nav a { font-size: .6875rem; }
  .site-header .header-cta {
    height: 38px;
    gap: 4px;
    padding-inline: 7px;
    font-size: .6875rem;
  }
  .site-header .header-cta svg { width: 14px; height: 14px; }
}

@media (min-width: 901px) and (max-width: 1000px) {
  .site-header .desktop-nav a,
  .site-header .header-cta { font-size: .75rem; }
}

@media (min-width: 768px) and (max-width: 820px) {
  .site-header .brand-link { flex-basis: 100px; width: 100px; }
  .site-header .brand-link img { width: 100px; height: 60px; }
  .site-header .header-cta { padding-inline: 6px; }
}

@media (max-width: 620px) {
  html {
    scroll-padding-top: 68px;
  }
  .section {
    padding-block: 32px;
  }
  .hero,
  .calc-page-hero {
    padding-top: 76px;
  }
  .hero-layout { gap: 20px; }
  .hero-visual { min-height: 430px; }
  .hero-brand-placement { width: 118%; left: -9%; }
  .ai-chat-feed { height: clamp(360px, 60vh, 500px); }
  .ai-chat-message:not(.chat-message) { max-width: 92%; }
  .calc-cta-button { width: 100%; white-space: normal; }
}
 