/* A colour space = a different gradient (export/colour-space-gradient-fixes.html): five fixes on top of
   connect-variants.css variant 1 (step numbers on the diagram). Script: export/js/colour-space-fixes.js. */

/* small step numbers, as on the steps and the diagram */
.sf-n, .gm-strip span.sf-n {   /* beats .gm-strip span (flex, muted) */
  display: inline-grid; place-items: center; place-content: center; flex: none;   /* place-content: .gm-strip span sets space-between */
  width: 22px; height: 22px; border-radius: 50%; border: 1.3px solid #ffffff40;
  font: 600 10.5px var(--display); color: var(--text); font-style: normal;
  transition: border-color .3s;
}
.sf-n.is-pulse, .gm-strip span.sf-n.is-pulse { border-color: #fff; animation: cv-ring .9s ease-out; }

/* ===================== 1 · no divider, the strip labelled 01 + 02 ===================== */
.sf--1 .gm-result { border-top: 0; padding-top: 0; }
.sf--1 .gm-result__h { display: none; }
.sf-eq { display: inline-flex; align-items: center; gap: 6px; }
.sf-eq i { font-style: normal; color: var(--muted); font-weight: 500; }

/* ===================== 2 · the stored strip wipes in ===================== */
.sf-wipe { position: relative; }
.sf-wipe canvas { display: block; }
.sf-wipe .sf-prev { position: absolute; inset: 0; width: 100%; height: 100%; }
.sf-wipe [data-gm-strip="stored"] { position: relative; }
.sf-wipe.is-wiping [data-gm-strip="stored"] { animation: sf-wipe .75s cubic-bezier(.4, 0, .2, 1) both; }
@keyframes sf-wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
/* the bright edge that runs across */
.sf-wipe::after {
  content: ""; position: absolute; top: -3px; bottom: -3px; left: 0; width: 2px; border-radius: 1px;
  background: #fff; box-shadow: 0 0 10px #fff; opacity: 0; pointer-events: none;
}
.sf-wipe.is-wiping::after { animation: sf-edge .75s cubic-bezier(.4, 0, .2, 1) both; }
@keyframes sf-edge { 0% { left: 0; opacity: 1; } 90% { opacity: 1; } 100% { left: calc(100% - 2px); opacity: 0; } }

/* ===================== 3 · a gradient inside every colour-space button ===================== */
.sf--3 .gm-space { display: grid; gap: 9px; padding: 11px 8px 9px; }
.sf-mini { display: block; width: 100%; height: 10px; }
.sf--3 .gm-result { border-top: 0; padding-top: 0; margin-top: 46px; }
.sf--3 .gm-result__h { display: none; }
.sf--3 .gm-strip:has([data-gm-strip="stored"]) { display: none; }
/* without the stored strip the left column is ~48px shorter, and the diagram (its bottom pinned to the column's end)
   rose into the title: give the 48px back as air, between the steps and above the gradient */
.sf--3 [data-gm-step2] { padding-top: 24px; }

/* ===================== 4 · one sentence that names both choices ===================== */
.sf--4 .gm-result__h { display: none; }
.sf--4 .gm-strip span { color: var(--muted); }
.sf-say { font-weight: 500; }
.sf-say b { color: var(--text); font-weight: 600; }

/* ===================== 5 · strips straight under the buttons ===================== */
.sf--5 .gm-result { border-top: 0; padding-top: 0; margin-top: 16px; }
.sf--5 .gm-result__h { display: none; }

@media (prefers-reduced-motion: reduce) {
  .sf-n.is-pulse, .sf-wipe.is-wiping [data-gm-strip="stored"], .sf-wipe.is-wiping::after { animation: none; }
}
