/* JSONFormat — tool-specific styles.
   Shared styles (nav, panels, buttons) live in ../../css/style.css */

.jf { display: flex; flex-direction: column; gap: 12px; }

/* ---------- Toolbar ---------- */
.jf-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.jf-bar-group { display: flex; align-items: center; gap: 6px; }
.jf-bar-right { margin-left: auto; }
.jf-go { padding: 8px 20px; font-size: .88rem; }

.jf-indent {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #74747e;
  font-size: .78rem;
}
.jf-indent select {
  background: #1c1c20;
  border: 1px solid #26262b;
  border-radius: 8px;
  color: #c4c4cc;
  font: inherit;
  font-size: .78rem;
  padding: 6px 9px;
  cursor: pointer;
  outline: none;
}
.jf-indent select:focus { border-color: var(--pink); }

/* ---------- Panes ---------- */
.jf-panes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
}
.jf-pane { display: flex; flex-direction: column; min-width: 0; }

#jf-in, .jf-out {
  width: 100%;
  min-height: 420px;
  max-height: 60vh;
  display: block;
  background: transparent;
  border: none;
  padding: 14px 16px;
  color: var(--text);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: .85rem;
  line-height: 1.6;
  outline: none;
  overflow: auto;
  tab-size: 2;
}
#jf-in { resize: vertical; }
#jf-in::placeholder { color: #4a4a52; }

.jf-out {
  white-space: pre;
  margin: 0;
  color: #d4d4d8;
}
.jf-out:empty::after {
  content: "The formatted JSON shows up here.";
  color: #4a4a52;
  font-family: "Inter", system-ui, sans-serif;
  font-size: .85rem;
}

/* Token colours */
.jf-key  { color: var(--pink); }
.jf-str  { color: #9ae6b4; }
.jf-num  { color: #f6b6cd; }
.jf-bool { color: #93c5fd; }

/* ---------- Status + error ---------- */
.jf-status {
  margin-left: auto;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.jf-status.is-good { color: #22c55e; }
.jf-status.is-bad { color: #ef4444; }

.jf-error {
  color: #fca5a5;
  background: rgba(239, 68, 68, .1);
  border: 1px solid rgba(239, 68, 68, .3);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: .85rem;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.jf-error[hidden] { display: none; }

@media (max-width: 880px) {
  .jf-panes { grid-template-columns: 1fr; }
  #jf-in, .jf-out { min-height: 220px; }
  .jf-bar-right { margin-left: 0; }
}
