/* ============================================
   TROLLEY PLANER – Guided Tour Styles
   ============================================ */

/* --- Overlay (dunkler Backdrop) --- */
.tour-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: auto;
    transition: opacity 0.4s ease;
}

.tour-overlay--hidden {
    opacity: 0;
    pointer-events: none;
}

/* SVG Overlay für Spotlight-Cutout */
.tour-overlay svg {
    width: 100%;
    height: 100%;
}

/* --- Spotlight Pulse Ring --- */
.tour-spotlight-ring {
    position: fixed;
    z-index: 9999;
    border-radius: 16px;
    pointer-events: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.6);
    animation: tour-pulse 2s ease-in-out infinite;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tour-spotlight-ring--hidden {
    opacity: 0;
    transform: scale(0.95);
}

@keyframes tour-pulse {
    0%, 100% {
        box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.6), 0 0 0 6px rgba(99, 102, 241, 0.2);
    }
    50% {
        box-shadow: 0 0 0 5px rgba(99, 102, 241, 0.4), 0 0 0 14px rgba(99, 102, 241, 0.08);
    }
}

/* --- Tooltip Card --- */
.tour-tooltip {
    position: fixed;
    z-index: 10000;
    width: 340px;
    max-width: calc(100vw - 32px);
    pointer-events: auto;

    /* Glassmorphism Level 3 */
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 1.5rem;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.18),
        0 8px 20px rgba(79, 70, 229, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    overflow: hidden;

    /* Transitions */
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.tour-tooltip--hidden {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
    pointer-events: none;
}

/* Arrow / Caret */
.tour-tooltip-arrow {
    position: absolute;
    width: 16px;
    height: 16px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.9);
    transform: rotate(45deg);
    z-index: -1;
}

.tour-tooltip[data-position="bottom"] .tour-tooltip-arrow {
    top: -8px;
    left: 50%;
    margin-left: -8px;
    border-bottom: none;
    border-right: none;
}

.tour-tooltip[data-position="top"] .tour-tooltip-arrow {
    bottom: -8px;
    left: 50%;
    margin-left: -8px;
    border-top: none;
    border-left: none;
}

.tour-tooltip[data-position="left"] .tour-tooltip-arrow {
    right: -8px;
    top: 50%;
    margin-top: -8px;
    border-left: none;
    border-bottom: none;
}

.tour-tooltip[data-position="right"] .tour-tooltip-arrow {
    left: -8px;
    top: 50%;
    margin-top: -8px;
    border-right: none;
    border-top: none;
}

/* --- Tooltip Inner Content --- */
.tour-tooltip-header {
    padding: 1.25rem 1.25rem 0.5rem;
}

.tour-tooltip-emoji {
    font-size: 1.75rem;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.tour-tooltip-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #1e293b;
    margin: 0;
    letter-spacing: -0.2px;
}

.tour-tooltip-body {
    padding: 0 1.25rem 0.75rem;
}

.tour-tooltip-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.5;
    margin: 0;
}

/* --- Footer (Buttons + Progress) --- */
.tour-tooltip-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Progress Dots */
.tour-progress {
    display: flex;
    gap: 6px;
    align-items: center;
}

.tour-progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
    transition: all 0.3s ease;
}

.tour-progress-dot--active {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    width: 22px;
    border-radius: 4px;
}

.tour-progress-dot--done {
    background: #818cf8;
}

/* Buttons */
.tour-btn-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.tour-btn {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    border: none;
    border-radius: 100px;
    padding: 0.45rem 1.1rem;
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 0.3px;
}

.tour-btn:active {
    transform: scale(0.96);
}

.tour-btn--primary {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.tour-btn--primary:hover {
    box-shadow: 0 6px 18px rgba(79, 70, 229, 0.45);
    transform: translateY(-1px);
}

.tour-btn--secondary {
    background: rgba(0, 0, 0, 0.05);
    color: #64748b;
}

.tour-btn--secondary:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #334155;
}

.tour-btn--skip {
    background: none;
    color: #94a3b8;
    padding: 0.45rem 0.75rem;
    font-weight: 500;
}

.tour-btn--skip:hover {
    color: #64748b;
}

/* --- Step Counter Badge --- */
.tour-step-counter {
    font-family: 'Outfit', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    color: #94a3b8;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 0.5rem 1.25rem 0;
}

/* --- Welcome/Finish special states --- */
.tour-tooltip--welcome .tour-tooltip-header,
.tour-tooltip--finish .tour-tooltip-header {
    text-align: center;
    padding-top: 1.5rem;
}

.tour-tooltip--welcome .tour-tooltip-body,
.tour-tooltip--finish .tour-tooltip-body {
    text-align: center;
}

.tour-tooltip--welcome .tour-tooltip-emoji,
.tour-tooltip--finish .tour-tooltip-emoji {
    font-size: 2.5rem;
}

/* --- Mobile Adjustments --- */
@media (max-width: 576px) {
    .tour-tooltip {
        width: calc(100vw - 24px);
        left: 12px !important;
        right: 12px !important;
        border-radius: 1.25rem;
    }

    .tour-tooltip-arrow {
        display: none;
    }

    .tour-tooltip-header {
        padding: 1rem 1rem 0.4rem;
    }

    .tour-tooltip-body {
        padding: 0 1rem 0.5rem;
    }

    .tour-tooltip-footer {
        padding: 0.6rem 1rem 0.85rem;
    }

    .tour-tooltip-title {
        font-size: 1rem;
    }

    .tour-tooltip-text {
        font-size: 0.85rem;
    }
}

/* --- Highlighted element gets raised z-index --- */
.tour-highlighted {
    position: relative;
    z-index: 9999 !important;
    pointer-events: auto !important;
}

/* Prevent body scroll during tour */
body.tour-active {
    overflow: hidden;
}
