/* style.css - small custom styles for tree viewer and highlighting tweaks */

html, body {
  min-height: 100%;
  margin: 0;
  background: #0f172a;
  color: #e2e8f0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  background-color: #0f172a;
  color: #e2e8f0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

input,
textarea,
select {
  background: #111827;
  color: #e2e8f0;
  border: 1px solid #374151;
}

textarea {
  resize: vertical;
}

.max-w-6xl {
  max-width: 72rem;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.py-6 {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.py-4 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.mt-6 {
  margin-top: 1.5rem;
}

.mt-8 {
  margin-top: 2rem;
}

.bg-gray-900 {
  background-color: #111827;
}

.bg-gray-800 {
  background-color: #1f2937;
}

.text-gray-100 {
  color: #f8fafc;
}

.text-gray-300 {
  color: #d1d5db;
}

.text-gray-400 {
  color: #9ca3af;
}

.rounded-md,
.rounded {
  border-radius: 0.375rem;
}

.rounded-xl {
  border-radius: 0.75rem;
}

.max-w-4xl {
  max-width: 64rem;
}

.border {
  border-width: 1px;
  border-style: solid;
  border-color: #374151;
}

.border-gray-700 {
  border-color: #374151;
}

.shadow-md {
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.35);
}

.flex {
  display: flex;
}

.items-start {
  align-items: flex-start;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-3 {
  gap: 0.75rem;
}

.min-h-\[180px\] {
  min-height: 180px;
}

.w-full {
  width: 100%;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.lg\:grid-cols-12 {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.lg\:col-span-8 {
  grid-column: span 8 / span 8;
}

.lg\:col-span-4 {
  grid-column: span 4 / span 4;
}

.flex-wrap {
  flex-wrap: wrap;
}

.overflow-auto {
  overflow: auto;
}

.space-y-4 > * + * {
  margin-top: 1rem;
}

.block {
  display: block;
}

.prose {
  line-height: 1.75;
}

.text-sm {
  font-size: 0.875rem;
}

.hover\:underline:hover {
  text-decoration: underline;
}

.hover\:bg-gray-700:hover,
.hover\:bg-gray-600:hover,
.hover\:bg-indigo-500:hover,
.hover\:bg-green-500:hover {
  opacity: 0.95;
}

/* Ensure Prism code blocks inherit container colors in dark mode */
pre[class*="language-"] {
  background: transparent !important;
  border-radius: 0.375rem;
  margin: 0;
  padding: 0;
}

/* JSON tree view */
#jsonTree {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, "Roboto Mono", "Courier New", monospace;
  font-size: 0.92rem;
  line-height: 1.5;
}

.json-node {
  margin-left: 0.6rem;
  position: relative;
}

.json-key {
  color: #60a5fa; /* accent */
}

.json-string {
  color: #7dd3fc; /* cyan-ish */
}

.json-number {
  color: #fca5a5; /* red-ish */
}

.json-boolean {
  color: #fef08a; /* yellow */
}

.details-toggle {
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* highlight match span for regex */
.match {
  background: rgba(96,165,250,0.18);
  border-bottom: 1px solid rgba(96,165,250,0.36);
  color: #60a5fa;
}

/* small scrollbars for output pane */
#outputPane::-webkit-scrollbar,
#jsonTree::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}
#outputPane::-webkit-scrollbar-thumb,
#jsonTree::-webkit-scrollbar-thumb {
  background: rgba(148,163,184,0.18);
  border-radius: 10px;
}

/* History panel item */
.history-item {
  border-left: 3px solid transparent;
  padding: 0.45rem;
  background: rgba(255,255,255,0.01);
  border-radius: 0.35rem;
}
.history-item:hover {
  background: rgba(255,255,255,0.02);
  border-left-color: rgba(96,165,250,0.5);
  cursor: pointer;
}
.history-meta {
  color: #94a3b8;
  font-size: 0.8rem;
}
