/**
 * Estilos para el panel de Documentos Subidos
 */

.uploaded-docs-modal {
    z-index: 100000;
}

.uploaded-docs-dialog {
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    background: linear-gradient(145deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.uploaded-docs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.uploaded-docs-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.uploaded-docs-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-clear-completed {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.btn-clear-completed:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.uploaded-docs-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.uploaded-docs-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.uploaded-docs-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.uploaded-docs-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.uploaded-docs-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

/* Item de archivo */
.uploaded-doc-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s;
}

.uploaded-doc-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.uploaded-doc-item.completed {
    border-color: rgba(34, 197, 94, 0.3);
    background: rgba(34, 197, 94, 0.05);
}

.uploaded-doc-item.error {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.05);
}

.uploaded-doc-item.uploading,
.uploaded-doc-item.processing,
.uploaded-doc-item.analyzing,
.uploaded-doc-item.transcribing,
.uploaded-doc-item.extracting,
.uploaded-doc-item.summarizing {
    border-color: rgba(139, 92, 246, 0.3);
    background: rgba(139, 92, 246, 0.05);
}

.uploaded-doc-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.uploaded-doc-info {
    flex: 1;
    min-width: 0;
}

.uploaded-doc-name {
    font-weight: 500;
    color: #fff;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.uploaded-doc-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 8px;
}

.uploaded-doc-progress-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.uploaded-doc-progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.uploaded-doc-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #a78bfa);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.uploaded-doc-item.completed .uploaded-doc-progress-fill {
    background: linear-gradient(90deg, #22c55e, #4ade80);
}

.uploaded-doc-item.error .uploaded-doc-progress-fill {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.uploaded-doc-progress-text {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    min-width: 35px;
    text-align: right;
}

.uploaded-doc-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    min-width: 80px;
}

.uploaded-doc-status .status-icon {
    font-size: 24px;
}

.uploaded-doc-status .status-text {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
}

/* Animación para items en proceso */
.uploaded-doc-item.uploading .uploaded-doc-progress-fill,
.uploaded-doc-item.processing .uploaded-doc-progress-fill,
.uploaded-doc-item.analyzing .uploaded-doc-progress-fill,
.uploaded-doc-item.transcribing .uploaded-doc-progress-fill,
.uploaded-doc-item.extracting .uploaded-doc-progress-fill,
.uploaded-doc-item.summarizing .uploaded-doc-progress-fill {
    animation: progressPulse 1.5s ease-in-out infinite;
}

@keyframes progressPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Animación del icono en proceso */
.uploaded-doc-item.uploading .status-icon,
.uploaded-doc-item.processing .status-icon,
.uploaded-doc-item.analyzing .status-icon,
.uploaded-doc-item.transcribing .status-icon,
.uploaded-doc-item.extracting .status-icon,
.uploaded-doc-item.summarizing .status-icon {
    animation: statusSpin 2s linear infinite;
}

@keyframes statusSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Footer */
.uploaded-docs-footer {
    padding: 14px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.uploaded-docs-summary {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

/* Badge para el botón */
.uploaded-docs-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: linear-gradient(135deg, #8b5cf6, #a78bfa);
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.5);
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Responsive */
@media (max-width: 600px) {
    .uploaded-docs-dialog {
        width: 95%;
        max-height: 90vh;
    }
    
    .uploaded-doc-item {
        flex-wrap: wrap;
    }
    
    .uploaded-doc-status {
        width: 100%;
        flex-direction: row;
        justify-content: flex-end;
        margin-top: 8px;
    }
}

