/* CSV to MySQL Comparator Styles */

/* Base Styles */
.biomesight-wrap { 
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial; 
  line-height: 1.6; 
  color: #1e293b;
  max-width: 1200px;
  margin: 0 auto;
}

/* Card Container */
.csv-comparator-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  margin-bottom: 2rem;
}

/* Upload Area */
.csv-upload-area {
  border: 2px dashed #cbd5e1;
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  background: #f8fafc;
  transition: all 0.3s ease;
  margin-bottom: 1.5rem;
}

.csv-upload-area.drag-over {
  border-color: #0ea5e9;
  background: #e0f2fe;
}

.csv-upload-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  opacity: 0.6;
}

.csv-upload-text {
  font-size: 1rem;
  color: #475569;
  margin-bottom: 0.5rem;
}

.csv-upload-hint {
  font-size: 0.875rem;
  color: #94a3b8;
}

/* Controls */
.biomesight-controls { 
  display: flex; 
  flex-wrap: wrap; 
  gap: 0.75rem; 
  align-items: center; 
  justify-content: center;
}

/* Buttons */
.biomesight-btn { 
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  color: #fff; 
  border: none; 
  padding: 0.65rem 1.25rem; 
  border-radius: 8px; 
  cursor: pointer; 
  font-weight: 600; 
  font-size: 0.95rem;
  box-shadow: 0 2px 4px rgba(14, 165, 233, 0.3);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.biomesight-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(14, 165, 233, 0.4);
}

.biomesight-btn:active:not(:disabled) {
  transform: translateY(0);
}

.biomesight-btn.slate { 
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
  box-shadow: 0 2px 4px rgba(100, 116, 139, 0.3);
}

.biomesight-btn.slate:hover:not(:disabled) {
  box-shadow: 0 4px 8px rgba(100, 116, 139, 0.4);
}

.biomesight-btn:disabled { 
  opacity: 0.5; 
  cursor: not-allowed;
  transform: none !important;
}

/* Icon styles */
.btn-icon {
  width: 16px;
  height: 16px;
}

/* Hide file inputs */
.biomesight-wrap input[type=file]{ 
  position: absolute !important; 
  left: -9999px !important; 
  width: 1px !important; 
  height: 1px !important; 
  opacity: 0 !important; 
  pointer-events: none !important; 
}

/* File button */
.biomesight-file-btn { 
  position: relative; 
  display: inline-flex; 
  align-items: center; 
  justify-content: center; 
  gap: 0.5rem; 
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  color: #fff; 
  border-radius: 8px; 
  padding: 0.65rem 1.25rem; 
  font-weight: 600; 
  font-size: 0.95rem;
  box-shadow: 0 2px 4px rgba(14, 165, 233, 0.3);
  cursor: pointer; 
  overflow: hidden;
  transition: all 0.2s ease;
}

.biomesight-file-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(14, 165, 233, 0.4);
}

.biomesight-file-btn input[type=file]{ 
  position: absolute !important; 
  inset: 0 !important; 
  left: auto !important; 
  width: 100% !important; 
  height: 100% !important; 
  opacity: 0 !important; 
  pointer-events: auto !important; 
  cursor: pointer !important; 
}

/* Badges & Chips */
.chip { 
  display: inline-flex; 
  align-items: center; 
  gap: 0.4rem; 
  background: #e0f2fe; 
  color: #0c4a6e; 
  padding: 0.4rem 0.75rem; 
  border-radius: 6px; 
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid #bae6fd;
}

/* Status Messages */
.biomesight-muted { 
  color: #64748b;
  font-size: 0.9rem;
}

.status-success {
  color: #059669;
  font-weight: 500;
}

.status-error {
  color: #dc2626;
  font-weight: 500;
}

/* Summary Cards */
.summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.summary-card {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.25rem;
  text-align: center;
}

.summary-card-value {
  font-size: 2rem;
  font-weight: 700;
  color: #0ea5e9;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.summary-card-label {
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
}

/* Table Section */
.table-section {
  margin-bottom: 2.5rem;
}

.table-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e2e8f0;
}

.table-header h3 { 
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
}

.table-badge {
  background: #0ea5e9;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
}

/* Tables */
.biomesight-table { 
  width: 100%; 
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.biomesight-table th, 
.biomesight-table td { 
  padding: 0.875rem 1rem; 
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
}

.biomesight-table thead th { 
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  color: white;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: sticky;
  top: 0;
  z-index: 10;
}

.biomesight-table tbody tr {
  transition: background-color 0.15s ease;
}

.biomesight-table tbody tr:nth-child(even) { 
  background: #f8fafc;
}

.biomesight-table tbody tr:hover {
  background: #e0f2fe;
}

.biomesight-table tbody tr:last-child td {
  border-bottom: none;
}

/* Totals Row */
.biomesight-table .totals-row {
  background: #f1f5f9 !important;
  font-weight: 700;
  border-top: 2px solid #cbd5e1;
}

.biomesight-table .totals-row:hover {
  background: #e2e8f0 !important;
}

/* Utility Classes */
.hide { 
  display: none !important; 
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .csv-comparator-card {
    padding: 1.25rem;
    border-radius: 8px;
  }

  .csv-upload-area {
    padding: 1.5rem;
  }

  .biomesight-controls {
    flex-direction: column;
    width: 100%;
  }

  .biomesight-btn,
  .biomesight-file-btn {
    width: 100%;
    justify-content: center;
  }

  .summary-cards {
    grid-template-columns: 1fr;
  }

  .biomesight-table {
    font-size: 0.875rem;
  }

  .biomesight-table th,
  .biomesight-table td {
    padding: 0.625rem 0.75rem;
  }

  .table-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .biomesight-wrap {
    font-size: 0.9rem;
  }

  .summary-card-value {
    font-size: 1.5rem;
  }
}
