/* ============================================
   SISTEMA DE GROWTH
   Empty States + Sugestões + Onboarding
   ============================================ */

/* Empty States */
.empty-state {
    padding: 64px 32px;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
}

.empty-state.highlight {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(59, 130, 246, 0.1));
    border-color: rgba(139, 92, 246, 0.3);
}

.empty-state-icon {
    font-size: 72px;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.empty-state-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 12px 0;
}

.empty-state-description {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0 0 24px 0;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.empty-state-progress {
    max-width: 300px;
    margin: 24px auto;
}

.progress-bar-empty {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 8px;
    transition: width 0.5s ease;
}

.progress-label {
    font-size: 13px;
    color: var(--text-tertiary);
}

.btn-empty-action {
    padding: 14px 32px;
    background: var(--gradient-primary);
    color: #FFF;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-empty-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4);
}

/* Suggestions Widget */
.suggestions-widget {
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    margin-bottom: 24px;
}

.suggestions-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 16px 0;
}

.suggestions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.suggestion-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.suggestion-card:hover {
    background: rgba(255, 255, 255, 0.05);
}

.suggestion-card.priority-high {
    border-color: rgba(139, 92, 246, 0.3);
    background: rgba(139, 92, 246, 0.05);
}

.suggestion-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    flex-shrink: 0;
}

.suggestion-content {
    flex: 1;
}

.suggestion-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.suggestion-description {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

.suggestion-action {
    padding: 8px 16px;
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.suggestion-action:hover {
    background: rgba(139, 92, 246, 0.25);
}

/* Onboarding */
.onboarding-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
}

/* Mobile: tour só com texto (sem spotlight em áreas ocultas) */
.onboarding-overlay.onboarding-overlay--text-only {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(12px, env(safe-area-inset-top, 0px)) 16px max(20px, env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
}

.onboarding-overlay--text-only .onboarding-tooltip--text-only {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: 100%;
    max-width: min(400px, 92vw);
    margin: 0 auto;
}

.onboarding-tooltip--text-only h3 {
    font-size: 17px;
    line-height: 1.3;
}

.onboarding-tooltip--text-only p {
    font-size: 14px;
    line-height: 1.55;
    margin-bottom: 16px;
}

.onboarding-spotlight {
    position: absolute;
    background: transparent;
    box-shadow: 
        0 0 0 4px rgba(139, 92, 246, 0.6),        /* Borda roxa brilhante */
        0 0 0 8px rgba(139, 92, 246, 0.3),        /* Borda roxa externa */
        0 0 0 9999px rgba(0, 0, 0, 0.85);         /* Escurece o resto */
    border-radius: 12px;
    z-index: 10001;
    animation: spotlight-pulse 2s ease-in-out infinite;
    pointer-events: none; /* Permite cliques no elemento destacado */
}

@keyframes spotlight-pulse {
    0%, 100% {
        box-shadow: 
            0 0 0 4px rgba(139, 92, 246, 0.8),
            0 0 0 8px rgba(139, 92, 246, 0.4),
            0 0 0 9999px rgba(0, 0, 0, 0.85);
    }
    50% {
        box-shadow: 
            0 0 0 6px rgba(139, 92, 246, 1),
            0 0 0 12px rgba(139, 92, 246, 0.6),
            0 0 0 9999px rgba(0, 0, 0, 0.85);
    }
}

.onboarding-tooltip {
    position: absolute;
    max-width: 380px;
    width: 380px;
    padding: 20px;
    background: #1A1D23;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    z-index: 10002;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.onboarding-tooltip h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.onboarding-tooltip p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0 0 20px 0;
}

.onboarding-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.onboarding-buttons {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
}

.btn-skip {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.08);
    color: #E5E7EB !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-shadow: none;
    white-space: nowrap;
}

.btn-skip:hover {
    color: #FFFFFF !important;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.btn-prev {
    padding: 8px 12px;
    background: rgba(139, 92, 246, 0.15);
    color: #A78BFA !important;
    border: 1px solid rgba(139, 92, 246, 0.4);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-shadow: none;
    white-space: nowrap;
}

.btn-prev:hover {
    background: rgba(139, 92, 246, 0.25);
    border-color: rgba(139, 92, 246, 0.6);
    color: #C4B5FD !important;
    transform: translateY(-1px);
}

.btn-prev:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.onboarding-progress {
    font-size: 13px;
    font-weight: 700;
    color: #FFFFFF !important;
    background: rgba(139, 92, 246, 0.2);
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid rgba(139, 92, 246, 0.4);
    text-shadow: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-next {
    padding: 8px 16px;
    background: linear-gradient(135deg, #8B5CF6 0%, #3B82F6 100%);
    color: #FFFFFF !important;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 
        0 4px 14px rgba(139, 92, 246, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.btn-next:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #9F7AEA 0%, #60A5FA 100%);
    box-shadow: 
        0 6px 20px rgba(139, 92, 246, 0.7),
        0 0 0 1px rgba(255, 255, 255, 0.3) inset;
}

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

/* Toast Simples (Fallback) */
.toast-simple {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .suggestion-card {
        flex-direction: column;
        text-align: center;
    }
    
    .suggestion-action {
        width: 100%;
    }
    
    /* Spotlight desktop em viewport estreita — não aplicar ao tour só-texto mobile */
    .onboarding-tooltip:not(.onboarding-tooltip--text-only) {
        max-width: 280px;
        left: 50% !important;
        transform: translateX(-50%);
    }
    
    .toast-simple {
        left: 20px;
        right: 20px;
        width: calc(100% - 40px);
    }
}

