/**
 * GPT-5.1 UI Styles
 * Estilos específicos para mostrar info del modelo, reasoning, y estrategias
 */

/* ============================================
   BADGES DE MODELO
   ============================================ */

.model-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.model-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.badge-fast {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
    color: #065f46;
}

.badge-standard {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.badge-advanced {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: #7c2d12;
}

/* ============================================
   REASONING TOKENS
   ============================================ */

.reasoning-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.reasoning-none {
    background: #f3f4f6;
    color: #6b7280;
}

.reasoning-low {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

.reasoning-medium {
    background: linear-gradient(135deg, #dbeafe 0%, #93c5fd 100%);
    color: #1e40af;
}

.reasoning-high {
    background: linear-gradient(135deg, #fce7f3 0%, #f9a8d4 100%);
    color: #9f1239;
}

/* ============================================
   INDICADORES DE CALIDAD
   ============================================ */

.quality-badge {
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.quality-basic {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
    color: #065f46;
}

.quality-standard {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.quality-advanced {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: #7c2d12;
}

/* ============================================
   DASHBOARD DE MODELO
   ============================================ */

.gpt-model-dashboard {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.gpt-model-dashboard h3 {
    margin: 0 0 20px 0;
    color: #1f2937;
    font-size: 1.25rem;
}

.model-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.model-card {
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.model-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: #9ca3af;
}

.model-card.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    transform: scale(1.05);
}

.model-card.active * {
    color: white !important;
}

.model-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.model-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: #1f2937;
    margin: 8px 0;
}

.model-desc {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 4px 0;
}

.model-savings,
.model-quality,
.model-reasoning {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 12px;
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.model-quality {
    background: rgba(99, 102, 241, 0.1);
    color: #4f46e5;
}

.model-reasoning {
    background: rgba(236, 72, 153, 0.1);
    color: #db2777;
}

/* ============================================
   INDICADOR DE PROGRESO DE REASONING
   ============================================ */

.reasoning-progress {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.progress-header span:first-child {
    font-weight: 600;
    color: #1f2937;
    font-size: 1rem;
}

.progress-tokens {
    font-size: 0.9rem;
    color: #6b7280;
    font-family: 'Courier New', monospace;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    margin: 16px 0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

.progress-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.step {
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.step.completed {
    background: #d1fae5;
    color: #065f46;
}

.step.active {
    background: #dbeafe;
    color: #1e40af;
    font-weight: 600;
    animation: pulse 2s infinite;
}

.step.pending {
    background: #f3f4f6;
    color: #9ca3af;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* ============================================
   COMPARATIVA DE ESTRATEGIAS
   ============================================ */

.strategy-comparison {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px;
    margin: 20px 0;
    overflow-x: auto;
}

.strategy-comparison table {
    width: 100%;
    border-collapse: collapse;
}

.strategy-comparison th {
    background: linear-gradient(135deg, #f9fafb 0%, #e5e7eb 100%);
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #1f2937;
    border-bottom: 2px solid #d1d5db;
}

.strategy-comparison td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.strategy-comparison tr:hover {
    background: #f9fafb;
}

.strategy-comparison tr.active {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
}

.strategy-comparison tr.active td {
    font-weight: 600;
    color: #5b21b6;
}

/* ============================================
   INFO TOOLTIPS
   ============================================ */

.info-tooltip {
    position: relative;
    cursor: help;
    border-bottom: 1px dotted #6b7280;
}

.info-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.info-tooltip:hover::after {
    opacity: 1;
}

/* ============================================
   AI INFO SECTION
   ============================================ */

.ai-info-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0e7ff 100%);
    border: 2px solid #c7d2fe;
    border-radius: 12px;
    padding: 20px;
    margin: 16px 0;
}

.ai-info-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.ai-info-header h4 {
    margin: 0;
    color: #4338ca;
    font-size: 1.1rem;
}

.ai-info-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.ai-info-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.ai-info-detail {
    background: white;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.ai-info-detail-label {
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 4px;
}

.ai-info-detail-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
}

/* ============================================
   LOADING STATES ESPECÍFICOS
   ============================================ */

.loading-gpt {
    text-align: center;
    padding: 32px;
}

.loading-gpt-icon {
    font-size: 3rem;
    animation: float 2s ease-in-out infinite;
    margin-bottom: 16px;
}

.loading-gpt-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.loading-gpt-subtext {
    font-size: 0.9rem;
    color: #6b7280;
}

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

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .model-grid {
        grid-template-columns: 1fr;
    }
    
    .progress-steps {
        grid-template-columns: 1fr;
    }
    
    .ai-info-details {
        grid-template-columns: 1fr;
    }
    
    .info-tooltip::after {
        white-space: normal;
        max-width: 200px;
    }
}

/* ============================================
   ANIMACIONES
   ============================================ */

@keyframes modalZoom {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.slide-up {
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
