/* ============================================================
   json-table-about.css
   Shared styles for demo.html and index.html
   ============================================================ */

/* ── demo.html styles ─────────────────────────────────────── */

:root {
  --color-primary:       #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-primary-active: #1e40af;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f3f4f6;
  color: #111827;
  min-height: 100vh;
}

/* ── Nav ── */
nav {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.nav-brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: #111827;
  text-decoration: none;
}
.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}
.nav-links a {
  font-size: 0.9rem;
  color: #6b7280;
  text-decoration: none;
}
.nav-links a:hover { color: #111827; }
.nav-links .btn {
  border: 1px solid #d1d5db;
  color: #374151;
  padding: 0.35rem 1rem;
  border-radius: 6px;
  font-weight: 500;
}
.nav-links .btn:hover { border-color: #9ca3af; color: #111827; }
.nav-links .btn-buy {
  background: var(--color-primary);
  color: #fff;
  padding: 0.35rem 1rem;
  border-radius: 6px;
  font-weight: 600;
}
.nav-links .btn-buy:hover { background: var(--color-primary-hover); color: #fff; }

/* ── Demo subnav ── */
.demo-subnav {
  background: #f8f9fa;
  border-bottom: 1px solid #e5e7eb;
  padding: 0 2rem;
  display: flex;
  gap: 0;
}
.demo-subnav a {
  display: block;
  padding: 0.6rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #6b7280;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}
.demo-subnav a:hover { color: #111827; }
.demo-subnav a.active {
  color: #111827;
  border-bottom-color: #111827;
}

/* ── Demo variant alert ── */
.demo-variant-alert {
  background: #e8f4fd;
  border-left: 4px solid #3b82f6;
  border-radius: 4px;
  padding: 10px 14px;
  font-size: 0.85rem;
  color: #1e40af;
  margin-bottom: 1.25rem;
}

/* ── Layout ── */
.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

/* ── Intro ── */
.intro {
  margin-bottom: 2rem;
}
.intro h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.intro p {
  color: #6b7280;
  font-size: 0.95rem;
  max-width: 600px;
}

/* ── Input card ── */
.card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.card-header label {
  font-weight: 600;
  font-size: 0.95rem;
}
.card-header .hint {
  font-size: 0.8rem;
  color: #9ca3af;
}

textarea {
  width: 100%;
  height: 220px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.6;
  color: #1f2937;
  background: #f9fafb;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s;
}
textarea:focus { border-color: var(--color-primary); background: #fff; }

.input-actions {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
#renderBtn {
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.6rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
#renderBtn:hover { background: var(--color-primary-hover); }
#renderBtn:active { background: var(--color-primary-active); }

#clearBtn {
  background: #fff;
  color: #6b7280;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 0.6rem 1.25rem;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
#clearBtn:hover { background: #f3f4f6; color: #111827; }

#inputError {
  font-size: 0.85rem;
  color: #dc2626;
}

/* ── Output card ── */
.output-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
}
.output-card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  font-weight: 600;
  font-size: 0.95rem;
  background: #f9fafb;
}
#tableContainer {
  padding: 1.5rem;
  overflow-x: auto;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #9ca3af;
}
.empty-state .empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}
.empty-state p {
  font-size: 0.9rem;
}

/* ── Row detail panel ── */
#rowDetailContent {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.6;
  color: #1f2937;
  background: #f9fafb;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  overflow-x: auto;
  margin: 0;
}

/* ── index.html styles ────────────────────────────────── */

/* ── Code box ── */
.code-box {
  background: #1e1e2e;
  color: #cdd6f4;
  padding: 20px 24px;
  border-radius: 8px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13.5px;
  line-height: 1.7;
}
.code-comment { color: #6c7086; }
.code-fn      { color: #89b4fa; }
.code-str     { color: #a6e3a1; }
.code-key     { color: #f38ba8; }
.code-tag     { color: #cba6f7; }

/* ── Hero ── */
.hero { padding: 72px 0 60px; }

/* ── Live table preview ── */
.preview-wrap {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.preview-wrap .preview-bar {
  background: #f1f3f5;
  border-bottom: 1px solid #dee2e6;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.preview-bar .dot { width: 10px; height: 10px; border-radius: 50%; background: #dee2e6; }
.preview-wrap table { width: 100%; font-size: 13px; border-collapse: collapse; }
.preview-wrap thead th {
  background: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
  padding: 8px 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.preview-wrap thead th .sort-arrow { color: #adb5bd; margin-left: 4px; font-size: 11px; }
.preview-wrap thead th.sorted .sort-arrow { color: #0d6efd; }
.preview-wrap tbody tr:nth-child(odd) { background: #f8f9fa; }
.preview-wrap tbody tr:hover { background: #e9ecef; }
.preview-wrap tbody td { padding: 7px 12px; border-bottom: 1px solid #f1f3f5; }
.preview-wrap .preview-footer {
  background: #f8f9fa;
  border-top: 1px solid #dee2e6;
  padding: 8px 14px;
  font-size: 12px;
  color: #6c757d;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.preview-footer .page-btns button {
  border: 1px solid #dee2e6;
  background: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  margin-left: 4px;
  cursor: default;
}
.preview-footer .page-btns button.active { background: #0d6efd; color: #fff; border-color: #0d6efd; }
.preview-toolbar {
  padding: 8px 14px;
  border-bottom: 1px solid #dee2e6;
  display: flex;
  gap: 8px;
  align-items: center;
}
.preview-toolbar input {
  font-size: 12px;
  padding: 4px 10px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  outline: none;
  width: 160px;
  color: #6c757d;
}
.preview-toolbar .preview-btn {
  font-size: 12px;
  padding: 4px 10px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  background: #fff;
  color: #495057;
  cursor: default;
}

/* ── Own it section ── */
.own-it-section { background: #0d6efd; color: #fff; }
.own-it-section p { color: rgba(255,255,255,0.85); }

/* ── Big quote ── */
.big-quote {
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.5;
  border-left: 4px solid #0d6efd;
  padding-left: 1.25rem;
  color: #212529;
}

/* ── Feature icon ── */
.feature-icon { font-size: 1.3rem; margin-right: 0.5rem; }

/* ── Pricing card ── */
.included-card { border: 2px solid #0d6efd; border-radius: 10px; padding: 2rem; background: #fff; }
.price-tag { font-size: 3rem; font-weight: 800; color: #198754; line-height: 1; }
.price-sub { font-size: 0.85rem; color: #6c757d; }

/* ── Timeline ── */
.timeline { position: relative; margin-left: 20px; padding-left: 20px; border-left: 3px solid #dee2e6; }
.timeline-step { position: relative; margin-bottom: 24px; }
.timeline-step::before {
  content: '';
  position: absolute;
  left: -31px; top: 5px;
  width: 12px; height: 12px;
  background-color: #dc3545;
  border-radius: 50%;
}
.timeline-step h5 { margin-bottom: 4px; }
.timeline-final {
  margin-top: 20px;
  padding: 12px 16px;
  background: #fff5f5;
  border-left: 4px solid #dc3545;
  border-radius: 4px;
  font-weight: 700;
  font-size: 1.05rem;
  color: #dc3545;
}

/* ── Comparison table ── */
.comparison-table th { font-weight: 600; font-size: 0.9rem; }
.comparison-table td { font-size: 0.9rem; vertical-align: middle; }
.comparison-table .check { color: #198754; font-size: 1rem; }
.comparison-table .cross { color: #dc3545; font-size: 1rem; }
.comparison-table .highlight-col { background: #f0f7ff; }

/* ── Options reference table ── */
.options-table th { font-weight: 600; font-size: 0.85rem; background: #f8f9fa; }
.options-table td { font-size: 0.85rem; vertical-align: middle; }
.options-table code { background: #f1f3f5; padding: 1px 5px; border-radius: 3px; font-size: 0.82rem; }
.badge-default { background: #e9ecef; color: #495057; font-size: 0.75rem; padding: 2px 7px; border-radius: 4px; font-weight: 500; white-space: nowrap; }

/* ── Step numbers ── */
.step-num {
  width: 32px; height: 32px;
  background: #0d6efd;
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
