/* Estilos para el procesador de facturas */

.drop-zone {
    border: 3px dashed #dee2e6;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    background-color: #f8f9fa;
}

.drop-zone.dragover {
    border-color: #0d6efd;
    background-color: #e7f1ff;
}

.file-item {
    padding: 10px;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.spinner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.invoice-result {
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.invoice-header {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.invoice-field {
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.field-label {
    font-weight: 600;
    color: #495057;
    display: inline-block;
    width: 150px;
}

.field-value {
    color: #212529;
}

.confidence-badge {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 10px;
}

.confidence-high {
    background-color: #d4edda;
    color: #155724;
}

.confidence-medium {
    background-color: #fff3cd;
    color: #856404;
}

.confidence-low {
    background-color: #f8d7da;
    color: #721c24;
}

.items-table {
    margin-top: 20px;
}

.table-container {
    max-height: 300px;
    overflow-y: auto;
}

.summary-card {
    background-color: #e7f1ff;
    border: 1px solid #b6d4fe;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
}

.nl-instruction-area {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
    display: none;
}

.nl-examples {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 5px;
}

/* Botón ERP enviado */
.erp-send-btn:disabled {
    cursor: not-allowed;
    opacity: 0.85;
}

.erp-send-btn.btn-success:disabled {
    background-color: #198754;
    border-color: #198754;
    color: white;
}

/* Modo selección múltiple */
.invoice-checkbox {
    transition: all 0.3s ease;
}

.invoice-select-checkbox {
    width: 1.5rem;
    height: 1.5rem;
    cursor: pointer;
}

.invoice-select-checkbox:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.invoice-result.selected {
    border: 2px solid #0d6efd;
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.2);
}

#selectionToolbar {
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal de progreso */
#batchProgressModal .progress {
    height: 25px;
}

#batchProgressModal .progress-bar {
    font-size: 14px;
    line-height: 25px;
}

/* Estilos para campos editables de items */
.item-field {
    cursor: pointer;
    transition: background-color 0.2s;
}

.item-field:hover {
    background-color: #f8f9fa;
}

.item-field input {
    width: 100%;
    border: 1px solid #ced4da;
    padding: 4px 8px;
}

.item-field input[type="number"] {
    text-align: right;
}

/* Mejoras visuales para modo edición */
.invoice-result input.form-control-sm {
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
}

.invoice-result .item-field input.form-control-sm {
    padding: 0.25rem 0.5rem;
    height: auto;
    min-height: 30px;
}