/* ========================================
   TOUR GUIADO — Spotlight + Tooltip
   ======================================== */

/* Overlay oscuro con recorte spotlight */
.tour-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    pointer-events: all;
    transition: opacity 0.3s ease;
}

.tour-overlay.fade-in {
    animation: tourFadeIn 0.3s ease forwards;
}

.tour-overlay.fade-out {
    animation: tourFadeOut 0.25s ease forwards;
}

@keyframes tourFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes tourFadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

/* SVG overlay para spotlight */
.tour-overlay svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* Tooltip card */
.tour-tooltip {
    position: fixed;
    z-index: 10001;
    background: linear-gradient(135deg, #1e1e2f 0%, #2a2a4a 100%);
    border: 1px solid rgba(138, 96, 255, 0.4);
    border-radius: 16px;
    padding: 20px 22px 16px;
    max-width: 320px;
    min-width: 260px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(138, 96, 255, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    color: #fff;
    animation: tourTooltipIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    transform-origin: center top;
}

.tour-tooltip.repositioning {
    animation: none;
    transition: top 0.3s ease, left 0.3s ease;
}

@keyframes tourTooltipIn {
    from {
        opacity: 0;
        transform: scale(0.85) translateY(8px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Indicador de paso */
.tour-step-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: rgba(138, 96, 255, 0.9);
    margin-bottom: 8px;
}

.tour-step-badge .tour-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #8a60ff;
    animation: tourPulse 2s infinite;
}

@keyframes tourPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.3);
    }
}

/* Título del paso */
.tour-title {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 6px;
    line-height: 1.3;
}

/* Descripción del paso */
.tour-desc {
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.72);
    margin: 0 0 16px;
    line-height: 1.5;
}

/* Barra inferior del tooltip */
.tour-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

/* Dots de progreso */
.tour-progress {
    display: flex;
    gap: 5px;
}

.tour-progress-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
}

.tour-progress-dot.active {
    background: #8a60ff;
    box-shadow: 0 0 6px rgba(138, 96, 255, 0.5);
}

.tour-progress-dot.completed {
    background: rgba(138, 96, 255, 0.4);
}

/* Botones */
.tour-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.tour-btn {
    border: none;
    border-radius: 10px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.tour-btn-skip {
    background: transparent;
    color: rgba(255, 255, 255, 0.45);
    padding: 8px 10px;
    font-size: 12px;
}

.tour-btn-skip:hover {
    color: rgba(255, 255, 255, 0.7);
}

.tour-btn-prev {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
}

.tour-btn-prev:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.tour-btn-next {
    background: linear-gradient(135deg, #8a60ff, #6c3fe0);
    color: #fff;
    box-shadow: 0 2px 8px rgba(138, 96, 255, 0.35);
}

.tour-btn-next:hover {
    background: linear-gradient(135deg, #9a70ff, #7c4ff0);
    box-shadow: 0 4px 14px rgba(138, 96, 255, 0.45);
    transform: translateY(-1px);
}

.tour-btn-next:active {
    transform: translateY(0);
}

/* Spotlight: borde brillante alrededor del elemento */
.tour-spotlight-ring {
    position: fixed;
    z-index: 10000;
    border: 2px solid rgba(138, 96, 255, 0.6);
    border-radius: 12px;
    pointer-events: none;
    box-shadow:
        0 0 15px rgba(138, 96, 255, 0.25),
        inset 0 0 15px rgba(138, 96, 255, 0.05);
    animation: tourRingPulse 2s infinite;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes tourRingPulse {

    0%,
    100% {
        box-shadow: 0 0 15px rgba(138, 96, 255, 0.25), inset 0 0 15px rgba(138, 96, 255, 0.05);
    }

    50% {
        box-shadow: 0 0 25px rgba(138, 96, 255, 0.4), inset 0 0 25px rgba(138, 96, 255, 0.1);
    }
}

/* Botón "?" para relanzar tour */
.tour-help-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(138, 96, 255, 0.15);
    color: #8a60ff;
    border: 1px solid rgba(138, 96, 255, 0.3);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.tour-help-btn:hover {
    background: rgba(138, 96, 255, 0.25);
    transform: scale(1.1);
}

/* Responsive: en móvil el tooltip ocupa más ancho */
@media (max-width: 480px) {
    .tour-tooltip {
        max-width: calc(100vw - 32px);
        min-width: 240px;
        left: 16px !important;
        right: 16px !important;
    }
}

/* Highlight temporal del elemento */
.tour-highlight {
    position: relative;
    z-index: 10001;
}