/* ============================================================
   NOVAUTILS — tools/json-formatter/json-formatter.css
   ============================================================ */

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

/* ── Toolbar ── */
.jf-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 20px;
}
.jf-toolbar-left  { display: flex; gap: 8px; flex-wrap: wrap; }
.jf-toolbar-right { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

.jf-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius-sm); border: none; cursor: pointer;
  font-family: var(--font-head); font-size: 0.82rem; font-weight: 700;
  transition: opacity 0.2s, transform 0.2s;
}
.jf-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.jf-btn:active { transform: translateY(0); }

.jf-btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--purple));
  color: #fff;
  box-shadow: 0 2px 12px rgba(79,140,255,0.25);
}
.jf-btn-ghost {
  background: var(--surface2);
  border: 1px solid var(--border) !important;
  color: var(--text-dim);
}
.jf-btn-ghost:hover { color: var(--text); border-color: var(--border2) !important; }

/* Status */
.jf-status {
  display: flex; align-items: center; gap: 7px;
  font-size: 0.78rem; font-weight: 600; color: var(--text-dim);
}
.jf-status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--text-dimmer);
  flex-shrink: 0;
}
.jf-status-dot.valid   { background: var(--green); box-shadow: 0 0 6px var(--green); }
.jf-status-dot.invalid { background: var(--red);   box-shadow: 0 0 6px var(--red); }
.jf-status-dot.empty   { background: var(--text-dimmer); }

/* Indent select */
.jf-indent-wrap { display: flex; align-items: center; gap: 8px; }
.jf-indent-label { font-size: 0.72rem; font-weight: 700; color: var(--text-dimmer); text-transform: uppercase; letter-spacing: 0.06em; }
.jf-select {
  background: var(--bg3); border: 1px solid var(--border2);
  color: var(--text-dim); font-family: var(--font-mono);
  font-size: 0.78rem; padding: 6px 10px;
  border-radius: var(--radius-sm); cursor: pointer; outline: none;
}

/* ── Editor area ── */
.jf-editors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  min-height: 460px;
}
.jf-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.jf-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg3);
}
.jf-panel-title { font-size: 0.72rem; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.08em; }
.jf-panel-actions { display: flex; align-items: center; gap: 10px; }
.jf-line-count { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-dimmer); }

.jf-icon-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 5px; color: var(--text-dim);
  font-family: var(--font-head); font-size: 0.72rem; font-weight: 600;
  cursor: pointer; transition: color 0.2s, border-color 0.2s;
}
.jf-icon-btn:hover { color: var(--text); border-color: var(--border2); }
.jf-icon-btn.copied { color: var(--green); border-color: rgba(54,211,153,0.4); }

/* Textarea input */
.jf-editor {
  flex: 1; resize: none; width: 100%;
  background: var(--bg);
  border: none; outline: none;
  color: var(--text);
  font-family: var(--font-mono); font-size: 0.82rem;
  line-height: 1.7; padding: 16px;
  tab-size: 2;
}
.jf-editor::placeholder { color: var(--text-dimmer); }

/* Output — syntax highlighted */
.jf-output {
  flex: 1; overflow: auto; padding: 16px;
  font-family: var(--font-mono); font-size: 0.82rem;
  line-height: 1.7; white-space: pre;
  background: var(--bg);
  scrollbar-width: thin; scrollbar-color: var(--surface2) transparent;
}
.jf-output::-webkit-scrollbar { width: 6px; height: 6px; }
.jf-output::-webkit-scrollbar-thumb { background: var(--surface2); border-radius: 3px; }

/* Syntax colors */
.jf-key     { color: #7dd3fc; }   /* light blue */
.jf-string  { color: #86efac; }   /* light green */
.jf-number  { color: #fbbf24; }   /* yellow */
.jf-bool    { color: #a78bfa; }   /* purple */
.jf-null    { color: #f87171; }   /* red */
.jf-punct   { color: #94a3b8; }   /* gray */

/* Error display */
.jf-error {
  color: var(--red);
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.7;
  white-space: pre-wrap;
}
.jf-error-icon { font-size: 1.2rem; margin-bottom: 8px; display: block; }

/* ── Stats bar ── */
.jf-stats {
  display: flex; align-items: center; gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 20px;
  flex-wrap: wrap; gap: 0;
}
.jf-stat { display: flex; flex-direction: column; gap: 3px; padding: 0 16px; }
.jf-stat:first-child { padding-left: 0; }
.jf-stat-label { font-size: 0.62rem; font-weight: 700; color: var(--text-dimmer); text-transform: uppercase; letter-spacing: 0.08em; }
.jf-stat-val { font-family: var(--font-mono); font-size: 0.88rem; font-weight: 500; color: var(--text); }
.jf-stat-val.green { color: var(--green); }
.jf-stat-sep { width: 1px; height: 32px; background: var(--border); align-self: center; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .jf-editors { grid-template-columns: 1fr; min-height: auto; }
  .jf-editor, .jf-output { min-height: 220px; }
  .jf-toolbar { flex-direction: column; align-items: flex-start; }
  .jf-stats { gap: 8px; }
  .jf-stat-sep { display: none; }
}
