/* WP Feint product tour (inc/product-tour.php, assets/js/tour.js). Tokens from site.css. */

.wpm-tour { --tour-radius: 14px; container-type: inline-size; }
/* With JavaScript the player replaces the list: hide the list before the script runs (no lazy image fetched). */
.js .wpm-tour[data-wpm-tour] .tour-fallback { display: none; }
.wpm-tour .tour-head { max-width: 760px; margin: 0 0 28px; }
.wpm-tour.section .tour-head { margin-inline: auto; text-align: center; }
.wpm-tour .tour-head h2 { margin: 10px 0 8px; }
.wpm-tour .tour-head p:last-child { color: var(--muted); margin: 0; }

/* ---------------------------------------------------------------- player */
.tour-player { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: center; }
.tour-player[hidden], .tour-fallback[hidden] { display: none; }

.tour-browser { border-radius: var(--tour-radius); background: #fff; border: 1px solid var(--edge); box-shadow: 0 24px 60px -24px rgba(16, 36, 73, .35), 0 2px 6px rgba(16, 36, 73, .06); overflow: hidden; }
.tour-bar { display: flex; align-items: center; gap: 14px; height: 38px; padding: 0 14px; background: #eef2f8; border-bottom: 1px solid var(--edge); }
.tour-dots { display: inline-flex; gap: 6px; flex: none; }
.tour-dots i { width: 10px; height: 10px; border-radius: 50%; background: #c7d0de; }
.tour-url { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 12.5px/26px var(--font); color: #4b5a73; background: #fff; border-radius: 13px; padding: 0 12px; }

.tour-screen { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #f0f0f1; }
.tour-zoom { position: absolute; inset: 0; transform: scale(1); transition: transform 300ms ease; will-change: transform; }
.tour-zoom.is-zoomed { transform: scale(1.06); transition: transform 5s cubic-bezier(.4, 0, .2, 1); }
.tour-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 450ms ease; }
.tour-img.is-on { opacity: 1; }

.tour-cursor { position: absolute; left: 62%; top: 78%; width: 22px; height: auto; margin: -2px 0 0 -2px; opacity: 0; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35)); transition: left 950ms cubic-bezier(.45, 0, .2, 1), top 950ms cubic-bezier(.45, 0, .2, 1), opacity 300ms ease, transform 150ms ease; transform-origin: 2px 2px; z-index: 3; pointer-events: none; }
.tour-cursor.is-on { opacity: 1; }
.tour-cursor.is-click { transform: scale(.85); }

.tour-ring { position: absolute; margin: -6px 0 0 -6px; padding: 6px; box-sizing: content-box; border: 3px solid var(--blue); border-radius: 10px; box-shadow: 0 0 0 6px rgba(64, 127, 253, .22); opacity: 0; transform: scale(1.08); transition: opacity 400ms ease, transform 400ms ease; z-index: 2; pointer-events: none; }
.tour-ring.is-on { opacity: 1; transform: scale(1); animation: tour-pulse 1.8s ease-in-out 400ms infinite; }
@keyframes tour-pulse { 50% { box-shadow: 0 0 0 10px rgba(64, 127, 253, .12); } }

.tour-ripple { position: absolute; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; border: 3px solid var(--blue); opacity: 0; transform: scale(.2); z-index: 2; pointer-events: none; }
.tour-ripple.is-on { animation: tour-ripple 650ms ease-out forwards; }
@keyframes tour-ripple { 0% { opacity: .9; transform: scale(.2); } 100% { opacity: 0; transform: scale(1.3); } }

.tour-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(16, 36, 73, .08); z-index: 4; }
.tour-progress span { display: block; height: 100%; width: 0; background: var(--blue); }
.is-playing .tour-progress span { animation: tour-progress linear forwards; animation-duration: 7s; }
@keyframes tour-progress { to { width: 100%; } }

/* side panel */
.tour-side { display: flex; flex-direction: column; gap: 14px; }
.tour-count { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--blue); }
.tour-caption { min-height: 168px; }
.tour-caption .tour-title { margin: 0 0 8px; font-size: 1.3rem; line-height: 1.3; color: var(--ink); }
.tour-caption .tour-text { margin: 0; color: var(--muted); line-height: 1.6; }

