/* ========================================
   DIRECTFLOW - TOUR GUIADO STYLES
   ======================================== */

/* ========== OVERLAY E SPOTLIGHT ========== */

.tour-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 9998;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.tour-spotlight {
    position: absolute;
    border-radius: 8px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.75);
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
}

/* ========== TOOLTIP DO TOUR ========== */

.tour-tooltip {
    position: fixed;
    background: var(--card-bg, white);
    border-radius: 12px;
    padding: 0;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    /* animation: tooltipSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1); */
    animation: fadeIn 1s ease;
    /* animation: slideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); */
}

/* @keyframes tooltipSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
} */

/* @keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
} */

.tour-tooltip-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tour-step-counter {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.tour-tooltip-body {
    padding: 25px;
}

.tour-tooltip-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary, #333);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tour-tooltip-description {
    color: var(--text-secondary, #666);
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 15px;
}

.tour-tooltip-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-top: 1px solid var(--border-color, #eee);
    background: var(--bg-secondary, #f9f9f9);
    border-radius: 0 0 12px 12px;
}

/* ========== PROGRESSO ========== */

.tour-progress {
    display: flex;
    gap: 6px;
    align-items: center;
}

.tour-progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border-color, #ddd);
    transition: all 0.3s ease;
}

.tour-progress-dot.active {
    background: #667eea;
    width: 24px;
    border-radius: 4px;
}

/* ========== BOTÕES ========== */

.tour-buttons {
    display: flex;
    gap: 10px;
}

.tour-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.tour-btn-skip {
    background: transparent;
    color: #999;
}

.tour-btn-skip:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.tour-btn-next {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.tour-btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.tour-btn-prev {
    background: var(--bg-secondary, #f0f0f0);
    color: var(--text-primary, #333);
}

.tour-btn-prev:hover {
    background: var(--border-color, #e0e0e0);
}

.tour-btn-finish {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.tour-btn-finish:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

/* ========== HINTS E DICAS ========== */

.tour-hint {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-top: 15px;
    border-left: 3px solid #ffc107;
    line-height: 1.5;
}

.tour-hint-icon {
    font-size: 18px;
    flex-shrink: 0;
}

/* ========== MODAL DE BOAS-VINDAS ========== */

.tour-welcome-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    animation: fadeIn 0.3s ease;
    padding: 20px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.tour-welcome-content {
    background: var(--card-bg, white);
    border-radius: 20px;
    padding: 0;
    max-width: 520px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.tour-welcome-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px 30px;
    border-radius: 20px 20px 0 0;
    text-align: center;
    color: white;
}

.tour-welcome-icon {
    font-size: 70px;
    margin-bottom: 15px;
    animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.tour-welcome-header h2 {
    font-size: 30px;
    margin-bottom: 10px;
    font-weight: 700;
}

.tour-welcome-header p {
    font-size: 16px;
    opacity: 0.95;
    line-height: 1.5;
}

.tour-welcome-body {
    padding: 35px 30px;
}

.tour-welcome-feature {
    display: flex;
    align-items: start;
    gap: 18px;
    margin-bottom: 25px;
}

.tour-welcome-feature:last-child {
    margin-bottom: 0;
}

.tour-welcome-feature-icon {
    font-size: 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.tour-welcome-feature-text h3 {
    color: var(--text-primary, #333);
    font-size: 17px;
    margin-bottom: 6px;
    font-weight: 600;
}

.tour-welcome-feature-text p {
    color: var(--text-secondary, #666);
    font-size: 14px;
    line-height: 1.6;
}

.tour-welcome-footer {
    padding: 0 30px 30px 30px;
    display: flex;
    gap: 12px;
}

.tour-welcome-btn {
    flex: 1;
    padding: 16px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.tour-welcome-btn-skip {
    background: var(--bg-secondary, #f0f0f0);
    color: #666;
}

.tour-welcome-btn-skip:hover {
    background: var(--border-color, #e0e0e0);
    transform: translateY(-2px);
}

.tour-welcome-btn-start {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.tour-welcome-btn-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

/* ========== CONFETES ========== */

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    z-index: 10002;
}

@keyframes confetti-fall {
    to {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* ========== BOTÃO DE AJUDA FLUTUANTE ========== */

.tour-help-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    z-index: 999;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tour-help-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.5);
}

.tour-help-button.hidden {
    display: none;
}

/* ========== RESPONSIVIDADE ========== */

@media (max-width: 768px) {
    .tour-tooltip {
        max-width: 95%;
        position: fixed !important;
        left: 2.5% !important;
        right: 2.5% !important;
        bottom: 20px !important;
        top: auto !important;
        transform: none !important;
    }

    .tour-spotlight {
        box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.85);
    }

    .tour-tooltip-title {
        font-size: 18px;
    }

    .tour-tooltip-description {
        font-size: 14px;
    }

    .tour-buttons {
        flex-wrap: wrap;
    }

    .tour-btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .tour-welcome-content {
        max-width: 95%;
        margin: 0 auto;
    }

    .tour-welcome-header {
        padding: 30px 20px;
    }

    .tour-welcome-header h2 {
        font-size: 24px;
    }

    .tour-welcome-icon {
        font-size: 50px;
    }

    .tour-welcome-body {
        padding: 25px 20px;
    }

    .tour-welcome-footer {
        padding: 0 20px 25px 20px;
        flex-direction: column;
    }

    .tour-welcome-btn {
        width: 100%;
    }

    .tour-help-button {
        width: 50px;
        height: 50px;
        font-size: 24px;
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    .tour-tooltip-body {
        padding: 20px;
    }

    .tour-tooltip-footer {
        padding: 15px 20px;
        flex-direction: column;
        gap: 12px;
    }

    .tour-progress {
        order: 2;
        margin-top: 10px;
    }

    .tour-buttons {
        order: 1;
        width: 100%;
        flex-direction: column;
    }

    .tour-btn {
        width: 100%;
    }

    .tour-welcome-feature {
        gap: 12px;
    }

    .tour-welcome-feature-icon {
        width: 45px;
        height: 45px;
        font-size: 24px;
    }
}

/* ========== TEMA ESCURO ========== */

[data-theme="dark"] .tour-tooltip {
    background: #2d2d2d;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .tour-tooltip-title {
    color: #ffffff;
}

[data-theme="dark"] .tour-tooltip-description {
    color: #b0b0b0;
}

[data-theme="dark"] .tour-tooltip-footer {
    background: #242424;
    border-top-color: #404040;
}

[data-theme="dark"] .tour-btn-prev {
    background: #404040;
    color: #ffffff;
}

[data-theme="dark"] .tour-btn-prev:hover {
    background: #505050;
}

[data-theme="dark"] .tour-btn-skip {
    color: #888;
}

[data-theme="dark"] .tour-btn-skip:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.15);
}

[data-theme="dark"] .tour-welcome-content {
    background: #2d2d2d;
}

[data-theme="dark"] .tour-welcome-feature-text h3 {
    color: #ffffff;
}

[data-theme="dark"] .tour-welcome-feature-text p {
    color: #b0b0b0;
}

[data-theme="dark"] .tour-welcome-btn-skip {
    background: #404040;
    color: #b0b0b0;
}

[data-theme="dark"] .tour-welcome-btn-skip:hover {
    background: #505050;
}

/* ========== ACESSIBILIDADE ========== */

.tour-tooltip:focus-visible,
.tour-btn:focus-visible,
.tour-welcome-btn:focus-visible {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

/* Reduzir animações para quem prefere */
@media (prefers-reduced-motion: reduce) {

    .tour-tooltip,
    .tour-spotlight,
    .tour-welcome-content,
    .tour-welcome-icon,
    .confetti {
        animation: none !important;
        transition: none !important;
    }
}