/* Egg Osmosis: only what's specific to this lab. Shared chrome is in ../lab.css. */

/* ---------- data panel ---------- */
.egg-panel {
  right: var(--gutter);
  bottom: calc(var(--timeline-h) + var(--gutter) * 2);
  width: 360px;
  padding-bottom: 12px;
}
.egg-panel .clock {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13px; font-weight: 600;
  padding: 3px 9px; border-radius: 8px;
  background: #0f1d2b; color: var(--accent-glow);
}
.egg-panel .clock:empty { display: none; }
.egg-table { width: calc(100% - 24px); margin: 0 12px; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.egg-table th { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); text-align: right; padding: 0 4px 6px; }
.egg-table th:first-child, .egg-table td:first-child { text-align: left; }
.egg-table td { padding: 8px 4px; text-align: right; border-top: 1px solid var(--line); vertical-align: middle; }
.egg-table td:first-child b { font-size: 14px; margin-right: 6px; }
.egg-table td:first-child small { display: block; margin: 2px 0 0 16px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.egg-table .swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: 0; }
.egg-table .dash { color: var(--faint, #b4bcc6); }
.egg-table td[data-c="change"] { width: 96px; }
.egg-table .pred { color: var(--muted); font-size: 14px; }
.egg-table .pred[hidden], .egg-table .result[hidden] { display: none; }

/* ---------- predict: one inner card per egg ---------- */
.egg-preds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.egg-pred { min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.egg-pred .swatch { width: 10px; height: 10px; border-radius: 3px; }
.egg-pred-head { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.egg-pred small { display: block; margin: 2px 0 8px; font-size: 11.5px; line-height: 1.3; color: var(--muted); }
.egg-pred-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; padding: 3px; border-radius: 10px; background: rgba(23, 24, 26, 0.05); }
.egg-pred-opts button {
  display: grid; justify-items: center; gap: 1px; min-width: 0; overflow: hidden; padding: 4px 0; border: 0; border-radius: 7px;
  background: transparent; color: var(--ink-2); font: inherit; font-size: 11.5px; font-weight: 500; cursor: pointer;
}
.egg-pred-opts button i { font-size: 13px; }
.egg-pred-opts button:hover:not(.on) { background: #fff; }
.egg-pred-opts button.on { background: var(--ink); color: #fff; }

.egg-table .result { display: inline-flex; align-items: center; gap: 6px; }
.egg-table .result b { font-size: 15px; }
.egg-table .result .up { color: #2563eb; }
.egg-table .result .down { color: #c2410c; }
.egg-table .result .ok { color: #16a34a; }
.egg-table .result .no { color: #dc2626; }
.egg-note { margin: 8px 16px 0; font-size: 11.5px; color: var(--muted); }

/* the card centres in the space left of the panel */
@media (min-width: 821px) {
  .lab-card {
    left: calc(280px + (100% - 280px - 380px) / 2);
    width: min(470px, calc(100% - 280px - 380px - var(--gutter) * 2));
    min-width: 0;
  }
  .lab-card:has(.egg-preds) { width: min(620px, calc(100% - 280px - 380px - var(--gutter) * 2)); }
  .lab-captions { right: calc(360px + var(--gutter) * 2); }
}
@media (max-width: 820px) {
  .egg-panel { left: var(--gutter); right: var(--gutter); width: auto; }
  .egg-note { display: none; }
}

/* ---------- info modal ---------- */
.equation {
  display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
  margin: 14px 0; padding: 12px; border-radius: 12px;
  background: #f4f7f9;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13px; color: var(--ink);
}
