/* ==================== TOUR SYSTEM STYLES ==================== */

/* Clase para ocultar elementos del tour */
.tour-hidden {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Spotlight para el elemento enfocado con box-shadow para oscurecer el resto */
.tour-spotlight {
    position: fixed;
    pointer-events: none; /* El spotlight no debe ser clickeable */
    z-index: 10001; /* Por encima del checkout modal (10000) */
    border-radius: 8px;
    background: transparent;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55),
                0 0 12px 2px rgba(255, 255, 255, 0.25),
                0 0 24px 4px rgba(255, 255, 255, 0.15);
    transition: none;
    /* Asegurar que el elemento sea visible */
    opacity: 1;
    visibility: visible;
    /* Agregar un borde invisible para que el elemento tenga dimensiones */
    border: 1px solid transparent;
}

/* Capa de bloqueo para evitar interacción fuera del tour */
.tour-blocker {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000; /* Mismo nivel que el checkout modal */
    pointer-events: auto; /* Bloquea todos los clicks */
    background: transparent; /* Completamente transparente */
    cursor: default; /* Cursor normal para indicar que no es clickeable */
}

/* Ventana explicativa del tour */
.tour-tooltip {
    position: fixed;
    background: var(--bg-primary, #fff);
    border-radius: 12px;
    padding: 20px;
    max-width: 350px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 10002; /* Por encima del spotlight (10001) */
    animation: tourTooltipPopIn 0.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.tour-tooltip.closing {
    animation: tourTooltipPopOut 0.15s ease-in forwards;
}

.tour-tooltip-content {
    color: var(--text-primary, #333);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.tour-tooltip-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.tour-tooltip-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tour-tooltip-btn-continue {
    background: #FF8000;
    color: white;
    flex: 1;
}

.tour-tooltip-btn-continue:hover {
    background: #e67300;
    transform: translateY(-2px);
}

.tour-tooltip-btn-cancel {
    background: var(--bg-secondary, #f0f0f0);
    color: var(--text-primary, #333);
}

.tour-tooltip-btn-cancel:hover {
    background: var(--border-color, #ddd);
}

.tour-tooltip-btn-finish {
    background: #4CAF50;
    color: white;
    flex: 1;
}

.tour-tooltip-btn-finish:hover {
    background: #45a049;
    transform: translateY(-2px);
}

/* Indicador de progreso */
.tour-progress {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--bg-primary, #fff);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary, #333);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 10001;
}

/* Animaciones */
@keyframes tourTooltipPopIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes tourTooltipPopOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.9);
    }
}

@keyframes tourTooltipIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Elementos temporales del tour */
.tour-temp-visible {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Responsive para móvil */
@media (max-width: 767px) {
    .tour-tooltip {
        max-width: 280px; /* Reducido de 320px para pantallas más pequeñas */
        padding: 14px; /* Reducido de 16px */
        width: calc(100% - 40px); /* Asegurar margen en los lados */
    }
    
    .tour-tooltip-content {
        font-size: 13px; /* Reducido de 14px */
        line-height: 1.5; /* Reducido de 1.6 */
        margin-bottom: 12px; /* Reducido de 16px */
    }
    
    .tour-tooltip-btn {
        padding: 8px 16px; /* Reducido de 10px 24px */
        font-size: 13px; /* Reducido de 14px */
    }
    
    .tour-progress {
        top: 10px;
        right: 10px;
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* Responsive para pantallas muy pequeñas (menos de 360px) */
@media (max-width: 360px) {
    .tour-tooltip {
        max-width: 260px;
        padding: 12px;
        width: calc(100% - 30px);
    }
    
    .tour-tooltip-content {
        font-size: 12px;
        line-height: 1.4;
        margin-bottom: 10px;
    }
    
    .tour-tooltip-btn {
        padding: 7px 12px;
        font-size: 12px;
    }
}

/* Responsive para desktop */
@media (min-width: 768px) {
    .tour-tooltip {
        max-width: 400px;
    }
}
