/* Swapio product tour player (sw-player.js): control bar, timed popover and pointer. Uses the --sw-* brand variables. */
.sw-play-popover.driver-popover { padding: 20px 22px 0; max-width: min(400px, calc(100vw - 32px)); border-top: 0; border-radius: 18px; overflow: hidden; }
.sw-play-popover .driver-popover-title { font-size: 20px; font-weight: 700; margin-top: 6px; }
.sw-play-popover .driver-popover-description { font-size: 15px; }
.sw-play-popover .driver-popover-footer, .sw-play-popover .driver-popover-close-btn { display: none !important; }
.sw-play-kicker { display: flex; align-items: center; gap: 6px; font: 700 12px/1.2 var(--sw-font-body, 'Inter', sans-serif); letter-spacing: .09em; text-transform: uppercase; color: var(--sw-ink, #0B1B3F); }
.sw-play-kicker span:last-child { color: var(--sw-muted, #64748B); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-play-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--sw-secondary, #35D99A); box-shadow: 0 0 0 0 rgba(53,217,154,.6); animation: sw-play-pulse 1.6s infinite; flex: none; }
.sw-play-kicker.is-paused .sw-play-dot { background: var(--sw-muted, #94A3B8); animation: none; }
@keyframes sw-play-pulse { 0% { box-shadow: 0 0 0 0 rgba(53,217,154,.55); } 70% { box-shadow: 0 0 0 7px rgba(53,217,154,0); } 100% { box-shadow: 0 0 0 0 rgba(53,217,154,0); } }
.sw-play-pill { margin: 14px 0 18px; padding: 9px 14px; border-radius: 10px; background: var(--sw-surface, #F5F8FC); color: var(--sw-ink, #0B1B3F); font: 600 14px/1.35 var(--sw-font-body, 'Inter', sans-serif); }
.sw-play-pill::before { content: '\2022'; margin-right: 6px; color: var(--sw-secondary-dark, #1FB57D); }
.sw-play-progress { height: 4px; margin: 0 -22px; background: var(--sw-border, #E2E8F0); }
.sw-play-progress span { display: block; height: 100%; width: 0; background: var(--sw-secondary-dark, #1FB57D); }

/* pointer */
.sw-play-cursor { position: fixed; left: 0; top: 0; z-index: 1000000004; pointer-events: none; opacity: 0; transition: transform .8s cubic-bezier(.22,.8,.3,1), opacity .3s; filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
.sw-play-cursor.is-visible { opacity: 1; }
.sw-play-cursor svg { transition: transform .15s; }
.sw-play-cursor.is-clicking svg { transform: scale(.82); }

/* control bar */
.sw-play-bar { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 1000000005; width: min(980px, calc(100vw - 32px)); box-sizing: border-box;
    display: flex; align-items: center; gap: 20px; padding: 14px 18px 14px 24px; border-radius: 20px;
    background: var(--sw-ink, #0B1B3F); color: #fff; font-family: var(--sw-font-body, 'Inter', sans-serif); box-shadow: 0 16px 40px rgba(0,0,0,.35); }
.sw-play-info { flex: 1; min-width: 0; }
.sw-play-titles { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.sw-play-titles strong { font: 600 17px/1.3 var(--sw-font-heading, 'Poppins', sans-serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-play-titles span { font-size: 14px; color: rgba(255,255,255,.65); white-space: nowrap; }
.sw-play-badge { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--sw-secondary, #35D99A); color: var(--sw-ink, #0B1B3F); white-space: nowrap; }
.sw-play-segs { display: flex; gap: 6px; margin-top: 10px; }
.sw-play-seg { flex: 1; height: 4px; padding: 0; border: 0; border-radius: 4px; background: rgba(255,255,255,.18); cursor: pointer; overflow: hidden; position: relative; }
.sw-play-seg::after { content: ''; position: absolute; inset: -8px 0; } /* larger click target */
.sw-play-seg span { display: block; height: 100%; background: var(--sw-secondary, #35D99A); transition: width .4s; }
.sw-play-ctrls { display: flex; align-items: center; gap: 8px; flex: none; }
.sw-play-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: transparent; color: #fff; cursor: pointer; padding: 0; font: 700 14px/1 var(--sw-font-body, 'Inter', sans-serif); }
.sw-play-btn:hover { background: rgba(255,255,255,.1); }
.sw-play-btn:focus-visible, .sw-play-seg:focus-visible, .sw-play-list-item:focus-visible { outline: 3px solid var(--sw-secondary, #35D99A); outline-offset: 2px; }
.sw-play-main { width: 58px; height: 58px; background: #fff; color: var(--sw-ink, #0B1B3F); }
.sw-play-main:hover { background: #fff; transform: scale(1.04); }
.sw-play-main svg { width: 26px; height: 26px; }
.sw-play-speed { border: 1.5px solid rgba(255,255,255,.35); width: 50px; height: 50px; }

/* chapter list */
.sw-play-list { position: absolute; right: 18px; bottom: calc(100% + 10px); width: min(360px, calc(100vw - 32px)); max-height: 60vh; overflow: auto; padding: 8px; border-radius: 16px; background: var(--sw-ink, #0B1B3F); box-shadow: 0 16px 40px rgba(0,0,0,.35); }
.sw-play-list-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: transparent; color: #fff; cursor: pointer; text-align: left; font: 500 14px/1.3 var(--sw-font-body, 'Inter', sans-serif); }
.sw-play-list-item:hover { background: rgba(255,255,255,.08); }
.sw-play-list-item.is-current { background: rgba(53,217,154,.16); }
.sw-play-list-num { width: 26px; height: 26px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255,255,255,.12); font-weight: 700; font-size: 12px; }
.sw-play-list-item.is-current .sw-play-list-num { background: var(--sw-secondary, #35D99A); color: var(--sw-ink, #0B1B3F); }
.sw-play-list-title { flex: 1; }
.sw-play-list-count { color: rgba(255,255,255,.55); font-size: 12px; white-space: nowrap; }

/* "Watch product tour" button in the admin top bar */
.topbar .navbar-nav .nav-link.sw-watch-tour, .sw-watch-tour { display: inline-flex !important; align-items: center; gap: 6px; height: 38px; margin: 0 8px; padding: 0 14px !important; border-radius: 999px;
    font-size: 14px !important; font-weight: 600; line-height: 1 !important; color: var(--sw-primary-dark, #0666C4) !important; background: var(--sw-primary-soft, #E6F2FE); white-space: nowrap; align-self: center; }
.topbar .navbar-nav .nav-link.sw-watch-tour:hover, .sw-watch-tour:hover { background: var(--sw-primary, #087FF5); color: #fff !important; }
.sw-watch-tour i { font-size: 18px !important; line-height: 1 !important; }
.sw-tour-menu__watch { display: flex; align-items: center; justify-content: center; gap: 8px; width: calc(100% - 40px); margin: 0 20px 14px; padding: 12px 16px; border: 0; border-radius: var(--sw-radius-control, 10px); cursor: pointer;
    font: 600 15px var(--sw-font-body, 'Inter', sans-serif); color: #fff; background: var(--sw-ink, #0B1B3F); }
.sw-tour-menu__watch:hover { background: var(--sw-primary-dark, #0666C4); }

@media (max-width: 760px) {
    .sw-play-bar { bottom: 10px; width: calc(100vw - 16px); gap: 10px; padding: 10px 10px 10px 14px; border-radius: 16px; flex-wrap: wrap; }
    .sw-play-info { flex-basis: 100%; }
    .sw-play-titles strong { font-size: 15px; }
    .sw-play-badge { display: none; }
    .sw-play-ctrls { width: 100%; justify-content: space-between; }
    .sw-play-main { width: 50px; height: 50px; }
    .sw-play-cursor { display: none; }
    .sw-watch-tour span { display: none; }
    .sw-watch-tour { padding: 8px 10px !important; }
}
@media (prefers-reduced-motion: reduce) {
    .sw-play-cursor, .sw-play-seg span { transition: none; }
    .sw-play-dot { animation: none; }
}
/* Driver.js sets pointer-events:none on everything while a step is highlighted; the bar must stay usable. */
.driver-active .sw-play-bar, .driver-active .sw-play-bar * { pointer-events: auto; }
/* Keep "Watch product tour" vertically centred with the help icon and the user menu. */
.topbar .navbar-nav > .sw-watch-li { display: flex; align-items: center; align-self: stretch; }
