/* src/tools/csv-json-converter/tool.css */
.csv-json-root {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  font-family: inherit;
}

.csv-json-tabs {
  display: flex;
  border-bottom: 1px solid #2a2d3a;
  gap: 0.5rem;
}

.mode-tab-btn {
  padding: 0.625rem 1.25rem;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: #9ca3af;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mode-tab-btn:hover {
  color: #f0f2f8;
}

.mode-tab-btn.active {
  color: #4f8ef7;
  border-bottom-color: #4f8ef7;
}

.options-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: #13161f;
  border: 1px solid #2a2d3a;
  border-radius: 0.5rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.8125rem;
}

.options-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.opt-select {
  background: #0f1117;
  border: 1px solid #2a2d3a;
  border-radius: 0.375rem;
  color: #f0f2f8;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  outline: none;
}

.opt-select:focus {
  border-color: #4f8ef7;
}

.opt-check-label {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  cursor: pointer;
  color: #d1d5db;
  font-size: 0.75rem;
  user-select: none;
}

.io-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .io-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.io-panel {
  display: flex;
  flex-direction: column;
  background: #13161f;
  border: 1px solid #2a2d3a;
  border-radius: 0.75rem;
  overflow: hidden;
}

.io-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: #1a1d27;
  border-bottom: 1px solid #2a2d3a;
  font-size: 0.8125rem;
  font-weight: 600;
}

.io-textarea {
  width: 100%;
  min-height: 240px;
  background: #0f1117;
  border: none;
  padding: 0.75rem;
  color: #f0f2f8;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8125rem;
  line-height: 1.5;
  resize: vertical;
  outline: none;
}

.table-preview-wrapper {
  background: #13161f;
  border: 1px solid #2a2d3a;
  border-radius: 0.75rem;
  overflow: hidden;
}

.table-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: #1a1d27;
  border-bottom: 1px solid #2a2d3a;
  font-size: 0.8125rem;
  font-weight: 600;
}

.table-scroll {
  max-height: 250px;
  overflow: auto;
}

.preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
  text-align: left;
}

.preview-table th {
  background: #0f1117;
  color: #9ca3af;
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #2a2d3a;
  position: sticky;
  top: 0;
  white-space: nowrap;
}

.preview-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #1f2330;
  color: #e5e7eb;
  white-space: nowrap;
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-table tr:hover td {
  background: rgba(79, 142, 247, 0.05);
}
