/* The music games and the Luistertest: instrument pictures, the ear. See shared/muziek.js. */

/* an instrument: bars, keys or fingering cards; it takes the width it gets */
.instrument{display:block;width:100%;max-width:calc(var(--w) * 1.25px);height:auto;max-height:100%;margin-inline:auto;overflow:visible;-webkit-tap-highlight-color:transparent}
.instrument text{font-family:var(--display);font-weight:600;text-anchor:middle;dominant-baseline:central;pointer-events:none}
.instrument .lbl{fill:#fff;stroke:rgba(0,0,0,.45);stroke-width:3px;paint-order:stroke}
.instrument .cents{fill:var(--ink-soft);font-size:14px}
.instrument .rail{stroke:var(--ink-soft);stroke-width:6;stroke-linecap:round;opacity:.35;fill:none}
.instrument .nail{fill:rgba(255,255,255,.75)}
.instrument .body{stroke:rgba(0,0,0,.22);stroke-width:2}
.instrument .white{fill:#fff;stroke:var(--line)}
.instrument .black .body{fill:#2c2a3a;stroke:none}
.instrument .card{fill:var(--card);stroke:var(--line)}
.instrument .pipe{fill:var(--tint);stroke:var(--ink-soft);stroke-width:2}
.instrument .window{fill:var(--ink-soft)}
.instrument .hole{fill:var(--card);stroke:var(--ink);stroke-width:1.6}
.instrument .hole.shut{fill:var(--ink)}
.instrument .note{transform-box:fill-box;transform-origin:center;transition:opacity .2s,filter .2s}
.instrument .tap{cursor:pointer}
.instrument .tap:active{transform:translateY(3px)}
.instrument .dim{opacity:.25;filter:grayscale(1);pointer-events:none}
/* asked: a pulsing outline; heard: a warm glow; ok: green with a check */
.instrument .ring{fill:none;stroke:var(--ink);stroke-width:3;stroke-dasharray:8 5;opacity:0}
.instrument .asked .ring{opacity:1;animation:asked 1s ease-in-out infinite}
@keyframes asked{50%{opacity:.2}}
.instrument .glow{fill:var(--sun);opacity:0;transition:opacity .15s}
.instrument .heard .glow{opacity:.9;filter:drop-shadow(0 0 6px var(--sun))}
.instrument .ok .body{stroke:var(--mint-shade);stroke-width:4}
.instrument .tick{opacity:0;transition:opacity .2s}
.instrument .ok .tick{opacity:1}
.instrument .tick circle{fill:var(--mint-shade);stroke:#fff;stroke-width:2}
.instrument .tick path{fill:none;stroke:#fff;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.instrument .nope{animation:nope .4s}
@keyframes nope{25%{transform:rotate(-4deg)}75%{transform:rotate(4deg)}}

/* a pictogram of an instrument */
.micon{display:block;width:72px;height:72px;flex:none}

/* the ear: a round button; its waves move while the app listens, and grow with the sound */
.ear{--lvl:0;width:72px;height:72px;flex:none;border:0;border-radius:50%;padding:var(--s2);background:var(--card);color:var(--cool-deep);
  box-shadow:0 var(--lift) 0 var(--line);display:grid;place-items:center}
.ear:active{transform:translateY(3px);box-shadow:0 2px 0 var(--line)}
.ear svg{width:100%;height:100%;overflow:visible}
.ear path{fill:none;stroke:currentColor;stroke-width:4;stroke-linecap:round;stroke-linejoin:round}
.ear .waves path{opacity:.2;transform-box:view-box;transform-origin:50px 36px;scale:calc(1 + var(--lvl) * .35);transition:scale .08s}
.ear.listening{color:var(--hot-deep);background:var(--tint)}
.ear.listening .waves path{opacity:.9;animation:earwave 1.2s ease-in-out infinite}
.ear.listening .waves path:nth-child(2){animation-delay:.15s}
.ear.listening .waves path:nth-child(3){animation-delay:.3s}
@keyframes earwave{50%{opacity:.25}}
.ear.invite{animation:invite 1.1s ease-in-out infinite}
@keyframes invite{50%{transform:scale(1.1)}}
.ear.off{color:var(--ink-soft);opacity:.45;filter:grayscale(1)}

/* the ear with what the mascot said next to it, in one row */
.earrow{display:flex;align-items:center;gap:var(--s3)}
.heardline{margin:0;flex:1;min-width:0;font-size:1.1rem;line-height:1.35}
