/* LeadBuilder sandbox.
   Uses your site's own variables (--bg-surface, --accent, etc.) and your
   .terminal-window classes from style.css, so it follows your themes. */

/* Windows: solid background so text never sits on the grid pattern */
.sandbox .sandbox-window { margin-top: 28px; }

/* Inside the windows, use your normal body font instead of the terminal's
   small monospace, so long text and tables stay easy to read. */
.sandbox .sandbox-window .terminal-body {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.6;
  padding: 24px 26px;
}

.sandbox .terminal-body h2 {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  margin: 0 0 16px;
}
.sandbox .terminal-body h2:not(:first-child) { margin-top: 28px; }

.sandbox a { color: var(--accent); }
.sandbox-intro p { max-width: 70ch; margin-top: 0; }
.sandbox-muted { color: var(--text-muted); font-size: 0.9rem; }

/* 458 -> 215 funnel */
.sandbox-funnel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
}
.sandbox-funnel strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 2.4rem;
  line-height: 1.1;
  color: var(--accent);
}
.sandbox-arrow { font-size: 2rem; color: var(--text-muted); }

.sandbox-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  column-gap: 2rem;
  margin: 1.5rem 0 0.75rem;
}
.sandbox-stats div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border-color);
}
.sandbox-stats dt { color: var(--text-muted); }
.sandbox-stats dd { margin: 0; font-family: var(--font-mono); font-weight: 700; }

/* Filters */
.sandbox-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1rem;
}
.sandbox-filters label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}
.sandbox-filters .sandbox-check { flex-direction: row; align-items: center; gap: 0.5rem; height: 2.6rem; }
.sandbox-filters input[type="search"],
.sandbox-filters select {
  font: inherit;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text-main);
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0 0.65rem;
  height: 2.6rem;
}
.sandbox-filters input[type="search"]:focus,
.sandbox-filters select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.sandbox-filters input[type="checkbox"] { accent-color: var(--accent); }
.sandbox-filters button {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--bg-primary);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 0 1rem;
  height: 2.6rem;
  cursor: pointer;
}
.sandbox-filters button:hover { filter: brightness(1.1); }
.sandbox-filter-actions { display: flex; align-items: center; gap: 1rem; }
.sandbox :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Table: scrolls sideways on small screens instead of breaking the page */
.sandbox-table-wrap { overflow-x: auto; }
.sandbox-table { width: 100%; border-collapse: collapse; }
.sandbox-table th,
.sandbox-table td {
  text-align: left;
  vertical-align: top;
  padding: 0.65rem 1rem 0.65rem 0;
  border-bottom: 1px solid var(--border-color);
}
.sandbox-table th {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
}
.sandbox-table tbody tr:hover { background: var(--bg-surface-raised); }
.sandbox-table a { text-decoration: none; font-weight: 600; }
.sandbox-table a:hover { text-decoration: underline; }
.sandbox-nowrap { white-space: nowrap; }

.sandbox-pagination {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

/* How it works */
.sandbox-steps { padding-left: 1.5rem; max-width: 70ch; margin: 0; }
.sandbox-steps li { margin-bottom: 1.1rem; }
.sandbox-steps li::marker { color: var(--accent); font-family: var(--font-mono); font-weight: 700; }
.sandbox-steps h3 { margin: 0 0 0.2rem; font-size: 1rem; }
.sandbox-steps p { margin: 0; color: var(--text-muted); }

/* Record page */
.sandbox-detail { margin: 0; }
.sandbox-detail div {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}
.sandbox-detail div:last-child { border-bottom: 0; }
.sandbox-detail dt { font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-muted); }
.sandbox-detail dd { margin: 0; overflow-wrap: anywhere; }

/* Attribution: its own solid panel so it's readable too */
.sandbox-footer {
  margin-top: 28px;
  padding: 16px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.sandbox-footer p { margin: 0.3rem 0; }

@media (max-width: 600px) {
  .sandbox .sandbox-window .terminal-body { padding: 18px 16px; }
  .sandbox-detail div { grid-template-columns: 1fr; gap: 0.25rem; }
  .sandbox-arrow { display: none; }
}
