/* Lab activities (matter and change): squash undo (site/js/science/lab-change.js). */

/* ---- Squash: sealed syringes of a gas, a liquid and a solid ---- */

.sq-rig { display: flex; align-items: center; justify-content: center; gap: 3cqmin; width: 100%; flex: 1 1 0; min-height: 0; }
.sq-shelf { display: grid; gap: 1.4cqmin; }
.sq-shelf .card { width: clamp(96px, 15cqw, 150px); }
.sq-shelf .card-emoji { font-size: clamp(28px, 6cqmin, 44px); }
.sq-shelf .card-label { font-size: clamp(14px, 2.6cqmin, 19px); }
.sq-scene { flex: none; width: auto; height: 100%; aspect-ratio: 240 / 530; }
.sq-bg { fill: transparent; }
.sq-room { fill: #f7fbff; }
.sq-barrel { fill: rgb(220 240 255 / 0.25); stroke: #8fb8d8; stroke-width: 5; }
.sq-nozzle { fill: #8fb8d8; }
.sq-cap { fill: #e0453a; }
.sq-seal { fill: #2d3546; }
.sq-rod { fill: #8794a8; }
.sq-thumb { fill: #e0453a; cursor: pointer; }
.sq-plunger { cursor: pointer; }
.sq-scale line { stroke: #1d2433; stroke-width: 2.5; }
.sq-scale text { fill: #1d2433; font: 600 17px var(--ui); dominant-baseline: middle; }
.sq-scale .sq-unit { font-size: 15px; fill: var(--muted); }
.sq-reading { fill: #1d2433; font: 700 30px var(--ui); text-anchor: middle; }
.sq-dot.gas { fill: #bfe3ff; stroke: #3a86d8; stroke-width: 2; }
.sq-dot.liquid { fill: #5aa9f0; stroke: #2f6fb8; stroke-width: 1.5; }
.sq-dot.solid { fill: #c08a4e; stroke: #8d6235; stroke-width: 1.5; }

@container (max-aspect-ratio: 23/20) {
  .sq-shelf { grid-auto-flow: row; }
}

/* ---- Undo: change something on the bench, then try to change it back ---- */

.un-shelf { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.2cqmin; }
.un-shelf .card { width: clamp(84px, 11cqw, 124px); }
.un-shelf .card-emoji { font-size: clamp(26px, 5.4cqmin, 40px); }
.un-shelf .card-label { font-size: clamp(13px, 2.4cqmin, 17px); }
.un-bench {
  position: relative;
  display: grid;
  place-items: center;
  flex: 1 1 auto;
  width: min(100%, 520px);
  min-height: 0;
  overflow: hidden;
  border-radius: 4cqmin;
  background: linear-gradient(#fdf7ea 0 70%, #c89b6d 70% 76%, #a77a4f 76%);
  box-shadow: var(--shadow);
}
.un-dish { display: grid; place-items: center; width: min(26cqh, 24cqw); aspect-ratio: 1.6; margin-top: 4%; border-radius: 50%; background: radial-gradient(#fff 55%, #dfe6ee 56% 64%, #fff 65%); box-shadow: 0 6px 10px rgb(29 36 51 / 0.18); }
.un-thing { font: min(11cqh, 10cqw)/1 var(--emoji); pointer-events: none; }
.un-thing.tint { filter: sepia(1) saturate(4) hue-rotate(-25deg) brightness(0.72); }
.un-tool { position: absolute; left: 50%; bottom: 6%; translate: -50% 0; font: min(9cqh, 8cqw)/1 var(--emoji); pointer-events: none; }
.un-days { position: absolute; top: 6%; right: 4%; font: 600 clamp(15px, 3cqmin, 21px)/1 var(--ui); }
.un-buttons .big { font-size: clamp(16px, 3cqmin, 22px); }
