/**
 * Estilos do Sistema de Tour
 * Específico para a página de Pré-Registro
 */

/* Overlay escuro */
.tour-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.tour-overlay-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Abertura no elemento destacado */
.tour-overlay-active::before {
    content: '';
    position: absolute;
    top: var(--highlight-top, 0);
    left: var(--highlight-left, 0);
    width: var(--highlight-width, 0);
    height: var(--highlight-height, 0);
    border-radius: 8px;
    /* Área destacada mais clara - menos escurecimento */
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5),
                0 0 0 4px rgba(251, 191, 36, 1),
                0 0 30px rgba(251, 191, 36, 0.8),
                inset 0 0 50px rgba(255, 255, 255, 0.1);
    pointer-events: none;
    z-index: 9999;
    animation: tour-pulse 2s ease-in-out infinite;
    /* Remover qualquer desfoque/blur */
    filter: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    /* Adicionar brilho na área destacada */
    background: rgba(255, 255, 255, 0.05);
}

@keyframes tour-pulse {
    0%, 100% {
        box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5),
                    0 0 0 4px rgba(251, 191, 36, 1),
                    0 0 30px rgba(251, 191, 36, 0.8),
                    inset 0 0 50px rgba(255, 255, 255, 0.1);
    }
    50% {
        box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45),
                    0 0 0 6px rgba(251, 191, 36, 1),
                    0 0 40px rgba(251, 191, 36, 1),
                    inset 0 0 60px rgba(255, 255, 255, 0.15);
    }
}

/* Elemento destacado */
.tour-highlight {
    position: relative;
    z-index: 10000 !important;
    transition: all 0.3s ease;
    /* Remover qualquer desfoque/blur */
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    opacity: 1 !important;
    /* Garantir que o elemento fique bem visível e mais claro */
    background-color: inherit !important;
    /* Adicionar brilho/iluminação no elemento destacado */
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.4),
                0 0 40px rgba(251, 191, 36, 0.2),
                inset 0 0 30px rgba(255, 255, 255, 0.1) !important;
    /* Aumentar um pouco o brilho */
    filter: brightness(1.1) !important;
}

.tour-highlight:hover {
    transform: scale(1.02);
    box-shadow: 0 0 25px rgba(251, 191, 36, 0.5),
                0 0 50px rgba(251, 191, 36, 0.3),
                inset 0 0 40px rgba(255, 255, 255, 0.15) !important;
}

/* Tooltip */
.tour-tooltip {
    position: fixed;
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border: 2px solid rgba(251, 191, 36, 0.5);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8),
                0 0 20px rgba(251, 191, 36, 0.3);
    max-width: 400px;
    min-width: 280px;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    pointer-events: auto;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.tour-tooltip-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Header do Tooltip */
.tour-tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(251, 191, 36, 0.2);
    background: rgba(251, 191, 36, 0.1);
}

.tour-tooltip-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fbbf24;
    margin: 0;
    font-family: 'Rajdhani', 'Exo 2', sans-serif;
}

.tour-tooltip-close {
    background: transparent;
    border: none;
    color: #9ca3af;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.tour-tooltip-close:hover {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
}

/* Conteúdo do Tooltip */
.tour-tooltip-content {
    padding: 20px;
    color: #e5e7eb;
    line-height: 1.6;
    font-size: 0.95rem;
}

.tour-tooltip-content p {
    margin: 0 0 12px 0;
}

.tour-tooltip-content p:last-child {
    margin-bottom: 0;
}

.tour-tooltip-content strong {
    color: #fbbf24;
}

/* Footer do Tooltip */
.tour-tooltip-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(251, 191, 36, 0.2);
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tour-tooltip-progress {
    text-align: center;
    color: #9ca3af;
    font-size: 0.875rem;
}

.tour-tooltip-actions {
    display: flex;
    gap: 8px;
    justify-content: space-between;
}

/* Botões */
.tour-btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Rajdhani', 'Exo 2', sans-serif;
}

.tour-btn-primary {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1f2937;
    flex: 1;
}

.tour-btn-primary:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
}

.tour-btn-primary:active {
    transform: translateY(0);
}

.tour-btn-secondary {
    background: rgba(75, 85, 99, 0.8);
    color: #e5e7eb;
    border: 1px solid rgba(107, 114, 128, 0.5);
}

