/**
 * CSS para Dashboard Analytics Fix
 * Estilos para análisis de fallback y estados mejorados
 */

/* Estilos para análisis de fallback */
.analysis-item.fallback {
    background: linear-gradient(145deg, #f8fafc, #e2e8f0);
    border: 1px solid #cbd5e0;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.analysis-item.fallback::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #667eea, #764ba2);
}

.analysis-item.fallback:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    border-color: #667eea;
}

.fallback-badge {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.analysis-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.analysis-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
    flex: 1;
    line-height: 1.4;
}

.analysis-content {
    margin-bottom: 1rem;
}

.analysis-description {
    color: #4a5568;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.analysis-metadata {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.analysis-category,
.analysis-difficulty {
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.analysis-category {
    background: #667eea;
    color: white;
}

.analysis-difficulty {
    background: #e2e8f0;
    color: #2d3748;
    border: 1px solid #cbd5e0;
}

.analysis-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-practice-fallback,
.btn-view-fallback {
    flex: 1;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.btn-practice-fallback {
    background: #48bb78;
    color: white;
}

.btn-practice-fallback:hover {
    background: #38a169;
    transform: translateY(-1px);
}

.btn-view-fallback {
    background: #edf2f7;
    color: #2d3748;
    border: 1px solid #cbd5e0;
}

.btn-view-fallback:hover {
    background: #e2e8f0;
    border-color: #a0aec0;
}

/* Estados vacíos mejorados */
.empty-state-dashboard {
    text-align: center;
    padding: 3rem 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    margin: 2rem 0;
    border: 1px solid #e2e8f0;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    opacity: 0.7;
}

.empty-state-dashboard h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.empty-state-dashboard p {
    color: #4a5568;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.empty-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-create-analysis,
.btn-demo-analyses,
.btn-start-training {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.btn-create-analysis,
.btn-start-training {
    background: #667eea;
    color: white;
}

.btn-create-analysis:hover,
.btn-start-training:hover {
    background: #5a67d8;
    transform: translateY(-1px);
    text-decoration: none;
    color: white;
}

.btn-demo-analyses {
    background: #edf2f7;
    color: #2d3748;
    border: 1px solid #cbd5e0;
}

.btn-demo-analyses:hover {
    background: #e2e8f0;
    border-color: #a0aec0;
}

/* Estado de progreso de fallback */
.progress-fallback {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(145deg, #f7fafc, #edf2f7);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.fallback-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
    opacity: 0.7;
}

.progress-fallback h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.progress-fallback p {
    color: #4a5568;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Elementos generados como fallback */
.generated-fallback {
    min-height: 200px;
    background: #f7fafc;
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem 0;
}

.generated-fallback::before {
    content: '📊 Contenedor generado automáticamente';
    color: #a0aec0;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .analysis-actions {
        flex-direction: column;
    }
    
    .btn-practice-fallback,
    .btn-view-fallback {
        width: 100%;
    }
    
    .empty-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-create-analysis,
    .btn-demo-analyses,
    .btn-start-training {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .analysis-metadata {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .empty-state-dashboard,
    .progress-fallback {
        padding: 2rem 1rem;
        margin: 1rem 0;
    }
}

/* Animaciones */
@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.analysis-item.fallback {
    animation: fadeInSlide 0.3s ease;
}

.analysis-item.fallback:nth-child(1) { animation-delay: 0s; }
.analysis-item.fallback:nth-child(2) { animation-delay: 0.1s; }
.analysis-item.fallback:nth-child(3) { animation-delay: 0.2s; }
.analysis-item.fallback:nth-child(4) { animation-delay: 0.3s; }
.analysis-item.fallback:nth-child(5) { animation-delay: 0.4s; }
