/* StockMeta AI — guided product tour (assets/tour.js). Works on the dark portal and on light admin pages. */
.tsm-tour { position: fixed; inset: 0; z-index: 2147483000; pointer-events: none; display: none; font: 14px/1.5 "Archivo", "Segoe UI", system-ui, -apple-system, sans-serif; color: #e9e6ff; }
.tsm-tour.is-on { display: block; }
.tsm-tour * { box-sizing: border-box; }
.tsm-tour-shade { position: fixed; inset: 0; background: rgba(6, 4, 20, .62); opacity: 0; transition: opacity .3s ease; pointer-events: auto; }
.tsm-tour-spot { position: fixed; top: 0; left: 0; width: 0; height: 0; border-radius: 14px; box-shadow: 0 0 0 3px rgba(167, 139, 250, .95), 0 0 0 9999px rgba(6, 4, 20, .58), 0 0 36px 6px rgba(139, 92, 246, .55); transition: transform .45s cubic-bezier(.2, .8, .2, 1), width .45s cubic-bezier(.2, .8, .2, 1), height .45s cubic-bezier(.2, .8, .2, 1), opacity .3s ease; }
.tsm-tour-cursor { position: fixed; top: 0; left: 0; width: 26px; height: 26px; opacity: 0; transition: transform .8s cubic-bezier(.2, .8, .2, 1) .15s, opacity .3s ease; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .45)); }
.tsm-tour-cursor svg { width: 26px; height: 26px; fill: #fff; stroke: #1e1b4b; stroke-width: 1.4; stroke-linejoin: round; }
.tsm-tour-card { position: fixed; top: 0; left: 0; width: 360px; padding: 16px 18px 16px; border-radius: 16px; background: linear-gradient(180deg, rgba(30, 24, 66, .98), rgba(19, 15, 44, .98)); border: 1px solid rgba(167, 139, 250, .45); box-shadow: 0 24px 60px -18px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .04) inset; pointer-events: auto; transition: left .45s cubic-bezier(.2, .8, .2, 1), top .45s cubic-bezier(.2, .8, .2, 1); }
.tsm-tour-card.is-in { animation: tsm-tour-in .35s ease both; }
@keyframes tsm-tour-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.tsm-tour-kick { margin: 0 0 6px; font-size: 11px; font-weight: 800; letter-spacing: .09em; color: #5eead4; }
.tsm-tour.is-paused .tsm-tour-kick { color: #fbbf24; }
.tsm-tour-title { margin: 0 0 6px; font-size: 18px; line-height: 1.25; font-weight: 800; color: #fff; }
.tsm-tour-text { margin: 0; color: #cfc8f5; font-size: 14px; }
.tsm-tour-card::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: 0; height: 3px; border-radius: 3px; background: linear-gradient(90deg, #22d3ee, #8b5cf6, #ec4899); transform-origin: left; transform: scaleX(0); opacity: .9; }
.tsm-tour.is-ticking:not(.is-paused) .tsm-tour-card::after { animation: tsm-tour-tick var(--tsm-tour-d, 5s) linear forwards; }
@keyframes tsm-tour-tick { to { transform: scaleX(1); } }

.tsm-tour-bar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; width: min(760px, calc(100vw - 24px)); padding: 10px 12px; border-radius: 18px; background: rgba(14, 11, 34, .96); border: 1px solid rgba(167, 139, 250, .35); box-shadow: 0 20px 50px -16px rgba(0, 0, 0, .8); pointer-events: auto; }
.tsm-tour-brand { flex: none; padding: 6px 10px; border-radius: 10px; font-weight: 800; font-size: 13px; color: #fff; background: linear-gradient(135deg, #7c3aed, #db2777); }
.tsm-tour-info { flex: 1; min-width: 0; display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 2px 10px; }
.tsm-tour-chap { color: #fff; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tsm-tour-count { color: #a99fe0; font-size: 12px; white-space: nowrap; }
.tsm-tour-segs { grid-column: 1 / -1; display: flex; gap: 4px; }
.tsm-tour-segs i { flex: 1; height: 4px; border-radius: 3px; background: rgba(255, 255, 255, .14); }
.tsm-tour-segs i.is-done { background: #8b5cf6; }
.tsm-tour-segs i.is-on { background: linear-gradient(90deg, #22d3ee, #ec4899); }
.tsm-tour-tag { flex: none; padding: 3px 8px; border-radius: 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; color: #c4b5fd; border: 1px solid rgba(167, 139, 250, .4); }
.tsm-tour-b { flex: none; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer; transition: background .15s ease, transform .15s ease; font: 700 12px/1 inherit; }
.tsm-tour-b:hover:not(:disabled) { background: rgba(255, 255, 255, .18); }
.tsm-tour-b:disabled { opacity: .35; cursor: default; }
.tsm-tour-b:focus-visible { outline: 2px solid #a78bfa; outline-offset: 2px; }
.tsm-tour-b svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.tsm-tour-b svg .f { fill: currentColor; stroke: none; }
.tsm-tour-play { width: 44px; height: 44px; background: #fff; color: #1e1b4b; }
.tsm-tour-play:hover:not(:disabled) { background: #ede9fe; }
.tsm-tour-speed { width: auto; min-width: 40px; padding: 0 10px; border-radius: 999px; font-size: 12px; }
.tsm-tour-menu { position: absolute; right: 10px; bottom: calc(100% + 8px); min-width: 200px; padding: 6px; border-radius: 14px; background: rgba(20, 16, 46, .98); border: 1px solid rgba(167, 139, 250, .35); box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .8); }
.tsm-tour-mi { display: block; width: 100%; padding: 8px 12px; border: 0; border-radius: 10px; background: none; color: #e9e6ff; text-align: left; font: 600 13px/1.3 inherit; cursor: pointer; }
.tsm-tour-mi:hover, .tsm-tour-mi.is-on { background: rgba(139, 92, 246, .25); color: #fff; }
.tsm-tour.is-leaving .tsm-tour-card { opacity: .4; }

/* the "Tour" button the pages put in their header */
.tsm-tour-launch { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; border: 1px solid rgba(167, 139, 250, .5); background: rgba(139, 92, 246, .16); color: #fff; font: 700 13px/1 inherit; cursor: pointer; text-decoration: none; transition: background .15s ease, transform .15s ease; }
.tsm-tour-launch:hover { background: rgba(139, 92, 246, .32); transform: translateY(-1px); color: #fff; }
.tsm-tour-launch::before { content: ""; width: 0; height: 0; border-left: 7px solid currentColor; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }

@media (max-width: 640px) {
	.tsm-tour-brand, .tsm-tour-tag, .tsm-tour-speed, .tsm-tour-count { display: none; }
	.tsm-tour-bar { bottom: 10px; gap: 6px; }
	.tsm-tour-card { width: calc(100vw - 24px); }
}
@media (prefers-reduced-motion: reduce) {
	.tsm-tour-spot, .tsm-tour-cursor, .tsm-tour-card { transition: none; }
	.tsm-tour-card.is-in { animation: none; }
}
