/* ==========================================================================
   JasoosWale — Guided Site Tour
   Self-contained. No external library. Uses the site's existing design tokens.
   ========================================================================== */

.jw-tour-backdrop,
.jw-tour-spot,
.jw-tour-pop {
    display: none;
}

.jw-tour-active .jw-tour-backdrop,
.jw-tour-active .jw-tour-spot,
.jw-tour-active .jw-tour-pop {
    display: block;
}

/* Blocks interaction with the page while the tour runs. Transparent —
   the visible dimming comes from the spotlight's giant box-shadow. */
.jw-tour-backdrop {
    position: fixed;
    inset: 0;
    z-index: 99990;
    background: transparent;
    cursor: default;
}

/* The cut-out. Everything outside this box is dimmed by the box-shadow. */
.jw-tour-spot {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    z-index: 99991;
    pointer-events: none;
    border-radius: 12px;
    box-shadow: 0 0 0 9999px rgba(15, 15, 26, 0.74);
}

/* Glide between steps, but snap instantly when tracking a scroll (JS removes
   this class on scroll/resize and re-adds it on step change). */
.jw-tour-spot.is-anim {
    transition: top .32s cubic-bezier(.4, 0, .2, 1),
                left .32s cubic-bezier(.4, 0, .2, 1),
                width .32s cubic-bezier(.4, 0, .2, 1),
                height .32s cubic-bezier(.4, 0, .2, 1);
}

/* Ring around the highlighted element */
.jw-tour-spot::after {
    content: '';
    position: absolute;
    inset: -2px;
    border: 2px solid var(--gold, #f5a623);
    border-radius: 12px;
    box-shadow: 0 0 0 4px rgba(245, 166, 35, .22);
}

/* Centered welcome/finish step has no element to point at */
.jw-tour-spot.is-hidden {
    box-shadow: 0 0 0 9999px rgba(15, 15, 26, 0.82);
}

.jw-tour-spot.is-hidden::after {
    display: none;
}

/* ── Popover ─────────────────────────────────────────────────────────── */

.jw-tour-pop {
    position: fixed;
    z-index: 99992;
    width: 350px;
    max-width: calc(100vw - 24px);
    background: #fff;
    color: var(--primary, #1a1a2e);
    border-radius: var(--radius, 16px);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .32), 0 4px 12px rgba(0, 0, 0, .18);
    padding: 20px 20px 16px;
    font-size: .92rem;
    line-height: 1.55;
    opacity: 0;
    transform: translateY(6px);
    /* Only fade/slide — never animate top/left, or the popover lags behind
       the page while the user scrolls. */
    transition: opacity .22s ease, transform .22s ease;
}

.jw-tour-pop.is-shown {
    opacity: 1;
    transform: translateY(0);
}

.jw-tour-pop:focus {
    outline: none;
}

.jw-tour-pop:focus-visible {
    outline: 3px solid var(--gold, #f5a623);
    outline-offset: 3px;
}

/* Little pointer triangle */
.jw-tour-arrow {
    position: absolute;
    width: 14px;
    height: 14px;
    background: #fff;
    transform: rotate(45deg);
}

.jw-tour-pop[data-placement="bottom"] .jw-tour-arrow { top: -7px; }
.jw-tour-pop[data-placement="top"]    .jw-tour-arrow { bottom: -7px; }
.jw-tour-pop[data-placement="right"]  .jw-tour-arrow { left: -7px; }
.jw-tour-pop[data-placement="left"]   .jw-tour-arrow { right: -7px; }
.jw-tour-pop[data-placement="center"] .jw-tour-arrow { display: none; }

/* ── Popover content ─────────────────────────────────────────────────── */

.jw-tour-count {
    display: inline-block;
    font-size: var(--text-2xs, .7rem);
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #8a8a9a;
    margin-bottom: 6px;
}

.jw-tour-title {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: 1.06rem;
    font-weight: 800;
    line-height: 1.3;
    margin: 0 0 7px;
    color: var(--primary, #1a1a2e);
    padding-right: 26px;
}

.jw-tour-body {
    margin: 0 0 14px;
    color: #4a4a5a;
}

.jw-tour-body strong {
    color: var(--primary, #1a1a2e);
    font-weight: 700;
}

.jw-tour-foot {
    display: flex;
    align-items: center;
    gap: 8px;
    border-top: 1px solid #ececf2;
    padding-top: 12px;
}

.jw-tour-dots {
    display: flex;
    gap: 5px;
    margin-right: auto;
}

.jw-tour-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d6d6e0;
    transition: var(--transition, all .3s ease);
}

.jw-tour-dot.is-on {
    background: var(--accent, #e63946);
    transform: scale(1.35);
}

.jw-tour-btn {
    font: inherit;
    font-size: .84rem;
    font-weight: 700;
    border-radius: 9px;
    padding: 8px 15px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition, all .3s ease);
    white-space: nowrap;
}

.jw-tour-btn-next {
    background: var(--accent, #e63946);
    border-color: var(--accent, #e63946);
    color: #fff;
}

.jw-tour-btn-next:hover {
    background: var(--accent-hover, #c1121f);
    border-color: var(--accent-hover, #c1121f);
}

.jw-tour-btn-back {
    background: #fff;
    border-color: #d9d9e3;
    color: #55556a;
}

.jw-tour-btn-back:hover {
    border-color: var(--primary, #1a1a2e);
    color: var(--primary, #1a1a2e);
}

.jw-tour-btn-back[hidden] {
    display: none;
}

/* Close (X) */
.jw-tour-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 26px;
    height: 26px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #9a9aab;
    font-size: 1.05rem;
    cursor: pointer;
    transition: var(--transition, all .3s ease);
}

.jw-tour-close:hover {
    background: #f2f2f7;
    color: var(--accent, #e63946);
}

.jw-tour-skip {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    font-size: .8rem;
    color: #9a9aab;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.jw-tour-skip:hover {
    color: var(--accent, #e63946);
}

/* Screen-reader-only live region */
.jw-tour-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ── The "Take a tour" launcher in the top bar ───────────────────────── */

.jw-tour-launch {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    opacity: .92;
    transition: var(--transition, all .3s ease);
}

.jw-tour-launch:hover {
    opacity: 1;
    color: var(--gold, #f5a623);
}

/* ── Mobile: popover docks to the bottom as a sheet ──────────────────── */

@media (max-width: 575.98px) {
    .jw-tour-pop {
        width: auto;
        left: 12px !important;
        right: 12px;
        top: auto !important;
        bottom: 12px;
        max-width: none;
    }

    .jw-tour-arrow {
        display: none;
    }

    .jw-tour-foot {
        flex-wrap: wrap;
    }
}

/* ── Respect reduced-motion ──────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .jw-tour-spot,
    .jw-tour-spot.is-anim,
    .jw-tour-pop,
    .jw-tour-dot {
        transition: none;
    }

    .jw-tour-pop {
        transform: none;
    }
}
