/* tour.css - Whimzit Guided Tour Styles */

:root {
    --tour-navy: #0C2134;
    --tour-orange: #F76007;
    --tour-white: #ffffff;
    --tour-backdrop: rgba(0, 0, 0, 0.45);
    --tour-glow: 0 0 0 4px #F76007;
}

/* Backdrop */
.whimzit-tour-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--tour-backdrop);
    z-index: 35000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.whimzit-tour-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

/* Highlighted Element Elevation */
.whimzit-tour-highlight {
    position: relative !important;
    z-index: 36000 !important;
    box-shadow: var(--tour-glow);
    pointer-events: auto !important;
    transition: box-shadow 0.3s ease;
}

/* Preserve fixed positioning for elements that need it */
#sdk-banner.whimzit-tour-highlight {
    position: fixed !important;
}

/* Tooltip Panel */
.whimzit-tour-tooltip {
    position: fixed;
    z-index: 37000;
    background: var(--tour-navy);
    color: var(--tour-white);
    padding: 24px;
    border-radius: 12px;
    width: 380px;
    max-width: calc(100vw - 40px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
    visibility: hidden;
    pointer-events: none;
}

.whimzit-tour-tooltip.active {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0s;
}

.whimzit-tour-tooltip .logo-icon {
    width: 20px;
    height: 20px;
    margin-bottom: 16px;
    fill: var(--tour-white);
}

.whimzit-tour-tooltip h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    font-weight: 700;
}

.whimzit-tour-tooltip .body-text {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.9);
}

.whimzit-tour-tooltip .body-text blockquote {
    border-left: 2px solid var(--tour-orange);
    padding-left: 12px;
    font-style: italic;
    margin: 12px 0;
}

.whimzit-tour-tooltip .body-text ul {
    margin-top: 12px;
    padding-left: 20px;
}

.whimzit-tour-tooltip .body-text li {
    margin-bottom: 8px;
}

.whimzit-tour-tooltip .footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.whimzit-tour-tooltip .cta-btn {
    background: var(--tour-orange);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.whimzit-tour-tooltip .cta-btn:hover {
    transform: scale(1.03);
}

.whimzit-tour-tooltip .progress-dots {
    display: flex;
    gap: 6px;
}

.whimzit-tour-tooltip .dot {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
}

.whimzit-tour-tooltip .dot.active {
    background: var(--tour-orange);
}

/* Callout Bubble (Step 4a) */
.whimzit-tour-callout {
    position: fixed;
    z-index: 38000;
    background: var(--tour-navy);
    color: var(--tour-white);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 11px;
    width: 200px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.whimzit-tour-callout::after {
    content: '';
    position: absolute;
    border: 6px solid transparent;
}

/* Position arrow based on placement */
.whimzit-tour-callout.arrow-bottom::after {
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    border-top-color: var(--tour-navy);
}

/* Side Panel (Step 4b) */
.whimzit-tour-side-panel {
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-left: 32px;
    z-index: 41000;
    pointer-events: auto;
    background: transparent;
}

.annotation-section {
    background: var(--tour-navy);
    color: var(--tour-white);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    display: none;
}

.annotation-section.visible {
    display: block;
    opacity: 1;
    transform: translateX(0);
}

.annotation-section h4 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--tour-orange);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.annotation-section p {
    font-size: 0.85rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 12px;
}

.annotation-section strong {
    color: var(--tour-white);
}

/* Pulsing Animation */
@keyframes tour-pulse {
    0% { box-shadow: 0 0 0 0 rgba(247, 96, 7, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(247, 96, 7, 0); }
    100% { box-shadow: 0 0 0 0 rgba(247, 96, 7, 0); }
}

.tour-pulse-animation {
    animation: tour-pulse 2s infinite;
}

/* Full Screen Welcome (Step 1) */
.whimzit-tour-welcome {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--tour-navy);
    color: white;
    z-index: 45000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px;
}

.whimzit-tour-welcome .logo-icon-lg {
    width: 64px;
    height: 64px;
    margin-bottom: 32px;
    fill: var(--tour-white);
}

/* Tour Controls */
.tour-controls {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 40000;
    display: flex;
    gap: 12px;
}

.tour-control-btn {
    background: white;
    color: var(--pml-navy);
    border: 1px solid var(--pml-border);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .tour-controls {
        top: 74px;
    }

    .whimzit-tour-side-panel {
        width: calc(100% - 40px);
        margin-left: 0;
        margin-top: 16px;
    }
    
    .whimzit-tour-tooltip {
        width: calc(100% - 40px);
        bottom: 20px;
        left: 20px !important;
        top: auto !important;
    }
}

/* Step 7 — Tour content injected into handoff modal */
.tour-handoff-inject {
    background: var(--tour-navy);
    color: var(--tour-white);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    text-align: left;
}

.tour-handoff-inject .logo-icon {
    width: 20px;
    height: 20px;
    fill: var(--tour-white);
    display: block;
    margin-bottom: 12px;
}

.tour-handoff-inject .tour-handoff-body {
    font-size: 0.875rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 16px;
}

.tour-handoff-inject .footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.tour-handoff-inject .progress-dots {
    display: flex;
    gap: 6px;
}

.tour-handoff-inject .dot {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
}

.tour-handoff-inject .dot.active {
    background: var(--tour-orange);
}

.tour-handoff-inject .tour-handoff-ctas {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tour-handoff-inject .cta-btn {
    background: var(--tour-orange);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.tour-handoff-inject .cta-btn:hover {
    transform: scale(1.03);
}
