/* ============================================================
   Guided tour styling for the three-way-forecast demo.
   Palette matches the tool's blue-500 primary + gray-50 surface.
   ============================================================ */

:root {
    --twf-bg:            #ffffff;
    --twf-fg:            #1F2937;
    --twf-muted:         #6B7280;
    --twf-title:         #1E40AF;
    --twf-accent:        #3B82F6;
    --twf-accent-hover:  #2563EB;
    --twf-accent-fg:     #ffffff;
    --twf-secondary-bg:  #EFF6FF;
    --twf-secondary-fg:  #1E40AF;
    --twf-border:        rgba(59, 130, 246, 0.15);
    --twf-shadow:        0 24px 60px rgba(30, 64, 175, 0.18), 0 4px 14px rgba(30, 64, 175, 0.08);
    --twf-close-bg:      rgba(59, 130, 246, 0.08);
    --twf-close-fg:      #1E40AF;
    --twf-close-hover:   rgba(59, 130, 246, 0.16);
    --twf-fab-bg:        #3B82F6;
    --twf-fab-fg:        #ffffff;
    --twf-fab-hover:     #2563EB;
    --twf-stage-outline: rgba(59, 130, 246, 0.55);
}

/* --- Floating "Take the tour" button (bottom-right) --- */
.twf-tour-btn {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px 10px 12px;
    background: var(--twf-fab-bg);
    color: var(--twf-fab-fg);
    border: 0;
    border-radius: 999px;
    font: 600 13px/1 -apple-system, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: 0.2px;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(30, 64, 175, 0.35);
    transition: transform 0.08s, filter 0.15s, background 0.15s;
}
.twf-tour-btn:hover  { background: var(--twf-fab-hover); }
.twf-tour-btn:active { transform: translateY(1px); }
.twf-tour-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    color: inherit;
    font-size: 12px;
    font-weight: 800;
}

/* --- Popover --- */
.driver-popover.twf-tour-popover {
    background: var(--twf-bg);
    color: var(--twf-fg);
    border-radius: 14px;
    box-shadow: var(--twf-shadow);
    border: 1px solid var(--twf-border);
    font-family: -apple-system, 'Segoe UI', Roboto, sans-serif;
    max-width: 400px;
    padding: 22px 24px 18px;
}
.driver-popover.twf-tour-popover .driver-popover-title {
    color: var(--twf-title);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.1px;
    line-height: 1.25;
    margin: 0 34px 8px 0;
}
.driver-popover.twf-tour-popover .driver-popover-description {
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--twf-fg);
    opacity: 0.92;
    margin-bottom: 16px;
}
.driver-popover.twf-tour-popover .driver-popover-description b,
.driver-popover.twf-tour-popover .driver-popover-description strong {
    color: var(--twf-title);
    font-weight: 700;
}
.driver-popover.twf-tour-popover .driver-popover-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 6px;
    border-top: 1px solid var(--twf-border);
    margin-top: 6px;
}
.driver-popover.twf-tour-popover .driver-popover-progress-text {
    color: var(--twf-muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    font-variant-numeric: tabular-nums;
}
.driver-popover.twf-tour-popover .driver-popover-navigation-btns {
    display: inline-flex;
    gap: 8px;
}
.driver-popover.twf-tour-popover .driver-popover-next-btn,
.driver-popover.twf-tour-popover .driver-popover-prev-btn {
    background: var(--twf-accent);
    color: var(--twf-accent-fg);
    border: 0;
    padding: 7px 14px;
    border-radius: 8px;
    font: 600 12px/1 inherit;
    text-shadow: none;
    cursor: pointer;
}
.driver-popover.twf-tour-popover .driver-popover-next-btn:hover,
.driver-popover.twf-tour-popover .driver-popover-prev-btn:hover {
    background: var(--twf-accent-hover);
}
.driver-popover.twf-tour-popover .driver-popover-prev-btn {
    background: var(--twf-secondary-bg);
    color: var(--twf-secondary-fg);
}
.driver-popover.twf-tour-popover .driver-popover-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 26px;
    height: 26px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--twf-close-bg);
    color: var(--twf-close-fg);
    border: 0;
    border-radius: 50%;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    text-shadow: none;
}
.driver-popover.twf-tour-popover .driver-popover-close-btn:hover {
    background: var(--twf-close-hover);
}
.driver-popover.twf-tour-popover .driver-popover-arrow-side-top    { border-top-color:    var(--twf-bg); }
.driver-popover.twf-tour-popover .driver-popover-arrow-side-bottom { border-bottom-color: var(--twf-bg); }
.driver-popover.twf-tour-popover .driver-popover-arrow-side-left   { border-left-color:   var(--twf-bg); }
.driver-popover.twf-tour-popover .driver-popover-arrow-side-right  { border-right-color:  var(--twf-bg); }

/* Pulsing halo so table + chart highlights stand out over the light bg. */
.driver-active-element {
    outline: 3px solid var(--twf-stage-outline) !important;
    outline-offset: 3px;
    border-radius: 10px;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.28),
                0 0 24px 6px rgba(59, 130, 246, 0.48);
    animation: twf-tour-pulse 1.5s ease-in-out infinite;
}
@keyframes twf-tour-pulse {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.28),
                    0 0 22px 4px rgba(59, 130, 246, 0.42);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.50),
                    0 0 32px 10px rgba(59, 130, 246, 0.65);
    }
}
