/* ============================================================================
   IDE Tour Overlay
   Activated when ?tour=<key> is in the URL. Highlights real IDE DOM elements
   with a spotlight + floating tooltip. Survives page transitions via
   sessionStorage.
   ============================================================================ */

.tour-overlay {
    position: fixed;
    inset: 0;
    z-index: 99000;
    pointer-events: none;
}
/* Mask removed: a full-screen pointer-events:auto layer blocked every
   click on the underlying page (including Bootstrap modals). The spotlight
   box-shadow below provides the dimming on its own. */

.tour-spotlight {
    position: absolute;
    border-radius: 8px;
    box-shadow:
        0 0 0 9999px rgba(15, 23, 42, 0.55),
        0 0 0 4px rgba(59, 130, 246, 0.95),
        0 0 0 10px rgba(59, 130, 246, 0.4);
    pointer-events: none;
    transition: top 0.25s ease, left 0.25s ease, width 0.25s ease, height 0.25s ease;
    animation: tour-spot-pulse 1.6s ease-out infinite;
}
@keyframes tour-spot-pulse {
    0%   { box-shadow: 0 0 0 9999px rgba(15,23,42,0.55), 0 0 0 4px rgba(59,130,246,0.9), 0 0 0 8px rgba(59,130,246,0.35); }
    70%  { box-shadow: 0 0 0 9999px rgba(15,23,42,0.55), 0 0 0 4px rgba(59,130,246,0.9), 0 0 0 16px rgba(59,130,246,0.0); }
    100% { box-shadow: 0 0 0 9999px rgba(15,23,42,0.55), 0 0 0 4px rgba(59,130,246,0.9), 0 0 0 8px rgba(59,130,246,0.35); }
}

.tour-tooltip {
    position: absolute;
    background: #ffffff;
    color: #0f172a;
    border-radius: 12px;
    padding: 20px 22px;
    box-shadow:
        0 10px 30px rgba(15,23,42,0.30),
        0 2px 8px rgba(15,23,42,0.15);
    max-width: 360px;
    min-width: 280px;
    pointer-events: auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    z-index: 99002;
}
.tour-tooltip .tour-eyebrow {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #3b82f6;
    font-weight: 700;
    margin-bottom: 6px;
}
.tour-tooltip h4 {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
}
.tour-tooltip p {
    margin: 0 0 14px;
    font-size: 14.5px;
    color: #334155;
}
.tour-tooltip code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
    font-size: 13px;
    color: #be185d;
}
.tour-tooltip .tour-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.tour-tooltip .tour-actions .tour-progress {
    color: #64748b;
    font-size: 12px;
}
.tour-tooltip .tour-btn-row {
    display: flex;
    gap: 8px;
}
.tour-tooltip button {
    border: 0;
    border-radius: 6px;
    padding: 8px 14px;
    font-weight: 600;
    cursor: pointer;
    font-size: 13.5px;
    font-family: inherit;
}
.tour-tooltip .tour-skip {
    background: transparent;
    color: #64748b;
    padding: 8px 10px;
}
.tour-tooltip .tour-skip:hover { color: #334155; }
.tour-tooltip .tour-back {
    background: #f1f5f9;
    color: #0f172a;
}
.tour-tooltip .tour-back:hover { background: #e2e8f0; }
.tour-tooltip .tour-next {
    background: #3b82f6;
    color: #ffffff;
}
.tour-tooltip .tour-next:hover { background: #1d4ed8; }

/* Arrow pointer */
.tour-tooltip[data-pos="bottom"]::before,
.tour-tooltip[data-pos="top"]::before,
.tour-tooltip[data-pos="left"]::before,
.tour-tooltip[data-pos="right"]::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border: 8px solid transparent;
}
.tour-tooltip[data-pos="bottom"]::before {
    top: -16px; left: 28px; border-bottom-color: #ffffff;
}
.tour-tooltip[data-pos="top"]::before {
    bottom: -16px; left: 28px; border-top-color: #ffffff;
}
.tour-tooltip[data-pos="left"]::before {
    right: -16px; top: 28px; border-left-color: #ffffff;
}
.tour-tooltip[data-pos="right"]::before {
    left: -16px; top: 28px; border-right-color: #ffffff;
}

/* Modal style for final / no-selector steps */
.tour-tooltip.tour-modal {
    top: auto;
    bottom: 24px;
    left: 24px;
    transform: none;
    max-width: 400px;
}

/* Mini launcher chip when tour is paused */
.tour-launcher {
    position: fixed;
    right: 20px;
    bottom: 20px;
    background: #3b82f6;
    color: #ffffff;
    border-radius: 999px;
    padding: 10px 18px;
    box-shadow: 0 4px 12px rgba(59,130,246,0.4);
    cursor: pointer;
    font-weight: 600;
    z-index: 99003;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13.5px;
    border: 0;
}
.tour-launcher:hover { background: #1d4ed8; }
