/* Chat de vendas do site. Só tokens de brand/tokens.css; sem movimento. */
.sc { font-family: var(--font-sans); color: var(--ink); }
.sc svg { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sc button:focus-visible, .sc textarea:focus-visible, .sc input:focus-visible, .sc a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Botão flutuante: o balão de canto reto da marca */
.sc-launcher {
  position: fixed; right: var(--space-5); bottom: var(--space-5); z-index: 20;
  display: inline-flex; align-items: center; gap: var(--space-2);
  min-height: 56px; padding: 0 var(--space-5) 0 var(--space-4);
  border: 0; border-radius: var(--radius-lg) var(--radius-lg) 0 var(--radius-lg);
  background: var(--primary); color: var(--on-primary);
  font: 500 15px var(--font-sans); cursor: pointer; box-shadow: var(--shadow-raised);
}
.sc-launcher:hover { box-shadow: var(--shadow-raised), inset 0 0 0 999px rgba(0, 0, 0, 0.14); }
.sc-launcher[aria-expanded="true"] { display: none; }

/* Janela */
.sc-panel {
  position: fixed; right: var(--space-5); bottom: var(--space-5); z-index: 21;
  display: flex; flex-direction: column;
  width: 380px; height: min(620px, calc(100vh - 2 * var(--space-5)));
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-raised); overflow: hidden;
}
.sc-panel[hidden] { display: none; }
.sc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); padding: var(--space-4); background: var(--primary); color: var(--on-primary); }
.sc-head__title { margin: 0; font-size: 16px; line-height: 22px; font-weight: 700; }
.sc-head__sub { margin: 2px 0 0; font-size: 13px; line-height: 18px; opacity: 0.9; }
.sc-icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; margin: -8px -8px 0 0; border: 0; border-radius: var(--radius-md); background: transparent; color: inherit; cursor: pointer; }
.sc-head .sc-icon-btn:focus-visible { outline-color: var(--on-primary); }

.sc-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4); background: var(--surface-sunken); overscroll-behavior: contain; }
.sc-log .sly-bubble { margin: 0; max-width: 88%; white-space: pre-wrap; overflow-wrap: anywhere; }
.sc-log .sly-bubble--in { align-self: flex-start; }
.sc-log .sly-bubble--out { align-self: flex-end; }
.sc-thinking { align-self: flex-start; margin: 0; color: var(--ink-muted); font-size: 13px; }
.sc-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.sc-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); align-self: flex-start; }
.sc a.sly-btn { text-decoration: none; }
.sc a.sly-btn--primary { color: var(--on-primary); }

.sc-compose { display: flex; align-items: flex-end; gap: var(--space-2); padding: var(--space-3); border-top: 1px solid var(--line); background: var(--surface-raised); }
.sc-compose textarea {
  flex: 1; min-width: 0; min-height: 44px; max-height: 120px; padding: 10px var(--space-3); resize: none;
  border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface); color: var(--ink);
  font: 400 16px/22px var(--font-sans); /* 16px: o iOS não dá zoom no campo */
}
.sc-send { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: var(--radius-md); background: var(--primary); color: var(--on-primary); cursor: pointer; }
.sc-send[disabled] { opacity: 0.45; cursor: not-allowed; }
.sc-foot { margin: 0; padding: var(--space-2) var(--space-3) var(--space-3); background: var(--surface-raised); color: var(--ink-muted); font-size: 12px; line-height: 16px; }
.sc-link { padding: 0; border: 0; background: none; color: var(--primary); font: inherit; font-weight: 500; text-decoration: underline; cursor: pointer; }

/* Formulário de contato dentro da conversa */
.sc-lead { display: grid; gap: var(--space-3); padding: var(--space-4); background: var(--surface-raised); border-radius: var(--radius-lg); border-bottom-left-radius: 0; box-shadow: var(--shadow-raised); }
.sc-lead__title { margin: 0; font-weight: 700; }
.sc-lead .ws-field label { display: grid; gap: var(--space-1); }
.sc-lead .ws-field input { font-size: 16px; }
.sc-lead .ws-check { font-size: 13px; line-height: 18px; }
.sc-lead__error { margin: 0; color: var(--ink); border-left: 4px solid var(--accent); padding-left: var(--space-2); font-size: 13px; }
.sc-lead__error[hidden] { display: none; }
.sc-lead--done { margin: 0; }

/* Celular: tela cheia, só o ícone no botão */
@media (max-width: 600px) {
  .sc-launcher { right: var(--space-4); bottom: var(--space-4); width: 56px; padding: 0; justify-content: center; }
  .sc-launcher__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .sc-panel { inset: 0; width: auto; height: auto; height: 100dvh; border: 0; border-radius: 0; }
}
.sc-chips[hidden] { display: none; }