.tour-controls { display: flex; gap: 8px; align-items: center; }
.tour-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; min-height: 44px; padding: 0 12px; border: 1px solid var(--edge); border-radius: var(--radius-sm, 9px); background: #fff; color: var(--ink); font: 600 14px/1 var(--font); cursor: pointer; transition: background .15s, border-color .15s; }
.tour-btn:hover { border-color: var(--blue); color: var(--blue); }
.tour-btn:focus-visible, .tour-dot:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.tour-play { background: var(--blue); border-color: var(--blue); color: #fff; padding: 0 16px; }
.tour-play:hover { background: var(--blue-dark, #0752d7); border-color: var(--blue-dark, #0752d7); color: #fff; }
.tour-play .i-pause, .tour-play.is-playing .i-play { display: none; }
.tour-play.is-playing .i-pause { display: inline; }

.tour-steps { display: flex; flex-wrap: wrap; gap: 4px; }
.tour-dot { position: relative; width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 50%; }
.tour-dot::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: #c3cddd; transition: background .2s, inset .2s; }
.tour-dot:hover::before { background: var(--muted); }
.tour-dot[aria-current]::before { inset: 6px; background: var(--blue); }
.tour-hint { margin: 0; font-size: 13px; color: var(--muted); }

/* ---------------------------------------------------------------- static list (no JS, reduced motion, transcript) */
.tour-list { list-style: none; counter-reset: tour; margin: 0; padding: 0; display: grid; gap: 22px; }
.tour-list-item { counter-increment: tour; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 22px; align-items: center; padding: 18px; border: 1px solid var(--edge); border-radius: var(--radius); background: #fff; }
.tour-list-text h3 { margin: 0 0 6px; font-size: 1.1rem; }
.tour-list-text h3::before { content: counter(tour) ". "; color: var(--blue); }
.tour-list-text p { margin: 0; color: var(--muted); }
.tour-list-img { width: 100%; height: auto; border-radius: 9px; border: 1px solid var(--edge); }
.tour-transcript .tour-list-item { grid-template-columns: 1fr; padding: 12px 16px; }
.tour-transcript { margin-top: 16px; }
.tour-transcript summary { cursor: pointer; font-weight: 600; color: var(--blue); }
.tour-transcript summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.tour-transcript .tour-list { margin-top: 14px; }

/* ---------------------------------------------------------------- video */
.tour-video { margin: 0; }
.tour-video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: var(--tour-radius); background: #e9eef8; box-shadow: 0 24px 60px -24px rgba(16, 36, 73, .35); }
.tour-video figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); }

/* ---------------------------------------------------------------- responsive */
@container (max-width: 960px) {
	.tour-player { grid-template-columns: 1fr; gap: 18px; }
	.tour-caption { min-height: 8.2em; }
	.tour-side { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "count count" "caption caption" "controls steps"; gap: 10px 16px; align-items: center; }
	.tour-count { grid-area: count; }
	.tour-caption { grid-area: caption; }
	.tour-controls { grid-area: controls; }
	.tour-steps { grid-area: steps; justify-content: flex-end; }
	.tour-hint { display: none; }
}
@container (max-width: 560px) {
	.tour-side { grid-template-columns: 1fr; grid-template-areas: "count" "caption" "controls" "steps"; }
	.tour-steps { justify-content: flex-start; }
}
@container (max-width: 640px) {
	.tour-bar { height: 30px; gap: 10px; padding: 0 10px; }
	.tour-dots i { width: 8px; height: 8px; }
	.tour-url { font-size: 11px; line-height: 20px; }
	.tour-cursor { width: 16px; }
	.tour-list-item { grid-template-columns: 1fr; }
	.tour-play .tour-play-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
	.tour-player { display: none; }
	.tour-fallback[hidden], .js .wpm-tour[data-wpm-tour] .tour-fallback { display: block; }
}

/* Spacing when printed inside a content column or next to another component. */
.wpm-tour:not(.section) { margin-block: 8px 56px; }
