/* Shared 3D annotation + panel legend styles (light-background sims) */

:root {
  --sim-ink: #f4f7ed;
  --sim-ink-dim: #c6d0bf;
  --sim-ink-muted: #829080;
  --sim-surface: rgba(11, 15, 13, 0.92);
  --sim-line: rgba(38, 52, 40, 0.95);
  --sim-accent: #78d7ff;
  --sim-signal: #1fff7e;
}

/* ── Floating 3D labels ─────────────────────────────────────────────── */

.sim-label {
  background: rgba(11, 15, 13, 0.88);
  border: 1px solid var(--sim-line);
  border-left: 3px solid var(--sim-accent);
  color: var(--sim-ink);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 5px 11px;
  border-radius: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
  pointer-events: none;
  line-height: 1.3;
  backdrop-filter: blur(8px);
  -webkit-font-smoothing: antialiased;
}

.sim-label-em {
  border-left-color: var(--sim-signal);
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
}

.sim-label-sm {
  font-size: 0.76rem;
  font-weight: 600;
  padding: 4px 9px;
  opacity: 0.95;
  border-left-width: 2px;
}

.sim-part-label {
  background: rgba(11, 15, 13, 0.78);
  border: 1px solid rgba(38, 52, 40, 0.85);
  border-left: 2px solid #829080;
  color: var(--sim-ink-dim);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 0;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
  white-space: nowrap;
  pointer-events: none;
  line-height: 1.25;
  opacity: 0.95;
}

.sim-label-sub {
  display: block;
  font-size: 0.48rem;
  font-weight: 400;
  color: var(--sim-ink-muted);
  margin-top: 1px;
  letter-spacing: 0.01em;
}

/* ── Callout cards (CSS2DObject overlays) ───────────────────────────── */

.sim-callout {
  background: var(--sim-surface);
  border: 1px solid rgba(31, 255, 126, 0.28);
  border-left: 3px solid var(--sim-signal);
  color: var(--sim-ink);
  font-family: "Inter", sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  max-width: 200px;
  line-height: 1.35;
  backdrop-filter: blur(8px);
}

.sim-callout strong {
  color: var(--sim-signal);
  display: block;
  font-size: 0.74rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.sim-callout span {
  color: var(--sim-ink-dim);
  font-size: 0.64rem;
  font-weight: 400;
}

.sim-callout-info {
  border-color: rgba(120, 215, 255, 0.28);
  border-left-color: var(--sim-accent);
}

.sim-callout-info strong {
  color: var(--sim-accent);
}

.sim-callout-warn {
  border-color: rgba(255, 122, 84, 0.28);
  border-left-color: #ff7a54;
}

.sim-callout-warn strong {
  color: #ff7a54;
}

/* ── Panel legend (optional color swatches) ─────────────────────────── */

.sim-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sim-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: "Inter", sans-serif;
  font-size: 0.6rem;
  color: var(--sim-ink-dim);
  line-height: 1.35;
}

.sim-swatch {
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: 1px solid var(--sim-line);
}

/* Named palette, matches sim model colors */
.sim-swatch-pink { background: #de1e6a; }
.sim-swatch-blue { background: #2563eb; }
.sim-swatch-green { background: #16a34a; }
.sim-swatch-teal { background: #0e97a6; }
.sim-swatch-gold { background: #ca8a04; }
.sim-swatch-orange { background: #ea580c; }
.sim-swatch-red { background: #dc2626; }
.sim-swatch-cream { background: #f5f0e1; }
.sim-swatch-gray { background: #94a3b8; }

/* Inline legend row (e.g. "Pink = PEG · Blue = mRNA") */
.sim-legend-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
}

.sim-legend-inline .sim-legend-item {
  font-size: 0.58rem;
}
