/* NABLA — pde.css  (depends on workspace.css) */

.pde-body { grid-template-columns: 30fr 26fr 44fr; }
@media (max-width: 1100px) { .pde-body { grid-template-columns: 1fr; } }

/* ── Equation display ── */
.pde-eq-display {
  background: var(--void);
  border: 1px solid var(--border);
  border-left: 3px solid var(--orange);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.95rem;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.eq-math {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--orange-bright);
  letter-spacing: 0.02em;
}

/* ── Equation group label ── */
.pde-eq-group-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.pde-eq-group-label:first-of-type { margin-top: 0; }

/* ── Parameters area ── */
.pde-params-area {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* ── Expression input blocks ── */
.pde-expr-block {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.pde-expr-label {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.pde-expr-wrap {
  display: flex;
  align-items: center;
  background: var(--void);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.42rem 0.72rem;
  transition: border-color 0.15s;
}
.pde-expr-wrap:focus-within { border-color: var(--orange); }

.pde-expr-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  min-width: 0;
}
.pde-expr-input::placeholder { color: var(--text-muted); font-size: 0.74rem; }

.pde-expr-select {
  width: 100%;
  background: var(--void);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.42rem 0.72rem;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s;
}
.pde-expr-select:focus { border-color: var(--orange); }

/* ── Example chip row ── */
.pde-example-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  padding-top: 0.2rem;
}

.pde-example-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

/* ── GPU badge ── */
.pde-gpu-badge {
  display: none; /* shown via JS when GPU active */
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  background: rgba(255, 106, 26, 0.06);
  border: 1px solid rgba(255, 106, 26, 0.2);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--orange-bright);
}
.pde-gpu-badge.active { display: flex; }

/* ── Output canvases ── */
.pde-plot-wrap,
.pde-waterfall-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.7rem;
  position: relative;
}

.pde-plot-wrap::before {
  content: 'u(x, t)';
  position: absolute;
  top: 8px; left: 10px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  pointer-events: none;
}

.pde-waterfall-wrap::before {
  content: 'Space-time diagram';
  position: absolute;
  top: 8px; left: 10px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  pointer-events: none;
}

.pde-canvas {
  width: 100%;
  height: auto;
  border-radius: 4px;
  display: block;
  background: #07070A;
}

/* ── Animation bar ── */
.pde-anim-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.7rem;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.pde-anim-btn {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--grad-brand);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  cursor: pointer;
  transition: filter 0.15s, transform 0.15s;
}
.pde-anim-btn:hover { filter: brightness(1.1); transform: scale(1.05); }

.pde-scrubber {
  flex: 1;
  height: 4px;
  accent-color: var(--orange-bright);
  cursor: pointer;
}

.pde-frame-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--orange-bright);
  flex-shrink: 0;
  min-width: 70px;
}

/* ── 2D heatmap ── */
.pde-2d-wrap {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
}

.pde-canvas-2d {
  width: min(100%, 480px);
  height: auto;
  border-radius: var(--radius-md);
  display: block;
  border: 1px solid var(--border);
}

.pde-2d-colorbar {
  flex-shrink: 0;
  width: 48px;
}

.colorbar-inner {
  display: flex;
  gap: 4px;
  height: 240px;
  align-items: stretch;
}

.colorbar-gradient {
  width: 14px;
  border-radius: 4px;
  background: linear-gradient(
    to bottom,
    rgb(230, 60, 20),
    rgb(220, 200, 50),
    rgb(60, 180, 120),
    rgb(44, 120, 180),
    rgb(8, 8, 100)
  );
  border: 1px solid var(--border);
}

.colorbar-labels {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2px 0;
}

.colorbar-labels span {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── Preset chips (reused from integration style) ── */
.preset-chip {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--text-secondary);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.22rem 0.6rem;
  cursor: pointer;
  transition: all 0.15s;
}
.preset-chip:hover {
  color: var(--orange-bright);
  border-color: var(--orange);
  background: rgba(255, 106, 26, 0.06);
}