/* =============================================================================
   Feature Tours runtime styling.
   - .drs-tour-spotlight   — positioned at the target element; box-shadow
                              dims everything outside it. pointer-events: none
                              so clicks still pass through to the underlying
                              page (no hard-blocking of interaction).
   - .drs-tour-popover     — the floating popover anchored to the target.
                              fixed width, content-driven height.
   ============================================================================= */

:root {
    --drs-tour-popover-width: 320px;
    --drs-tour-popover-bg: #ffffff;
    --drs-tour-popover-fg: #13294b;             /* Illinois Industrial Blue */
    --drs-tour-popover-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    --drs-tour-accent: #FF5F05;                 /* Altgeld Orange (visual only) */
    --drs-tour-btn-primary-bg: #13294b;
    --drs-tour-btn-primary-fg: #ffffff;
    --drs-tour-btn-secondary-fg: #5b6470;
    --drs-tour-dim: rgba(0, 0, 0, 0.45);
}

/* ----------------------------------------------------------------------------
   Modal click-blocker: invisible full-viewport layer that swallows clicks while
   a tooltip is showing. Sits beneath the popover so popover buttons still work,
   but above the page so the search box / menu / etc. can't be clicked.
   Visual dim is handled by .drs-tour-spotlight's box-shadow — not by this layer.
   ---------------------------------------------------------------------------- */
.drs-tour-modal-blocker {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    cursor: not-allowed;
}

/* ----------------------------------------------------------------------------
   Spotlight: position absolute (in page coordinates), bordered with a huge
   transparent-to-dim box-shadow so the rest of the page dims around it.
   pointer-events: none — visual only; the modal blocker above catches clicks.
   ---------------------------------------------------------------------------- */
.drs-tour-spotlight {
    /* position: fixed — anchored to the viewport, NOT the document. This is the
       only correct choice when targets can live in fixed-position ancestors
       (like the nav bar). For targets in normal flow, the JS reposition handler
       fires on every scroll event and the spotlight follows; for targets in a
       fixed ancestor, the spotlight stays put because the target does. */
    position: fixed;
    pointer-events: none;
    border-radius: 6px;
    box-shadow: 0 0 0 9999px var(--drs-tour-dim);
    z-index: 100000;
}

/* ----------------------------------------------------------------------------
   Popover
   ---------------------------------------------------------------------------- */
.drs-tour-popover {
    /* position: fixed — same rationale as .drs-tour-spotlight; popover stays
       anchored to the target's viewport position regardless of scroll. */
    position: fixed;
    width: var(--drs-tour-popover-width);
    max-width: calc(100vw - 24px);
    background: var(--drs-tour-popover-bg);
    color: var(--drs-tour-popover-fg);
    border-radius: 8px;
    box-shadow: var(--drs-tour-popover-shadow);
    padding: 18px 20px 14px;
    z-index: 100001;
    font-family: "Source Sans 3", "Source Sans Pro", "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.45;
    opacity: 0;
    transform: translateY(4px);
    /* Only transition opacity + transform (the fade-up-on-appear). top/left are
       intentionally NOT transitioned — they're updated per-scroll-frame and any
       animation makes the popover visibly lag behind the target. */
    transition: opacity 180ms ease, transform 180ms ease;
}

.drs-tour-popover.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.drs-tour-popover-title {
    margin: 0 0 8px;
    font-weight: 700;
    font-size: 18px;
    line-height: 1.25;
    color: var(--drs-tour-popover-fg);
}

.drs-tour-popover-body {
    margin: 0 0 14px;
    color: #2b3849;
}

/* Optional author-supplied image under the body. Caps height so a tall image can't blow
   out the popover; `contain` keeps the whole image visible within the cap. */
.drs-tour-popover-image {
    display: block;
    width: 100%;
    max-height: 240px;
    object-fit: contain;
    margin: 0 0 14px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #fff;
}

.drs-tour-popover-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.drs-tour-popover-step {
    font-size: 12px;
    color: var(--drs-tour-btn-secondary-fg);
    letter-spacing: 0.04em;
}

.drs-tour-popover-buttons {
    display: flex;
    gap: 8px;
}

.drs-tour-btn {
    appearance: none;
    border: none;
    cursor: pointer;
    font: inherit;
    padding: 8px 14px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.02em;
    transition: background 120ms ease, color 120ms ease;
}

.drs-tour-btn-primary {
    background: var(--drs-tour-btn-primary-bg);
    color: var(--drs-tour-btn-primary-fg);
}

.drs-tour-btn-primary:hover,
.drs-tour-btn-primary:focus {
    background: #1f3a66;
    outline: none;
}

.drs-tour-btn-secondary {
    background: transparent;
    color: var(--drs-tour-btn-secondary-fg);
}

.drs-tour-btn-secondary:hover,
.drs-tour-btn-secondary:focus {
    color: var(--drs-tour-popover-fg);
    outline: none;
}

/* ----------------------------------------------------------------------------
   Popover arrow (pointing back at the target). Rotated square; one face is
   shown based on placement class.
   ---------------------------------------------------------------------------- */
.drs-tour-popover-arrow {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--drs-tour-popover-bg);
    transform: rotate(45deg);
    box-shadow: -1px -1px 2px rgba(0, 0, 0, 0.04);
}

.drs-tour-popover[data-placement="bottom"] .drs-tour-popover-arrow {
    top: -6px;
    left: calc(50% - 6px);
}

.drs-tour-popover[data-placement="top"] .drs-tour-popover-arrow {
    bottom: -6px;
    left: calc(50% - 6px);
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.04);
}

.drs-tour-popover[data-placement="right"] .drs-tour-popover-arrow {
    top: calc(50% - 6px);
    left: -6px;
    box-shadow: -1px 1px 2px rgba(0, 0, 0, 0.04);
}

.drs-tour-popover[data-placement="left"] .drs-tour-popover-arrow {
    top: calc(50% - 6px);
    right: -6px;
    box-shadow: 1px -1px 2px rgba(0, 0, 0, 0.04);
}

/* ----------------------------------------------------------------------------
   Helper: an inline "highlight" applied by the highlight-element action.
   Lighter touch than the spotlight; used when the runner doesn't dim
   everything else but just rings the target.
   ---------------------------------------------------------------------------- */
.drs-tour-highlight {
    outline: 3px solid var(--drs-tour-accent);
    outline-offset: 3px;
    border-radius: 4px;
    transition: outline-color 200ms ease;
}

/* ----------------------------------------------------------------------------
   Pulse animation — fired when the user clicks "Show" to scroll a scrolled-off
   target back into view. Two outline ripples that expand and fade, drawing
   attention without being obnoxious. The class is removed by the runner after
   the animation completes so the element returns to its normal styling.
   ---------------------------------------------------------------------------- */
.drs-tour-pulse {
    animation: drs-tour-pulse 1.4s ease-out;
    border-radius: 4px;
}

@keyframes drs-tour-pulse {
    0%   { outline: 3px solid rgba(255, 95, 5, 0.9);  outline-offset: 2px; }
    30%  { outline: 3px solid rgba(255, 95, 5, 0);    outline-offset: 12px; }
    50%  { outline: 3px solid rgba(255, 95, 5, 0.9);  outline-offset: 2px; }
    100% { outline: 3px solid rgba(255, 95, 5, 0);    outline-offset: 12px; }
}
