.json-tools-panel {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    min-height: 0;
    gap: 0.75rem;
}

.json-tools-panel > .json-panel {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-height: 0;
}

.json-tools-output-panel {
    flex: 1 1 0;
    min-height: 0;
    overflow: auto;
    padding: 0.875rem 1rem;
    border-top: 1px solid var(--border);
    background: var(--surface);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    line-height: 1.6;
}

.json-tools-output-panel--tree {
    padding: 0.75rem;
}

.json-tools-result {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--text-code);
}

.json-tools-result.is-error {
    color: var(--red-700);
}

.json-tools-result.is-success {
    color: var(--emerald-700);
}

.json-tools-hint {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.json-merge-inputs {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 0;
    overflow: auto;
}

.json-merge-inputs .json-panel {
    flex: 1 1 12rem;
    min-height: 10rem;
}

.json-tree-root,
.json-tree-children {
    margin: 0;
    padding-left: 1rem;
    list-style: none;
}

.json-tree-root {
    padding-left: 0;
}

.json-tree-row {
    display: flex;
    align-items: baseline;
    gap: 0.375rem;
    min-height: 1.6em;
}

.json-tree-toggle {
    flex-shrink: 0;
    width: 1rem;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.625rem;
    line-height: 1.6;
    cursor: pointer;
}

.json-tree-toggle.is-leaf {
    cursor: default;
    font-size: 0.5rem;
}

.json-tree-label {
    color: var(--primary);
    font-weight: 500;
}

.json-tree-value {
    color: var(--text-muted);
}

.json-tree-children.is-collapsed {
    display: none;
}

.json-search-results {
    margin: 0;
    padding: 0;
    list-style: none;
}

.json-search-result {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.json-search-result:last-child {
    border-bottom: none;
}

.json-search-path {
    font-weight: 600;
    color: var(--primary);
}

.json-search-meta {
    margin-top: 0.125rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.json-search-preview {
    margin: 0.5rem 0 0;
    padding: 0.625rem 0.75rem;
    border-radius: 0.375rem;
    background: var(--surface-muted);
    white-space: pre-wrap;
    word-break: break-word;
}

.json-split-part + .json-split-part {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.json-split-part-title {
    margin: 0 0 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.json-split-part-body {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--text-code);
}

.json-lint-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}



.compare-summary {
    margin: 0 0 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
}

.compare-summary.is-equal {
    background: var(--emerald-50);
    color: var(--emerald-700);
}

.compare-summary.is-diff {
    background: var(--red-50);
    color: var(--red-700);
}

.compare-summary--compact {
    width: 100%;
    margin: 0.25rem 0 0;
    padding: 0.5rem 0.625rem;
    font-size: 0.75rem;
    line-height: 1.45;
    text-align: center;
}

.compare-output-panel {
    display: flex;
    flex-direction: column;
    margin-top: 1rem;
    min-height: 12rem;
    flex: 1 1 12rem;
}

.compare-output-panel .compare-output,
.compare-output-panel .code-editor {
    flex: 1 1 0;
    min-height: 10rem;
}

.json-panel--stacked-output {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.json-panel--stacked-output .json-tools-output-panel {
    flex: 1 1 0;
}
