/* MobilyTech · /express: tutorial flutuante (aberto / minimizado / fechado). Criado por tutorial-widget.js (aprimoramento: sem JS não aparece
   e os mesmos passos ficam na vitrine). Só transform/opacity animam; prefers-reduced-motion desliga as animações. */
.tw { --tw-w: 348px; position: fixed; z-index: 70; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); font-family: var(--f-text, system-ui, sans-serif); color: var(--ink, #090B10); }
.tw[hidden], .tw [hidden] { display: none !important; }

/* ---- botão redondo (estado fechado) ---- */
.tw-fab { display: grid; place-items: center; width: 52px; height: 52px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; color: #fff; background: linear-gradient(145deg, #1478FF, #0F60D9); box-shadow: 0 14px 28px -10px rgb(15 96 217 / .65), 0 0 0 1px rgb(255 255 255 / .5) inset; animation: tw-pop .55s cubic-bezier(.34, 1.56, .64, 1) both; transition: transform .3s var(--ease-out, ease-out), box-shadow .3s; }
.tw-fab svg { width: 22px; height: 22px; margin-left: 2px; }
.tw-fab:hover { transform: scale(1.08); box-shadow: 0 18px 32px -10px rgb(15 96 217 / .75), 0 0 0 1px rgb(255 255 255 / .5) inset; }
.tw-fab:focus-visible, .tw button:focus-visible, .tw a:focus-visible, .tw video:focus-visible { outline: 3px solid #0F60D9; outline-offset: 3px; }

/* ---- cartão (aberto e minimizado) ---- */
.tw-card { width: var(--tw-w); max-width: calc(100vw - 32px); overflow: hidden; border-radius: 20px; background: rgb(255 255 255 / .94); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); box-shadow: 0 30px 60px -26px rgb(10 26 58 / .55), 0 0 0 1px rgb(9 11 16 / .07); transform-origin: 100% 100%; animation: tw-sobe .5s cubic-bezier(.16, 1, .3, 1) both; }
.tw-cab { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; }
.tw-ico { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #fff; background: linear-gradient(145deg, #1478FF, #0F60D9); }
.tw-ico svg { width: 13px; height: 13px; margin-left: 1px; }
.tw-tit { flex: 1 1 auto; min-width: 0; margin: 0; font: 600 14px/1.25 var(--f-text, system-ui, sans-serif); letter-spacing: -.01em; }
.tw-tit small { display: block; margin-top: 1px; font: 400 12px/1.3 var(--f-text, system-ui, sans-serif); color: #4A5160; letter-spacing: 0; }
.tw-bts { flex: none; display: flex; gap: 2px; }
.tw-bt { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: #4A5160; cursor: pointer; transition: background .2s, color .2s; }
.tw-bt:hover { background: rgb(9 11 16 / .07); color: #090B10; }
.tw-bt svg { width: 18px; height: 18px; }

.tw-corpo { padding: 0 14px 14px; }
.tw-tela { position: relative; overflow: hidden; border-radius: 14px; aspect-ratio: 16 / 9; background: linear-gradient(145deg, #0A1A3A, #12306B); color: #fff; }
.tw-tela video { display: block; width: 100%; height: 100%; object-fit: cover; background: #0A1A3A; }
.tw-breve { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; text-align: center; padding: 12px; }
.tw-breve svg { width: 38px; height: 38px; padding: 10px; border-radius: 50%; background: rgb(255 255 255 / .14); box-sizing: border-box; margin-left: 0; }
.tw-breve strong { font: 600 15px/1.2 var(--f-text, system-ui, sans-serif); }
.tw-breve span { font: 400 12.5px/1.3 var(--f-text, system-ui, sans-serif); color: rgb(255 255 255 / .82); }

.tw-passos { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; counter-reset: tw; }
.tw-passos li { counter-increment: tw; display: flex; align-items: center; gap: 10px; padding: 7px 6px; border-radius: 10px; font: 500 14px/1.3 var(--f-text, system-ui, sans-serif); }
.tw-passos li::before { content: counter(tw); flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #E7F0FF; color: #0F4FB5; font: 600 12.5px/1 var(--f-mono, ui-monospace, monospace); }
.tw-passos a { color: inherit; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0% 1.5px no-repeat; transition: background-size .4s var(--ease-out, ease-out); padding-bottom: 2px; }
.tw-passos a:hover, .tw-passos a:focus-visible { background-size: 100% 1.5px; }
.tw-nota { margin: 8px 6px 0; font: 400 12px/1.4 var(--f-text, system-ui, sans-serif); color: #4A5160; }

/* minimizado: só a barra do cabeçalho (compacta) */
.tw[data-estado="min"] .tw-card { width: auto; max-width: min(300px, calc(100vw - 32px)); border-radius: 999px; }
.tw[data-estado="min"] .tw-cab { padding: 6px 6px 6px 8px; }
.tw[data-estado="min"] .tw-tit small { display: none; }
.tw[data-estado="min"] .tw-ico { width: 32px; height: 32px; }
.tw[data-estado="min"] .tw-tit { white-space: nowrap; padding-right: 4px; }

@keyframes tw-pop { from { opacity: 0; transform: scale(.5) } }
@keyframes tw-sobe { from { opacity: 0; transform: translate3d(0, 16px, 0) scale(.96) } }

/* celular: compacto; recua enquanto um CTA principal está na tela (nunca cobre os botões) */
@media (max-width: 899px) {
  .tw { right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); transition: transform .4s var(--ease-out, ease-out), opacity .3s; }
  .tw[data-estado="aberto"] { left: max(12px, env(safe-area-inset-left)); }
  .tw[data-estado="aberto"] .tw-card { width: auto; max-width: none; max-height: min(78vh, 560px); overflow: auto; border-radius: 18px; }
  .tw[data-estado="aberto"] .tw-tela { aspect-ratio: 16 / 8; }
  .tw[data-estado="min"] .tw-tit { font-size: 13px; }
  .tw.tw-recua:not([data-estado="aberto"]) { transform: translate3d(0, 140%, 0); opacity: 0; pointer-events: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tw, .tw * { animation: none !important; transition: none !important; }
}
@media print { .tw { display: none !important; } }
