/* estilo.css — Liv.IA HUD (#259, refeita na #507). Só tokens do design system.
   A folha de tela-plugin carrega no app inteiro: tudo aqui fica sob .hud. */
.hud { position: relative; width: 100%; flex: 1 1 auto; box-sizing: border-box; height: calc(100dvh - 32px); min-height: 520px; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--ds-r-lg, 12px); background: var(--bg);
  color: var(--ink); overscroll-behavior: none; }
.hud .hud-cena { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: crosshair; }

.hud .hud-topo { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between;
  align-items: baseline; padding: 16px 20px 0; pointer-events: none; }
.hud .marca { margin: 0; font-weight: 800; letter-spacing: 0.2em; font-size: 18px; color: var(--ink-accent); text-transform: uppercase; }
.hud .marca small { font-weight: 500; letter-spacing: 0.16em; font-size: 11px; color: var(--muted); margin-left: 10px; }
.hud .hud-legenda { font-size: 12px; color: var(--muted); letter-spacing: 0.08em; }

.hud .hud-lado { position: absolute; top: 56px; left: 20px; display: grid; gap: 14px; max-width: 240px; }
.hud .hud-telemetria, .hud .hud-recentes ul { margin: 0; padding: 0; list-style: none; font-size: 13px; }
.hud .hud-telemetria li, .hud .hud-recentes li { display: flex; align-items: center; gap: 8px; padding: 3px 0; color: var(--muted); }
.hud .hud-telemetria b { color: var(--ink); font-variant-numeric: tabular-nums; min-width: 28px; text-align: right; }
.hud .hud-telemetria .total { margin-top: 6px; border-top: 1px solid var(--line-soft); padding-top: 6px; }
.hud .hud-ponto { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.hud .hud-recentes h2 { margin: 0 0 4px; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.hud .hud-recentes a { color: var(--ink-accent); font-variant-numeric: tabular-nums; font-weight: 700; }
.hud .hud-carregando, .hud .hud-vazio { margin: 0; font-size: 13px; color: var(--muted); }

.hud .hud-aviso { position: absolute; top: 56px; right: 20px; max-width: 320px; font-size: 12.5px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: var(--ds-r, 8px); background: var(--bg); color: var(--ink-warn); }
.hud .hud-aviso.erro { color: var(--ink-err); }

.hud .hud-card { position: absolute; right: 20px; top: 110px; width: 300px; padding: 14px 16px; border-radius: var(--ds-r-lg, 12px);
  background: var(--bg); border: 1px solid var(--line); box-shadow: var(--ds-shadow-2, none); }
.hud .hud-card .tipo { font-size: 11px; text-transform: uppercase; letter-spacing: 0.2em; color: var(--ink-accent); }
.hud .hud-card h2 { margin: 6px 0; font-size: 17px; font-weight: 700; overflow-wrap: anywhere; }
.hud .hud-card p { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.hud .hud-card .estado { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.hud .hud-card .viz { font-size: 12px; color: var(--muted); margin-top: 4px; }
.hud .hud-card a { display: inline-block; margin-top: 12px; color: var(--ink-accent); font-weight: 700; min-height: 32px; }
.hud .hud-card .fechar { position: absolute; top: 4px; right: 4px; width: 36px; height: 36px; background: none; border: 0;
  color: var(--muted); font-size: 20px; cursor: pointer; }

.hud .hud-conversa { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); width: min(640px, calc(100% - 32px)); }
.hud .hud-conversa ol { list-style: none; margin: 0 0 10px; padding: 0; max-height: 22vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 6px; overscroll-behavior: contain; }
.hud .hud-conversa li { font-size: 14px; line-height: 1.4; padding: 8px 12px; border-radius: var(--ds-r-lg, 12px); max-width: 85%;
  background: var(--bg); border: 1px solid var(--line); }
.hud .hud-conversa li.voce { align-self: flex-end; }
.hud .hud-conversa li.livia { align-self: flex-start; }
.hud .hud-conversa li.parcial { opacity: 0.7; font-style: italic; }
.hud .hud-conversa em { color: var(--muted); font-size: 11px; }
.hud .hud-conversa form { display: flex; gap: 8px; padding: 6px; border-radius: var(--ds-r-pill, 999px); background: var(--bg); border: 1px solid var(--line); }
.hud .hud-conversa input { flex: 1; min-width: 0; background: none; border: 0; color: var(--ink); font: inherit; font-size: 15px; padding: 0 8px; }
.hud .hud-conversa input::placeholder { color: var(--muted); }
.hud .hud-conversa button { border: 1px solid var(--line); border-radius: var(--ds-r-pill, 999px); font: inherit; font-weight: 700;
  cursor: pointer; padding: 0 16px; min-height: 44px; background: var(--bg); color: var(--ink); }
.hud .hud-conversa button.enviar { border-color: var(--ds-accent); color: var(--ink-accent); }
.hud .hud-conversa button:disabled { opacity: 0.45; cursor: default; }
.hud .hud-conversa button.mic { width: 44px; padding: 0; font-size: 16px; }
.hud .hud-conversa button.mic.ouvindo { border-color: var(--ds-warn); box-shadow: 0 0 0 3px var(--ds-glow, transparent); }
.hud .hud-conversa .modo { text-align: center; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }
.hud :focus-visible { outline: 2px solid var(--ds-accent); outline-offset: 2px; }

/* 3 larguras: celular · tablet · monitor */
@media (max-width: 640px) {
  .hud { height: 82dvh; min-height: 480px; border-radius: var(--ds-r, 8px); }
  .hud .hud-topo { padding: 12px 12px 0; }
  .hud .marca { font-size: 15px; } .hud .marca small, .hud .hud-legenda { display: none; }
  .hud .hud-lado { left: 12px; top: 40px; max-width: 60%; }
  .hud .hud-telemetria { font-size: 12px; }
  .hud .hud-recentes { display: none; }
  .hud .hud-aviso { left: 12px; right: 12px; top: auto; bottom: 150px; max-width: none; }
  .hud .hud-card { left: 12px; right: 12px; width: auto; top: auto; bottom: 150px; }
  /* #751: a bolha da Liv (shell, fixed 56 px a 16 px do canto) ficava em cima
     do botão Perguntar e o toque não chegava nele: a conversa termina antes. */
  .hud .hud-conversa { left: 12px; transform: none; width: calc(100% - 24px - 72px); bottom: 12px; }
  .hud .hud-conversa ol { max-height: 16vh; }
}
@media (min-width: 641px) and (max-width: 1100px) {
  .hud .hud-card { width: 260px; }
}
@media (min-width: 1600px) {
  .hud .marca { font-size: 22px; } .hud .hud-telemetria { font-size: 15px; }
  .hud .hud-card { width: 360px; } .hud .hud-conversa { width: 760px; }
  .hud .hud-conversa li { font-size: 16px; }
}
