/* Tour guiado: veste o driver.js (vendor/driver.css) com os tokens do tema MovivFlow.
   Nenhuma cor é escrita aqui: tudo vem de var(--token) do tema-movivflow.css, então claro e escuro
   (classe .dark no <html>) funcionam sem regra extra. Carregado depois do driver.css e do style.css. */

/* ---------- botão fixo "Ver tour" ---------- */
.btn-tour {
  position: fixed; right: 16px; bottom: 16px; z-index: 900;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 6px 16px 6px 8px;
  border: 1px solid var(--primary); border-radius: 999px;
  background: var(--primary); color: var(--primary-foreground);
  font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer;
  box-shadow: 0 6px 20px color-mix(in srgb, var(--print-ink) 30%, transparent);
}
.btn-tour[hidden] { display: none; }
.btn-tour:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-tour:active { background: var(--primary-active); border-color: var(--primary-active); }
.btn-tour:focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; }
.btn-tour-icone {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary-foreground); color: var(--primary); font-weight: 800; line-height: 1;
}
/* O botão fica sobre o canto da página: reserva espaço para ele não esconder o fim da lista. */
body:not(.tela-login) #app { padding-bottom: 4.5rem; }

/* ---------- balão ---------- */
.driver-popover.cbs-tour {
  background-color: var(--popover); color: var(--popover-foreground);
  font-family: var(--font-sans); border: 1px solid var(--border); border-radius: var(--radius);
  min-width: 250px; max-width: min(320px, calc(100vw - 32px)); padding: 16px;
  box-shadow: 0 12px 32px color-mix(in srgb, var(--print-ink) 35%, transparent);
}
.cbs-tour .driver-popover-title { color: var(--popover-foreground); font-size: 1.05rem; font-weight: 700; line-height: 1.35; padding-inline-end: 28px; }
.cbs-tour .driver-popover-description { color: var(--popover-foreground); font-size: .92rem; line-height: 1.5; }
.cbs-tour .driver-popover-progress-text { color: var(--muted-foreground); font-size: .8rem; }

/* fechar (X): alvo de toque confortável */
.cbs-tour .driver-popover-close-btn {
  top: 8px; right: 8px; width: 32px; height: 32px; border-radius: var(--controle);
  color: var(--muted-foreground); font-size: 1.25rem; line-height: 32px;
}
.cbs-tour .driver-popover-close-btn:hover { color: var(--popover-foreground); background: var(--accent); }

/* botões Voltar / Próximo / Concluir */
.cbs-tour .driver-popover-footer { margin-top: 16px; gap: 12px; }
.cbs-tour .driver-popover-footer-btn {
  min-height: 36px; padding: 6px 14px; border: 1px solid var(--border); border-radius: var(--controle);
  background-color: transparent; color: var(--popover-foreground);
  font-family: var(--font-sans); font-size: .88rem; font-weight: 600; line-height: 1.3;
}
.cbs-tour .driver-popover-footer-btn:hover { background-color: var(--accent); }
.cbs-tour .driver-popover-footer-btn:focus-visible,
.cbs-tour .driver-popover-close-btn:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.cbs-tour .driver-popover-next-btn,
.cbs-tour .driver-popover-done-btn { background-color: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }
.cbs-tour .driver-popover-next-btn:hover,
.cbs-tour .driver-popover-done-btn:hover { background-color: var(--primary-hover); border-color: var(--primary-hover); }
.cbs-tour .driver-popover-next-btn:active,
.cbs-tour .driver-popover-done-btn:active { background-color: var(--primary-active); border-color: var(--primary-active); }

/* seta do balão: o lado colorido segue o fundo do balão */
.cbs-tour .driver-popover-arrow-side-left { border-left-color: var(--popover); }
.cbs-tour .driver-popover-arrow-side-right { border-right-color: var(--popover); }
.cbs-tour .driver-popover-arrow-side-top { border-top-color: var(--popover); }
.cbs-tour .driver-popover-arrow-side-bottom { border-bottom-color: var(--popover); }

/* fundo escurecido: --print-ink é o azul-noite do tema e não muda no modo escuro (a opacidade vem do driver) */
.driver-overlay path { fill: var(--print-ink) !important; }

/* o destaque do elemento ganha o anel de foco do tema */
.driver-active .driver-active-element { border-radius: var(--controle); }

@media (max-width: 480px) {
  .btn-tour { right: 12px; bottom: 12px; padding: 8px; }
  .btn-tour-texto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .btn-tour-icone { width: 28px; height: 28px; }
}

@media print { .btn-tour { display: none !important; } }
