/* ============================================================
   JSON Validator — style.css
   ============================================================ */
:root {
  --orange:   #ea580c;
  --orange-d: #c2410c;
  --orange-l: #fff7ed;
  --orange-b: #fed7aa;
  --green:    #16a34a;
  --red:      #dc2626;
  --blue:     #2563eb;
  --gray-50:  #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-900: #0f172a;
  --radius:   14px;
}

/* ── Hero ──────────────────────────────────────────────────── */
.tool-hero {
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 50%, #7c2d12 100%);
  padding: 64px 0 56px;
  color: #fff;
}
.tool-hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.03em;
  margin-bottom: 14px;
}
.tool-hero p {
  font-size: 1.05rem;
  color: rgba(255,255,255,.82);
  max-width: 520px;
  line-height: 1.65;
  margin-bottom: 0;
}
.badge-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 100px;
  padding: 5px 14px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .04em;
  margin-bottom: 18px;
  color: #fff;
}

/* ── Main card ─────────────────────────────────────────────── */
.validator-wrap { padding: 0 0 60px; }
.main-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 4px 24px rgba(0,0,0,.08);
  margin-top: -36px;
  position: relative;
  z-index: 10;
  overflow: hidden;
}

/* ── Toolbar ───────────────────────────────────────────────── */
.tool-bar {
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.tool-bar-label {
  font-size: .72rem;
  font-weight: 700;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-right: 4px;
}
.tb-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 7px;
  padding: 6px 13px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--gray-700);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all .15s;
}
.tb-btn:hover            { border-color: var(--orange); color: var(--orange); }
.tb-btn.primary          { background: linear-gradient(135deg,#ea580c,#c2410c); color: #fff; border-color: transparent; }
.tb-btn.primary:hover    { opacity: .9; transform: translateY(-1px); }
.tb-btn:disabled         { opacity: .5; cursor: not-allowed; transform: none !important; }
.tb-btn-danger           { color: var(--red) !important; }
.tb-btn-danger:hover     { border-color: var(--red) !important; }

/* ── Two-pane editor ───────────────────────────────────────── */
.editor-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 767px) { .editor-cols { grid-template-columns: 1fr; } }

.pane-header {
  background: var(--gray-900);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.pane-title {
  font-size: .78rem;
  font-weight: 700;
  color: #94a3b8;
  font-family: monospace;
  display: flex;
  align-items: center;
  gap: 7px;
}
.pane-title-dots { display: flex; gap: 5px; }
.pane-title-dots span { width: 10px; height: 10px; border-radius: 50%; }

.json-textarea {
  flex: 1;
  width: 100%;
  min-height: 340px;
  resize: none;
  background: #0f172a;
  border: none;
  outline: none;
  padding: 20px;
  font-family: 'Courier New', monospace;
  font-size: .83rem;
  line-height: 1.7;
  color: #e2e8f0;
  box-sizing: border-box;
  border-right: 1px solid #1e293b;
  display: block;
}
.json-textarea::placeholder { color: #334155; }

.output-pane {
  flex: 1;
  background: #0f172a;
  min-height: 340px;
  padding: 20px;
  font-family: 'Courier New', monospace;
  font-size: .83rem;
  line-height: 1.7;
  color: #e2e8f0;
  overflow: auto;
  white-space: pre;
  word-break: break-all;
}
.output-pane .ph { color: #334155; font-style: italic; }

/* ── JSON syntax colours ───────────────────────────────────── */
.j-key    { color: #93c5fd; }
.j-str    { color: #86efac; }
.j-num    { color: #fbbf24; }
.j-bool   { color: #f87171; }
.j-null   { color: #94a3b8; }
.j-punc   { color: #e2e8f0; }

/* ── Status bar ────────────────────────────────────────────── */
.status-bar {
  background: var(--gray-900);
  border-top: 1px solid #1e293b;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: .78rem;
}
.status-valid   { color: #4ade80; font-weight: 700; display: flex; align-items: center; gap: 5px; }
.status-invalid { color: #f87171; font-weight: 700; display: flex; align-items: center; gap: 5px; }
.status-neutral { color: #64748b; }
.status-pill {
  background: rgba(255,255,255,.06);
  border-radius: 5px;
  padding: 2px 8px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── Copy btn in pane header ───────────────────────────────── */
.pane-copy-btn {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: .75rem;
  font-weight: 600;
  color: #94a3b8;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all .15s;
  display: flex;
  align-items: center;
  gap: 5px;
}
.pane-copy-btn:hover { background: rgba(255,255,255,.14); color: #e2e8f0; }

/* ── Stats grid ────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  padding: 24px 0;
}
@media (max-width: 767px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
.stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  text-align: center;
}
.stat-number {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--orange);
  line-height: 1.1;
}
.stat-label {
  font-size: .75rem;
  font-weight: 600;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-top: 4px;
}

/* ── Error panel ───────────────────────────────────────────── */
.error-panel {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 16px 20px;
  margin: 16px 20px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.error-panel i   { color: #dc2626; font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.error-title     { font-weight: 700; font-size: .9rem; color: #7f1d1d; margin-bottom: 4px; }
.error-detail    { font-size: .85rem; color: #991b1b; font-family: monospace; }

/* ── Alert ─────────────────────────────────────────────────── */
.alert-tool { border-radius: 10px; border: none; font-weight: 500; padding: 14px 18px; }

/* ── Info section ──────────────────────────────────────────── */
.info-section { background: var(--gray-50); padding: 64px 0; }
.info-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  height: 100%;
}
.info-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 14px;
}
.info-card h6 { font-weight: 700; margin-bottom: 8px; }
.info-card p  { font-size: .875rem; color: var(--gray-600); margin: 0; line-height: 1.6; }

html, body { overflow-x: hidden; }

@media (max-width: 575px) {
  .tool-hero h1 { font-size: 1.9rem; }
  .json-textarea { min-height: 220px; }
  .output-pane   { min-height: 220px; }
}
