/* ESTILOS PARA GESTIÓN DE ARCHIVOS */

.files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3282b8;
}

.files-actions {
    display: flex;
    gap: 10px;
}

.btn-clear-all, .btn-info {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: bold;
}

.btn-info {
    background: #3282b8;
}

.btn-clear-all:hover {
    background: #e55555;
}

.btn-info:hover {
    background: #0f4c75;
}

.files-grid {
    display: grid;
    gap: 10px;
    margin-bottom: 15px;
}

.file-item {
    display: flex;
    align-items: center;
    background: #0f4c75;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #3282b8;
    transition: all 0.2s ease;
}

.file-item:hover {
    background: #1a5490;
    transform: translateY(-1px);
}

.file-icon {
    font-size: 1.5em;
    margin-right: 12px;
    min-width: 30px;
    text-align: center;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: bold;
    color: #eee;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85em;
    color: #ccc;
}

.file-type {
    background: #3282b8;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.8em;
    text-transform: uppercase;
}

.file-actions {
    display: flex;
    gap: 5px;
    margin-left: 10px;
}

.btn-preview, .btn-remove {
    background: none;
    border: 1px solid #666;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s ease;
}

.btn-preview {
    color: #ffd93d;
    border-color: #ffd93d;
}

.btn-preview:hover {
    background: #ffd93d;
    color: #000;
}

.btn-remove {
    color: #ff6b6b;
    border-color: #ff6b6b;
}

.btn-remove:hover {
    background: #ff6b6b;
    color: white;
}

.usage-info {
    background: rgba(50, 130, 184, 0.1);
    border: 1px solid #3282b8;
    padding: 10px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.usage-item {
    display: flex;
    flex-direction: column;
    text-align: center;
}

.usage-label {
    font-size: 0.8em;
    color: #ccc;
    margin-bottom: 3px;
}

.usage-value {
    font-weight: bold;
    color: #eee;
}

.usage-value.ready {
    color: #6bcf7f;
}

.usage-value.waiting {
    color: #ffd93d;
}

/* Modal de vista previa */
.preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.preview-content {
    background: #1a1a2e;
    border-radius: 10px;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 2px solid #3282b8;
    background: #16213e;
    border-radius: 10px 10px 0 0;
}

.modal-header h3 {
    color: #3282b8;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: #ff6b6b;
    font-size: 1.5em;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: #ff6b6b;
    color: white;
}

.preview-body {
    padding: 20px;
    overflow: auto;
    flex: 1;
}

.preview-info {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #3282b8;
}

.preview-info span {
    font-size: 0.9em;
    color: #ccc;
}

.preview-type {
    background: #3282b8;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
}

.preview-code {
    background: #0f1419;
    padding: 15px;
    border-radius: 5px;
    overflow: auto;
    max-height: 400px;
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
    line-height: 1.4;
    color: #eee;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #3282b8;
    text-align: right;
}

.no-files, .no-results {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 30px;
}

/* Responsive */
@media (max-width: 768px) {
    .files-header {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .file-item {
        flex-direction: column;
        gap: 10px;
    }
    
    .file-actions {
        justify-content: center;
        margin-left: 0;
    }
    
    .usage-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .preview-content {
        max-width: 95%;
        max-height: 95%;
    }
}