/* ===================================================================
   PDF Import Module Styles
   Estilos para el módulo de importación de PDFs de facturas
   =================================================================== */

/* Badge Styles */
.badge-success, .badge-warning, .badge-info, .badge-secondary, .badge-primary {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75em;
  font-weight: 600;
  text-align: center;
}

.badge-success {
  background: #10b981;
  color: white;
}

.badge-warning {
  background: #f59e0b;
  color: white;
}

.badge-info {
  background: #3b82f6;
  color: white;
}

.badge-secondary {
  background: #6b7280;
  color: white;
}

.badge-primary {
  background: #3b82f6;
  color: white;
}

/* Upload Zone */
.upload-zone {
  border: 2px dashed #ccc;
  border-radius: 10px;
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #fafafa;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: #0d6efd;
  background: #f0f7ff;
  transform: scale(1.02);
}

.upload-content {
  width: 100%;
}

/* PDF Line Items */
.pdf-line-item {
  transition: all 0.2s ease;
  cursor: pointer;
}

.pdf-line-item:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.pdf-line-item.border-primary {
  border-width: 2px !important;
  background-color: #f8f9ff;
}

/* Order Line Preview */
.order-line-preview {
  border-left: 3px solid #0d6efd;
  background: #f8f9ff;
}

.order-line-preview:hover {
  box-shadow: 0 2px 6px rgba(13, 110, 253, 0.2);
}

/* Import Panels */
#importPanels .card {
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#importPanels .card-header {
  font-weight: 600;
}

/* Scrollbar personalizado para paneles */
#orderLinesPanel::-webkit-scrollbar,
#pdfDataPanel::-webkit-scrollbar {
  width: 6px;
}

#orderLinesPanel::-webkit-scrollbar-thumb,
#pdfDataPanel::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

#orderLinesPanel::-webkit-scrollbar-thumb:hover,
#pdfDataPanel::-webkit-scrollbar-thumb:hover {
  background: #999;
}

/* PDF Lines List */
.pdf-lines-list {
  max-height: 350px;
  overflow-y: auto;
}

/* Badges */
.pdf-line-item .badge {
  font-size: 0.7rem;
}

/* Loading State */
.upload-zone .spinner-border {
  width: 3rem;
  height: 3rem;
}

/* Modal Responsive */
@media (max-width: 768px) {
  #importPanels .col-md-6 {
    margin-bottom: 1rem;
  }
  
  .upload-zone {
    padding: 20px;
    min-height: 150px;
  }
  
  #orderLinesPanel,
  #pdfDataPanel {
    max-height: 300px !important;
  }
}

/* Checkbox Styling */
.pdf-line-item .form-check-input {
  cursor: pointer;
  width: 1.2rem;
  height: 1.2rem;
}

.pdf-line-item .form-check-input:checked {
  background-color: #0d6efd;
  border-color: #0d6efd;
}

/* Summary Panel */
.order-line-preview .small .badge {
  margin-right: 0.25rem;
}

/* Icons */
.pdf-line-item i.fa-cog,
.pdf-line-item i.fa-barcode {
  opacity: 0.7;
}

/* Error State */
.upload-zone .text-danger {
  color: #dc3545 !important;
}

.upload-zone .text-danger .fa-exclamation-triangle {
  color: #dc3545;
}

/* Success State */
.text-success.fw-bold {
  font-size: 1.1rem;
}

/* Animation for panel transition */
#importPanels {
  animation: fadeIn 0.3s ease-in;
}

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

/* Confirm Button */
#confirmImportBtn {
  min-width: 180px;
}

#confirmImportBtn .spinner-border-sm {
  width: 1rem;
  height: 1rem;
}
