/* NotchetStyle, ported: keys, labels, meters, lights, fuse. */
.notchet {
  --accent: #c8ff3d;
  --urgent: #ff4d2e;
  --t1: #f2f2f2;
  --t2: #8a8a8a;
  --key: rgba(255, 255, 255, .10);
  --key-pressed: rgba(255, 255, 255, .16);
  --unlit: rgba(255, 255, 255, .10);
  --hairline: rgba(255, 255, 255, .08);
  --claude: #d97757;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  color: var(--t1);
  font-family: var(--mono);
}

.notchet .lbl { display: flex; justify-content: space-between; align-items: center; gap: 8px; font: 600 10px/13px var(--mono); text-transform: uppercase; letter-spacing: 1.2px; color: var(--t2); white-space: nowrap; }
.notchet .lbl i { font-style: normal; color: var(--accent); }

.key {
  --tint: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  /* SwiftUI pads the label 10pt and draws the 1pt border inside that; here the border adds to it. */
  min-width: 34px; height: 26px; padding: 0 9px;
  font: 600 11px/1 var(--mono); letter-spacing: .6px; text-transform: uppercase; white-space: nowrap;
  color: var(--t1); background: var(--key);
  border: 1px solid rgba(255, 255, 255, .06); border-radius: 6px;
  cursor: pointer; transition: transform .08s ease-out;
}
.key:active { transform: translateY(1px); background: var(--key-pressed); }
.key.primary { color: #000; background: var(--tint); border-color: transparent; }
.key.primary:active { background: var(--tint); opacity: .8; }
.key.selected { color: var(--tint); border-color: color-mix(in srgb, var(--tint) 50%, transparent); }
.key:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.key[hidden] { display: none; }

.meter { --tint: var(--accent); display: flex; gap: var(--gap, 2px); height: var(--h, 6px); }
.meter .tick { flex: 1; border-radius: 1px; background: var(--unlit); transition: background .15s ease-out; }
.meter .tick.lit { background: var(--tick, var(--tint)); }

.light { --tint: var(--accent); display: inline-block; width: var(--size, 6px); height: var(--size, 6px); border-radius: 1.5px; background: var(--tint); transition: opacity .12s ease-out, box-shadow .12s ease-out; }
.light.on { box-shadow: 0 0 3px color-mix(in srgb, var(--tint) 60%, transparent); }

.fuse { height: 2px; }
.fuse span { display: block; height: 100%; border-radius: 1px; background: var(--accent); transition: width .25s linear; }

@media (prefers-reduced-motion: reduce) {
  .key, .meter .tick, .light, .fuse span { transition: none; }
}
