/* tools/csv-json/css/style.css */

/* Action bar */
#action-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 14px; background: #1e1e2e; border-bottom: 2px solid #45475a;
}
#action-buttons { display: flex; gap: 6px; }
#action-buttons button {
  background: #313244; color: #cdd6f4; border: 1px solid #45475a;
  border-radius: 4px; padding: 6px 14px; font-size: 13px; cursor: pointer;
}
#action-buttons button:hover { background: #45475a; }
#btn-csv-to-json { background: #89b4fa; color: #1e1e2e; border-color: #89b4fa; font-weight: 600; }
#btn-csv-to-json:hover { background: #74c7ec; border-color: #74c7ec; }
#btn-json-to-csv { background: #a6e3a1; color: #1e1e2e; border-color: #a6e3a1; font-weight: 600; }
#btn-json-to-csv:hover { background: #94d4a0; border-color: #94d4a0; }
#btn-csv-to-json.inactive, #btn-json-to-csv.inactive {
  background: #313244; color: #cdd6f4; border-color: #45475a; font-weight: normal;
}
#status-badge { font-size: 13px; padding: 4px 12px; border-radius: 4px; }
#status-badge.valid { color: #a6e3a1; }
#status-badge.invalid { color: #f38ba8; }
#status-badge.empty { color: #6c7086; }

/* Options bar */
#options-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 6px 14px; background: #181825; border-bottom: 1px solid #313244;
  font-size: 13px; color: #a6adc8;
}
#options-bar label { color: #a6adc8; }
#delimiter-select {
  background: #313244; color: #cdd6f4; border: 1px solid #45475a;
  border-radius: 4px; padding: 3px 8px; font-size: 13px; cursor: pointer;
}
#delimiter-select:focus { outline: none; border-color: #89b4fa; }
.checkbox-label {
  display: flex; align-items: center; gap: 6px; cursor: pointer;
}
.checkbox-label input[type="checkbox"] { accent-color: #89b4fa; cursor: pointer; }

/* Main area */
#main { display: flex; flex: 1; min-height: 0; }

/* Input pane */
#input-pane { flex: 1; display: flex; flex-direction: column; border-right: 2px solid #45475a; min-width: 0; }
.pane-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 12px; background: #181825; font-size: 12px; color: #6c7086;
  border-bottom: 1px solid #313244;
}
#csv-input {
  flex: 1; background: #1e1e2e; color: #cdd6f4; border: none; outline: none;
  padding: 12px; font-family: 'Fira Code', monospace; font-size: 13px;
  line-height: 1.6; resize: none; white-space: pre; overflow: auto;
}

/* Output pane */
#output-pane { flex: 1; display: flex; flex-direction: column; min-width: 0; }
#output-tabs { display: flex; gap: 4px; }
.output-tab {
  background: #313244; color: #6c7086; border: 1px solid #45475a;
  border-radius: 4px; padding: 2px 10px; font-size: 11px; cursor: pointer;
}
.output-tab:hover { background: #45475a; }
.output-tab.active { background: #89b4fa; color: #1e1e2e; border-color: #89b4fa; font-weight: 600; }

#output-content { flex: 1; overflow: auto; background: #1e1e2e; }
#result-output {
  margin: 0; padding: 12px; font-family: 'Fira Code', monospace; font-size: 13px;
  line-height: 1.6; color: #cdd6f4; white-space: pre; overflow: auto;
}

/* Syntax colors — JSON output */
.json-key { color: #89b4fa; }
.json-string { color: #a6e3a1; }
.json-number { color: #f9e2af; }
.json-boolean { color: #cba6f7; }
.json-null { color: #6c7086; }
.json-bracket { color: #cdd6f4; }
.json-error { color: #f38ba8; font-family: sans-serif; font-style: italic; }

/* Table preview */
#table-output {
  padding: 12px; overflow: auto;
}
.csv-table {
  border-collapse: collapse; width: 100%;
  font-family: 'Fira Code', monospace; font-size: 13px;
}
.csv-table th {
  background: #313244; color: #89b4fa; font-weight: 700;
  padding: 6px 12px; border: 1px solid #45475a; text-align: left;
}
.csv-table td {
  padding: 5px 12px; border: 1px solid #313244; color: #cdd6f4;
}
.csv-table tbody tr:nth-child(odd) { background: #1e1e2e; }
.csv-table tbody tr:nth-child(even) { background: #181825; }
.csv-table tbody tr:hover { background: #2a2a3d; }

/* Empty / error states in table */
.table-message {
  color: #6c7086; font-size: 14px; font-style: italic; padding: 20px;
  font-family: sans-serif;
}
.table-error { color: #f38ba8; }

/* Hidden utility */
.hidden { display: none !important; }
