/* tools/json-formatter/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-format { background: #89b4fa; color: #1e1e2e; border-color: #89b4fa; font-weight: 600; }
#btn-format:hover { background: #74c7ec; }
#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; }

/* 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;
}
#json-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; }
#formatted-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 in formatted 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; }

/* Tree view */
#tree-output { padding: 12px; }
.tree-node { margin-left: 20px; }
.tree-root { margin-left: 0; }
.tree-row {
  display: flex; align-items: center; gap: 4px; padding: 2px 0;
  font-size: 13px; cursor: default;
}
.tree-arrow {
  width: 16px; text-align: center; color: #6c7086; cursor: pointer;
  font-size: 10px; user-select: none; flex-shrink: 0;
}
.tree-arrow:hover { color: #cdd6f4; }
.tree-key { color: #89b4fa; font-family: monospace; }
.tree-colon { color: #6c7086; margin: 0 4px; }
.tree-value { font-family: monospace; }
.tree-value.string { color: #a6e3a1; }
.tree-value.number { color: #f9e2af; }
.tree-value.boolean { color: #cba6f7; }
.tree-value.null { color: #6c7086; font-style: italic; }
.tree-badge {
  color: #6c7086; font-size: 11px; margin-left: 4px;
}
.tree-children { display: block; }
.tree-children.collapsed { display: none; }
.tree-path-toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: #313244; color: #a6e3a1; padding: 8px 16px; border-radius: 6px;
  font-size: 13px; font-family: monospace; z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4); pointer-events: none;
}