.tour-btn-secondary:hover {
    background: rgba(107, 114, 128, 0.9);
    border-color: rgba(156, 163, 175, 0.7);
}

/* Botão de Reiniciar Tour */
.tour-restart-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9997;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1f2937;
    border: none;
    padding: 12px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.4);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    font-family: 'Rajdhani', 'Exo 2', sans-serif;
}

.tour-restart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(251, 191, 36, 0.6);
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.tour-restart-btn:active {
    transform: translateY(0);
}

.tour-restart-btn i {
    font-size: 1rem;
}

/* Responsivo */
@media (max-width: 768px) {
    .tour-tooltip {
        max-width: calc(100vw - 20px);
        min-width: auto;
        width: calc(100vw - 20px);
        left: 10px !important;
        right: 10px !important;
        transform: translateX(0) !important;
        position: fixed !important;
    }
    
    .tour-tooltip-header {
        padding: 12px 16px;
    }
    
    .tour-tooltip-title {
        font-size: 1.125rem;
    }
    
    .tour-tooltip-content {
        padding: 16px;
        font-size: 0.875rem;
        line-height: 1.5;
    }
    
    .tour-tooltip-footer {
        padding: 12px 16px;
    }
    
    .tour-tooltip-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .tour-btn {
        width: 100%;
        padding: 10px 16px;
        font-size: 0.875rem;
    }
    
    .tour-tooltip-progress {
        font-size: 0.8125rem;
        margin-bottom: 4px;
    }
    
    .tour-restart-btn {
        bottom: 16px;
        right: 16px;
        padding: 10px 16px;
        font-size: 0.75rem;
    }
    
    .tour-restart-btn i {
        font-size: 0.875rem;
    }
    
    /* Overlay mais claro no mobile */
    .tour-overlay {
        background: rgba(0, 0, 0, 0.7);
    }
    
    .tour-overlay-active::before {
        box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.7),
                    0 0 0 3px rgba(251, 191, 36, 1),
                    0 0 15px rgba(251, 191, 36, 0.6),
                    inset 0 0 30px rgba(255, 255, 255, 0.08);
    }
}

@media (max-width: 640px) {
    .tour-tooltip {
        max-width: calc(100vw - 16px);
        width: calc(100vw - 16px);
        left: 8px !important;
        right: 8px !important;
        max-height: 85vh;
        overflow-y: auto;
    }
    
    .tour-tooltip-header {
        padding: 10px 14px;
        flex-wrap: wrap;
    }
    
    .tour-tooltip-title {
        font-size: 1rem;
        flex: 1;
        min-width: 0;
    }
    
    .tour-tooltip-close {
        padding: 4px;
        font-size: 1.125rem;
    }
    
    .tour-tooltip-content {
        padding: 14px;
        font-size: 0.8125rem;
        line-height: 1.5;
    }
    
    .tour-tooltip-content p {
        margin-bottom: 10px;
    }
    
    .tour-tooltip-footer {
        padding: 10px 14px;
    }
    
    .tour-tooltip-progress {
        font-size: 0.75rem;
        margin-bottom: 6px;
    }
    
    .tour-btn {
        padding: 10px 14px;
        font-size: 0.8125rem;
    }
    
    .tour-restart-btn {
        bottom: 12px;
        right: 12px;
        padding: 8px 14px;
        font-size: 0.6875rem;
    }
    
    .tour-restart-btn i {
        font-size: 0.8125rem;
        margin-right: 4px;
    }
    
    /* Ajustar highlight no mobile */
    .tour-highlight {
        box-shadow: 0 0 15px rgba(251, 191, 36, 0.3),
                    0 0 30px rgba(251, 191, 36, 0.15),
                    inset 0 0 20px rgba(255, 255, 255, 0.08) !important;
    }
}

/* Animações de entrada */
@keyframes tour-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tour-tooltip-visible {
    animation: tour-fade-in 0.3s ease;
}

/* Acessibilidade */
.tour-tooltip:focus-within {
    outline: 2px solid rgba(251, 191, 36, 0.8);
    outline-offset: 2px;
}

.tour-btn:focus {
    outline: 2px solid rgba(251, 191, 36, 0.8);
    outline-offset: 2px;
}

.tour-restart-btn:focus {
    outline: 2px solid rgba(251, 191, 36, 0.8);
    outline-offset: 2px;
}

