/* RealRadio onboarding tour — first-visit guided walkthrough.
 *
 * A dimming overlay with a "spotlight" cut-out around the element the current
 * step is talking about, plus a speech bubble that explains what to DO with it.
 * Hand-rolled (no tour library) to stay consistent with the rest of the site.
 * Mirrors the consent banner's "fixed, z-managed, animate in/out" approach. */

.rr-tour-root {
    position: fixed;
    inset: 0;
    z-index: 100000;
    /* The root itself doesn't paint or catch events; its children do. */
    pointer-events: none;
}

.rr-tour-root[hidden] {
    display: none;
}

/* Full-viewport click shield. Transparent on its own — the dim comes from the
 * spotlight's giant box-shadow. Sits under the spotlight + bubble and swallows
 * clicks so the page behind the tour can't be interacted with mid-walkthrough. */
.rr-tour-backdrop {
    position: fixed;
    inset: 0;
    pointer-events: auto;
    background: transparent;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.rr-tour-root.is-visible .rr-tour-backdrop {
    opacity: 1;
}

/* Centered steps (e.g. the welcome card) have no anchor, so the spotlight is
 * hidden and the backdrop itself carries the dim. */
.rr-tour-root.rr-tour--centered .rr-tour-backdrop {
    background: rgba(8, 12, 20, 0.72);
}

/* The spotlight: positioned over the step's target element. The huge spread
 * box-shadow is what dims the entire rest of the screen. */
.rr-tour-spotlight {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-radius: 10px;
    pointer-events: none;
    box-shadow: 0 0 0 9999px rgba(8, 12, 20, 0.72);
    outline: 2px solid var(--accent-color, #38bdf8);
    outline-offset: 2px;
    opacity: 0;
    transition: opacity 0.25s ease,
                top 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                left 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                width 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                height 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.rr-tour-root.is-visible .rr-tour-spotlight {
    opacity: 1;
}

.rr-tour-root.rr-tour--centered .rr-tour-spotlight {
    display: none;
}

/* The speech bubble. */
.rr-tour-bubble {
    position: fixed;
    top: 0;
    left: 0;
    width: min(360px, calc(100vw - 24px));
    box-sizing: border-box;
    background: #ffffff;
    color: #0f172a;
    border-radius: 14px;
    padding: 18px 20px 16px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
    pointer-events: auto;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease,
                top 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                left 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.rr-tour-root.is-visible .rr-tour-bubble {
    opacity: 1;
    transform: translateY(0);
}

/* Little pointer arrow toward the highlighted element. */
.rr-tour-bubble__arrow {
    position: absolute;
    width: 14px;
    height: 14px;
    background: #ffffff;
    transform: rotate(45deg);
    left: 28px;
}

.rr-tour-bubble[data-arrow="top"] .rr-tour-bubble__arrow {
    top: -7px;
}

.rr-tour-bubble[data-arrow="bottom"] .rr-tour-bubble__arrow {
    bottom: -7px;
}

.rr-tour-bubble[data-arrow="none"] .rr-tour-bubble__arrow {
    display: none;
}

.rr-tour-bubble__step {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-color, #2563eb);
    margin: 0 0 6px;
}

.rr-tour-bubble__title {
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 8px;
    color: #0f172a;
}

.rr-tour-bubble__body {
    font-size: 0.92rem;
    line-height: 1.5;
    margin: 0 0 16px;
    color: #334155;
}

.rr-tour-bubble__footer {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rr-tour-bubble__dots {
    display: flex;
    gap: 5px;
    margin-right: auto;
}

.rr-tour-bubble__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #cbd5e1;
    transition: background 0.2s ease, transform 0.2s ease;
}

.rr-tour-bubble__dot.is-active {
    background: var(--accent-color, #2563eb);
    transform: scale(1.25);
}

.rr-tour-btn {
    font: inherit;
    font-size: 0.86rem;
    font-weight: 600;
    border-radius: 8px;
    padding: 7px 14px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.rr-tour-btn--ghost {
    background: transparent;
    color: #64748b;
    border-color: #e2e8f0;
}

.rr-tour-btn--ghost:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.rr-tour-btn--primary {
    background: var(--accent-color, #2563eb);
    color: #ffffff;
}

.rr-tour-btn--primary:hover {
    filter: brightness(1.08);
}

/* Close (skip) button, top-right of the bubble. */
.rr-tour-bubble__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 26px;
    height: 26px;
    line-height: 1;
    font-size: 1.1rem;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
}

.rr-tour-bubble__close:hover {
    background: #f1f5f9;
    color: #0f172a;
}

/* Replayable "Take the tour" trigger (footer). Styled as a quiet link. */
.rr-tour-trigger {
    font: inherit;
    font-size: inherit;
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    color: inherit;
    opacity: 0.7;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.rr-tour-trigger:hover {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .rr-tour-backdrop,
    .rr-tour-spotlight,
    .rr-tour-bubble {
        transition: opacity 0.15s ease;
    }
}
