/* assets/css/json-formatter.css */

.tool-container {
  min-width: 115rem;
  margin: 0 auto;
  padding: 20px;
}

.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  height: calc(100vh - 180px);
  min-height: 600px;
}

.panel {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-header {
  padding: 12px 16px;
  background: var(--sidebar-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
}

.json-text {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--text-area-bg);
  color: var(--text);
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.9rem;
  resize: vertical;
  line-height: 1.5;
}

.panel-actions {
  display: flex;
  gap: 8px;
}

textarea {
  flex: 1;
  padding: 16px;
  font-family: 'Consolas', monospace;
  font-size: 15px;
  line-height: 1.5;
  background: var(--text-area-bg);
  border: 1px solid var(--border);
  color: var(--text);
  resize: none;
}

.tree-container {
  flex: 1;
  overflow: auto;
  padding: 16px;
  font-family: 'Consolas', monospace;
  font-size: 14px;
  line-height: 1.6;
  background: var(--text-area-bg);
}

/* JSON Tree Styles */
.json-tree details {
  margin-left: 20px;
}

.json-tree summary {
  cursor: pointer;
  user-select: none;
  padding: 2px 4px;
  border-radius: 4px;
}

.json-tree summary:hover {
  background: rgba(16, 185, 129, 0.1);
}

.json-key {
  color: #333333;
  font-weight: 500;
}

.json-string  { color: #1e40af; }
.json-number  { color: #166534; }
.json-boolean { color: #6b21a8; }
.json-null    { color: #44403c; }