/* Assistra product tour: the player around the demo screens (tour.js). */
:root {
  --tr-ink: #111827; --tr-ink-2: #374151; --tr-muted: #4b5563; --tr-line: #e5e7eb;
  --tr-green: #0e9f6e; --tr-green-ink: #0b7a55; --tr-green-soft: #e7f7f0; --tr-green-light: #3fd39b;
  --tr-blue: #1a73e8; --tr-blue-dark: #1560c4; --tr-bar: #111827;
  --tr-font: "Lato", "Segoe UI", system-ui, -apple-system, sans-serif;
  --tr-move: 700ms;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #f4f6f9; font-family: var(--tr-font); color: var(--tr-ink); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--tr-green-light); outline-offset: 2px; }

/* the demo screens: two frames that cross-fade when the tour changes page */
#tr-stage { position: fixed; inset: 0; }
.tr-scene { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; opacity: 0; pointer-events: none; transition: opacity .28s ease; background: #f4f6f9; }
.tr-scene.front { opacity: 1; }

/* spotlight, cursor, caption */
.tr-ring { position: fixed; z-index: 10; pointer-events: none; border-radius: 10px; opacity: 0;
  box-shadow: 0 0 0 3px rgba(255,255,255,.96), 0 0 0 7px rgba(63,211,155,.55), 0 0 0 9999px rgba(15,23,42,.40);
  transition: left .42s ease, top .42s ease, width .42s ease, height .42s ease, opacity .25s ease; }
.tr-ring.on { opacity: 1; }
.tr-veil { position: fixed; inset: 0; z-index: 10; pointer-events: none; background: rgba(15,23,42,.40); opacity: 0; transition: opacity .25s ease; }
.tr-veil.on { opacity: 1; }

.tr-cursor { position: fixed; z-index: 30; left: 0; top: 0; width: 28px; height: 28px; pointer-events: none; opacity: 0;
  transition: transform var(--tr-move) cubic-bezier(.45,0,.2,1), opacity .2s ease; filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
.tr-cursor.on { opacity: 1; }
.tr-cursor svg { display: block; }
.tr-ripple { position: absolute; left: -12px; top: -12px; width: 30px; height: 30px; border-radius: 50%; background: rgba(14,159,110,.45); animation: tr-ripple .6s ease-out forwards; }
@keyframes tr-ripple { from { transform: scale(.35); opacity: .9; } to { transform: scale(2.3); opacity: 0; } }

.tr-card { position: fixed; z-index: 20; width: 340px; max-width: calc(100vw - 24px); background: #fff; border-radius: 14px; overflow: hidden; opacity: 0;
  box-shadow: 0 18px 44px rgba(15,23,42,.32), 0 2px 6px rgba(15,23,42,.14); transition: left .42s ease, top .42s ease, opacity .25s ease; }
.tr-card.on { opacity: 1; }
.tr-card-in { padding: 14px 16px 13px; }
.tr-kicker { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--tr-green-ink); }
.tr-kicker::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--tr-green); }
.tr-title { margin: 6px 0 4px; font-size: 16px; line-height: 1.3; font-weight: 900; color: var(--tr-ink); }
.tr-body { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--tr-muted); }
.tr-act { margin-top: 10px; display: none; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; background: var(--tr-green-soft); color: #065f46; font-size: 12.5px; font-weight: 700; }
.tr-act.on { display: flex; }
.tr-act i { font-size: 11px; }
.tr-timer { height: 3px; background: var(--tr-line); }
.tr-timer > i { display: block; height: 3px; width: 0; background: var(--tr-green); }

.tr-toast { position: fixed; z-index: 25; left: 50%; top: 64px; transform: translate(-50%, -10px); opacity: 0; display: flex; align-items: center; gap: 10px;
  background: var(--tr-bar); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; box-shadow: 0 10px 26px rgba(15,23,42,.3); transition: opacity .3s ease, transform .3s ease; pointer-events: none; }
.tr-toast.on { opacity: 1; transform: translate(-50%, 0); }
.tr-toast i { color: var(--tr-green-light); font-size: 16px; }

/* player bar */
.tr-bar { position: fixed; z-index: 40; left: 50%; bottom: 16px; transform: translateX(-50%); width: min(760px, calc(100vw - 24px));
  display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 18px; border-radius: 16px; background: var(--tr-bar); color: #fff; box-shadow: 0 14px 34px rgba(15,23,42,.38); }
.tr-info { flex: 1; min-width: 0; }
.tr-line { display: flex; align-items: center; gap: 8px; font-size: 13px; white-space: nowrap; }
.tr-line b { overflow: hidden; text-overflow: ellipsis; }
.tr-stepno { color: #aeb6c2; }
.tr-badge { margin-left: auto; font-size: 10px; font-weight: 900; letter-spacing: .06em; padding: 3px 8px; border-radius: 999px; background: var(--tr-green-light); color: #06291d; }
.tr-segs { display: flex; gap: 4px; margin-top: 8px; }
.tr-seg { flex: 1; height: 14px; padding: 5px 0; border: 0; background: none; cursor: pointer; }
.tr-seg i { display: block; height: 4px; border-radius: 2px; background: rgba(255,255,255,.2); overflow: hidden; }
.tr-seg i b { display: block; height: 4px; width: 0; background: var(--tr-green-light); }
.tr-seg:hover i { background: rgba(255,255,255,.35); }
.tr-ctrls { display: flex; align-items: center; gap: 2px; }
.tr-btn { width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: #e5e7eb; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 17px; }
.tr-btn:hover { background: rgba(255,255,255,.1); color: #fff; }
.tr-btn.play { width: 44px; height: 44px; background: #fff; color: var(--tr-ink); font-size: 20px; margin: 0 2px; }
.tr-btn.play:hover { background: #e5e7eb; }
.tr-btn.speed { width: auto; min-width: 42px; height: 30px; padding: 0 8px; border: 1px solid #4b5563; border-radius: 999px; font-size: 12px; font-weight: 900; }

/* chapter list (above the bar) */
.tr-chapters { position: fixed; z-index: 45; left: 50%; bottom: 88px; transform: translateX(-50%); width: min(420px, calc(100vw - 24px)); max-height: min(520px, calc(100vh - 120px)); overflow: auto;
  background: #fff; border-radius: 14px; box-shadow: 0 18px 44px rgba(15,23,42,.32); padding: 8px; display: none; }
.tr-chapters.on { display: block; }
.tr-chapters h2 { margin: 6px 10px 8px; font-size: 12px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--tr-muted); }
.tr-ch-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 10px; border: 0; border-radius: 10px; background: none; text-align: left; cursor: pointer; }
.tr-ch-item:hover { background: #f3f4f6; }
.tr-ch-item.cur { background: var(--tr-green-soft); }
.tr-ch-n { flex: none; width: 28px; height: 28px; border-radius: 8px; background: #f2fbf7; color: var(--tr-green-ink); font-size: 13px; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.tr-ch-item.done .tr-ch-n { background: var(--tr-green); color: #fff; }
.tr-ch-t { min-width: 0; flex: 1; }
.tr-ch-t b { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--tr-ink); }
.tr-ch-t small { display: block; font-size: 12px; color: var(--tr-muted); margin-top: 1px; }
.tr-admin { font-size: 10px; font-weight: 900; letter-spacing: .04em; padding: 1px 6px; border-radius: 4px; background: #eef2ff; color: #3730a3; }

/* start and end screens */
.tr-screen { position: fixed; inset: 0; z-index: 50; background: rgba(15,23,42,.6); display: none; align-items: center; justify-content: center; padding: 16px; overflow: auto; }
.tr-screen.on { display: flex; }
.tr-panel { width: min(880px, 100%); background: #fff; border-radius: 18px; padding: 30px 32px 26px; box-shadow: 0 28px 70px rgba(15,23,42,.4); margin: auto; }
.tr-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.tr-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--tr-green-soft); color: var(--tr-green-ink); }
.tr-panel h1 { margin: 12px 0 6px; font-size: 26px; font-weight: 900; color: var(--tr-ink); }
.tr-panel p.lead { margin: 0; max-width: 600px; font-size: 15px; line-height: 1.55; color: var(--tr-muted); }
.tr-x { flex: none; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #f3f4f6; color: var(--tr-ink-2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 16px; }
.tr-x:hover { background: #e5e7eb; }
.tr-playall { margin-top: 22px; width: 100%; display: flex; align-items: center; gap: 16px; padding: 16px 18px; border: 0; border-radius: 14px; background: var(--tr-bar); color: #fff; text-align: left; cursor: pointer; }
.tr-playall:hover { background: #1f2937; }
.tr-playall .ic { flex: none; width: 46px; height: 46px; border-radius: 50%; background: #fff; color: var(--tr-ink); display: flex; align-items: center; justify-content: center; font-size: 22px; }
.tr-playall .tx { flex: 1; }
.tr-playall .tx b { display: block; font-size: 16px; font-weight: 900; }
.tr-playall .tx small { display: block; font-size: 13px; color: #c7cdd6; margin-top: 2px; }
.tr-playall .tg { font-size: 11px; font-weight: 900; letter-spacing: .06em; padding: 4px 10px; border-radius: 999px; background: var(--tr-green-light); color: #06291d; }
.tr-panel h2 { margin: 22px 0 10px; font-size: 12px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--tr-muted); }
.tr-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tr-grid .tr-ch-item { border: 1px solid var(--tr-line); }
.tr-note { margin: 18px 0 0; font-size: 13px; color: var(--tr-muted); }
.tr-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.tr-cta { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid #d1d5db; background: #fff; color: var(--tr-ink); font-size: 14px; font-weight: 900; text-decoration: none; cursor: pointer; }
.tr-cta.primary { border-color: var(--tr-blue); background: var(--tr-blue); color: #fff; }
.tr-cta.primary:hover { background: var(--tr-blue-dark); }
.tr-cta:hover { border-color: #9ca3af; }

@media (max-width: 760px) {
  .tr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tr-badge, .tr-btn.chap { display: none; }
  .tr-bar { padding-left: 12px; }
  .tr-panel { padding: 22px 18px; }
}
@media (max-width: 480px) {
  .tr-grid { grid-template-columns: minmax(0, 1fr); }
  .tr-btn.restart { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  :root { --tr-move: 1ms; }
  .tr-ring, .tr-card, .tr-scene, .tr-toast { transition: none; }
  .tr-ripple { animation: none; display: none; }
}
