/* Only what the JSON comparison needs on top of tool_page.css: the two
   editors, the option bar, the difference tree and the patch panel. */
.jc {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1180px;
  margin: 0 auto;
}

.jc [hidden] {
  display: none !important;
}

.jc-panel {
  padding: 20px;
  border-radius: 24px;
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 2, 18, 0.6);
}

.jc-panes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.jc-pane {
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s ease;
}

.jc-pane.is-dropping {
  border-color: #6e00ff;
}

.jc-pane.is-invalid {
  border-color: rgba(255, 107, 129, 0.6);
}

.jc-pane-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.jc-pane-title {
  margin: 0;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}

.jc-pane-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
}

.jc-file {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.7);
}

.jc-file:hover {
  color: #fff;
}

.jc-file input {
  display: none;
}

.jc-linkish {
  background: none;
  border: 0;
  padding: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  cursor: pointer;
}

.jc-linkish:hover {
  color: #fff;
}

.jc-input {
  width: 100%;
  min-height: 220px;
  padding: 14px;
  border-radius: 16px;
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: rgba(255, 255, 255, 0.92);
  font-family: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
  tab-size: 2;
}

.jc-input:focus {
  outline: none;
  border-color: #6e00ff;
}

.jc-parse {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.jc-parse-error {
  color: #ff8ba0;
}

.jc-parse-warning {
  color: #ffce6b;
}

.jc-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 20px;
}

.jc-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.jc-field-label {
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.jc-segment {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.3);
}

.jc-segment-item {
  padding: 7px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  cursor: pointer;
}

.jc-segment-item.is-active {
  background: #6e00ff;
  color: #fff;
}

.jc-key-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.jc-key-input {
  width: 180px;
  padding: 9px 12px;
  border-radius: 12px;
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 13px;
}

.jc-key-input:focus {
  outline: none;
  border-color: #6e00ff;
}

.jc-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  flex: 1 1 320px;
}

.jc-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  cursor: pointer;
}

.jc-check input {
  width: 16px;
  height: 16px;
  accent-color: #6e00ff;
}

.jc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.jc-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.jc-metric {
  padding: 14px;
  border-radius: 18px;
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 2, 18, 0.6);
  text-align: center;
}

.jc-metric-value {
  display: block;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.jc-metric-label {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
}

.jc-metric--added .jc-metric-value {
  color: #6ee7a8;
}

.jc-metric--removed .jc-metric-value {
  color: #ff8ba0;
}

.jc-metric--changed .jc-metric-value {
  color: #ffce6b;
}

.jc-metric--type .jc-metric-value {
  color: #8ab4ff;
}

.jc-result-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.jc-panel-title {
  margin: 0;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}

.jc-status {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  min-height: 18px;
}

.jc-status--ok {
  color: #6ee7a8;
}

.jc-status--warn {
  color: #ffce6b;
}

.jc-status--error {
  color: #ff8ba0;
}

.jc-notes {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.jc-note {
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  padding-inline-start: 18px;
  position: relative;
}

.jc-note::before {
  content: "•";
  position: absolute;
  inset-inline-start: 4px;
  color: #6e00ff;
}

.jc-tree {
  max-height: 620px;
  overflow: auto;
  border-radius: 16px;
  border: 0.5px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.3);
  font-family: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  font-size: 13px;
}

.jc-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  padding: 3px 10px 3px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  line-height: 1.6;
}

.jc-row--added {
  background: rgba(52, 199, 123, 0.12);
}

.jc-row--removed {
  background: rgba(255, 107, 129, 0.12);
}

.jc-row--changed {
  background: rgba(255, 193, 76, 0.12);
}

.jc-row--type {
  background: rgba(110, 150, 255, 0.14);
}

.jc-row--moved {
  background: rgba(160, 110, 255, 0.12);
}

.jc-row--quiet {
  color: rgba(255, 255, 255, 0.35);
  padding-inline-start: 24px;
}

.jc-toggle {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border: 0;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.jc-toggle--empty {
  background: transparent;
  cursor: default;
}

.jc-key {
  color: #c9a7ff;
}

.jc-index {
  color: rgba(255, 255, 255, 0.45);
}

.jc-punct {
  color: rgba(255, 255, 255, 0.35);
}

.jc-arrow {
  color: rgba(255, 255, 255, 0.45);
}

.jc-value {
  color: rgba(255, 255, 255, 0.85);
  word-break: break-word;
}

.jc-value--string {
  color: #8ee6b4;
}

.jc-value--number {
  color: #ffce6b;
}

.jc-value--boolean,
.jc-value--null {
  color: #8ab4ff;
}

.jc-value--left {
  text-decoration: line-through;
  text-decoration-color: rgba(255, 139, 160, 0.7);
  opacity: 0.75;
}

.jc-badge {
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.75);
  white-space: nowrap;
}

.jc-badge--added {
  background: rgba(52, 199, 123, 0.22);
  color: #9df0c2;
}

.jc-badge--removed {
  background: rgba(255, 107, 129, 0.22);
  color: #ffb3c0;
}

.jc-badge--changed {
  background: rgba(255, 193, 76, 0.22);
  color: #ffdf9e;
}

.jc-badge--type {
  background: rgba(110, 150, 255, 0.22);
  color: #b9cdff;
}

.jc-badge--moved {
  background: rgba(160, 110, 255, 0.22);
  color: #d7c1ff;
}

.jc-path {
  margin-inline-start: auto;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.4);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  text-align: end;
}

.jc-path:hover {
  color: #fff;
}

.jc-patch-out {
  margin: 0;
  max-height: 340px;
  overflow: auto;
  padding: 14px;
  border-radius: 16px;
  border: 0.5px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.35);
  color: rgba(255, 255, 255, 0.85);
  font-family: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre;
}

.jc-verdict {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

.jc-verdict--ok {
  color: #6ee7a8;
}

.jc-verdict--warn {
  color: #ffce6b;
}

.jc-verdict--quiet {
  color: rgba(255, 255, 255, 0.45);
}

.jc-copy-status {
  margin: 8px 0 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  min-height: 18px;
}

.jc-copy-status--error {
  color: #ff8ba0;
}

.jc-hint {
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
}

@media (max-width: 991px) {
  .jc-panes {
    grid-template-columns: minmax(0, 1fr);
  }

  .jc-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 575px) {
  .jc-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .jc-path {
    margin-inline-start: 0;
    width: 100%;
    text-align: start;
  }
}
