/* CSV Viewer specific styles */

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 48px 24px;
  border: 2px dashed var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 24px;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--color-accent);
  background: var(--color-accent-light);
}

.dropzone svg {
  color: var(--color-text-secondary);
}

.dropzone p {
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
}

.csv-options {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.option-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.option-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
}

.delimiter-select {
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  background: var(--color-surface);
  color: var(--color-text);
}

.delimiter-select:focus {
  outline: none;
  border-color: var(--color-accent);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.875rem;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--color-accent);
}

.btn-export {
  margin-left: auto;
  padding: 8px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-export:hover {
  background: var(--color-bg);
  border-color: var(--color-accent);
}

.table-container {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.table-info {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}

.table-wrapper {
  overflow-x: auto;
  max-height: 600px;
  overflow-y: auto;
}

.csv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.csv-table th,
.csv-table td {
  padding: 10px 16px;
  border: 1px solid var(--color-border);
  text-align: left;
  white-space: nowrap;
}

.csv-table th {
  background: var(--color-bg);
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 10;
}

.csv-table th.sortable {
  cursor: pointer;
  user-select: none;
}

.csv-table th.sortable:hover {
  background: #e5e7eb;
}

.csv-table th .sort-icon {
  margin-left: 4px;
  opacity: 0.5;
}

.csv-table th.sorted-asc .sort-icon,
.csv-table th.sorted-desc .sort-icon {
  opacity: 1;
}

.csv-table tbody tr:hover {
  background: var(--color-accent-light);
}

.csv-table td {
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-number {
  color: var(--color-text-secondary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-align: center;
  background: var(--color-bg);
  min-width: 40px;
}
