/* Partial JSON Parser: input, status, the list of repairs, and the tree and repaired JSON side by side. */

.pj { display: flex; flex-direction: column; gap: 22px; min-width: 0; }

/* The shared .input is a one-line box; pasted JSON needs height and a smaller font. */
.pj-textarea {
  height: auto;
  min-height: 240px;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre;
  overflow: auto;
  resize: vertical;
}

.pj-status {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 14px 16px;
  background: var(--surface-2);
  border: var(--border);
  border-radius: 12px;
}
.pj-status p { margin: 0; }
.pj-status-title { font: 700 18px var(--font-display); overflow-wrap: anywhere; }
.pj-status-detail { font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
.pj-status.is-repaired { background: var(--cat-json); }
.pj-status.is-complete { background: #D3F9D8; }
.pj-status.is-invalid { background: #FFE3E3; }
.pj-status.is-invalid .pj-status-title { font: 15px var(--font-body); }

.pj-snippet {
  max-width: 100%;
  margin: 0;
  padding: 10px 12px;
  overflow-x: auto;
  font: 13px/1.5 var(--font-mono);
  background: var(--surface);
  border: 1.5px solid var(--ink);
  border-radius: 8px;
}

.pj-report { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.pj-group { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pj-group-title { margin: 0; font-size: 14px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.pj-list { display: flex; flex-direction: column; gap: 6px; margin: 0; padding-left: 22px; font-size: 14px; }
.pj-list li { overflow-wrap: anywhere; }
.pj-closer {
  display: inline-block;
  min-width: 1.8em;
  padding: 0 4px;
  font: 700 14px var(--font-mono);
  text-align: center;
  background: var(--accent);
  border: 1.5px solid var(--ink);
  border-radius: 5px;
}

.pj-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.pj-panel { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pj-panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; }
.pj-placeholder { margin: 0; padding: 16px; color: var(--ink-3); background: var(--surface-2); border: 2px dashed var(--line-soft); border-radius: 12px; }

.pj-pre {
  max-height: 560px;
  margin: 0;
  padding: 14px 16px;
  overflow: auto;
  font: 14px/1.55 var(--font-mono);
  background: var(--surface-2);
  border: var(--border);
  border-radius: 12px;
}

/* Drawn by CSS so the label is not part of the text that "Copy JSON" copies. */
.pj-cut::after {
  content: "◀ input ended here";
  margin-left: 8px;
  padding: 1px 6px;
  font: 700 11px var(--font-body);
  white-space: nowrap;
  background: var(--accent);
  border: 1.5px solid var(--ink);
  border-radius: 5px;
}

@media (max-width: 900px) {
  .pj-results { grid-template-columns: 1fr; }
}
