/* The deck's working Mixer (js/playermix.js). Loaded after the skin. The level number, the aria-label and (in High
   contrast) a solid border sit with the red zone, so colour is never the only cue. */
.mixer.mxlive{--mx-track:#1C1F2E;--mx-edge:#3C4A6B;--mx-on:#B9BCC6;--mx-hold:#EFEBE3;--mx-dim:rgba(255,59,24,.55);align-items:stretch;gap:10px}
body.light .mixer.mxlive{--mx-track:#EFEBE3;--mx-edge:#B9BCC6;--mx-on:#3C4A6B;--mx-hold:#1C1F2E;--mx-dim:rgba(255,59,24,.7)}
.hc .mixer.mxlive{--mx-edge:#EFEBE3;--mx-on:#EFEBE3;--mx-hold:#EFEBE3}
body.light.hc .mixer.mxlive{--mx-track:#FFFFFF;--mx-edge:#1C1F2E;--mx-on:#1C1F2E;--mx-hold:#1C1F2E}
.mxlive .mxb{align-items:stretch;justify-content:space-between;gap:8px;min-height:190px;margin-top:0}
.mxlive .mxi{min-width:0;flex:0 1 auto}
.mxlive .mxi>span{font:500 13px/1.25 var(--u-mono);text-align:center;width:min-content;min-width:48px;font-variant-numeric:tabular-nums}
.mxlive .mxv{display:block;font-weight:500;color:var(--u-ink)}
.mxlive .mxvol{color:var(--u-ink)}

/* level: 12 segments, bottom to top */
/* inset by half a cap (22px) so the meter spans exactly the cap centre's travel: a level's box lines up with the cap */
.mxlive .lvl{width:16px;gap:2px;margin:11px 0}
.mxlive .lvl b,.hc .mxlive .lvl b{background:var(--mx-track);box-shadow:inset 0 0 0 1px var(--mx-edge)}
.mxlive .lvl b.f,.hc .mxlive .lvl b.f{background:var(--mx-on);box-shadow:none}
.mxlive .lvl b.h,.hc .mxlive .lvl b.h{background:var(--mx-track);box-shadow:inset 0 0 0 2px var(--mx-hold)}
/* red zone: the top 2 boxes. Same red as the fader's focus ring and handle line. Dark = dim outline; lit or peak hold = red. */
.mxlive .lvl b.r{box-shadow:inset 0 0 0 1px var(--mx-dim)}
.mxlive .lvl b.r.f,.mxlive .lvl b.r.h{background:var(--u-hot);box-shadow:none}
body.light .mxlive .lvl b.r.f,body.light .mxlive .lvl b.r.h{box-shadow:inset 0 0 0 1px #1C1F2E}
.hc .mxlive .lvl b.r{box-shadow:inset 0 0 0 2px var(--u-hot)}
.hc .mxlive .lvl b.r.f,.hc .mxlive .lvl b.r.h,body.light.hc .mxlive .lvl b.r.f,body.light.hc .mxlive .lvl b.r.h{box-shadow:inset 0 0 0 2px var(--mx-hold)}

/* fader: vertical at every width; 44px wide for a thumb */
.mxlive .fdr{width:44px;touch-action:none;cursor:ns-resize;user-select:none;-webkit-user-select:none}
.mxlive .ftr{background:var(--mx-track);box-shadow:inset 0 0 0 1px var(--mx-edge)}
.mxlive .fdr:focus-visible{outline:2px solid var(--u-hot);outline-offset:2px}

/* Match loudness */
.mxmatch{display:flex;flex-direction:column;gap:2px;min-width:0}
.mxsw{display:flex;align-items:center;gap:8px;min-height:44px;width:100%;padding:0;background:none;border:0;color:var(--u-ink);font:500 13px/1.25 var(--u-sans);text-align:left;cursor:pointer}
.mxsw[disabled]{color:var(--u-fog);cursor:default}
.mxk{flex:none;position:relative;width:32px;height:18px;background:var(--mx-track);box-shadow:inset 0 0 0 1px var(--mx-edge)}
.mxk i{position:absolute;left:3px;top:3px;width:12px;height:12px;background:var(--mx-on)}
.mxsw[aria-checked="true"] .mxk{background:var(--mx-on)}
.mxsw[aria-checked="true"] .mxk i{left:17px;background:var(--mx-track)}
.mxsw[disabled] .mxk{opacity:.6}
.mxhint{font:500 13px/1.3 var(--u-mono);color:var(--u-fog);min-height:1.3em}
.hc .mxsw .mxk{box-shadow:inset 0 0 0 2px var(--mx-edge)}

/* phones: skin.css lays the old placeholder out flat; this keeps the fader vertical */
@media (max-width:760px){
  .mixer.mxlive{grid-template-columns:auto minmax(0,1fr);grid-template-areas:"lab lab" "bars match";gap:10px 18px;align-items:start}
  .mxlive>.dlab{grid-area:lab}
  .mxlive .mxb{grid-area:bars;grid-column:auto;flex-direction:row;width:auto;min-height:190px;gap:14px;margin:0}
  .mxlive .mxi{flex-direction:column;justify-content:flex-start;align-items:center;gap:7px;width:auto}
  .mxlive .mxi>span{width:min-content}
  .mxlive .lvl{flex:1;flex-direction:column-reverse;width:16px;height:auto}
  .mxlive .fdr{flex:1;width:44px;height:auto}
  .mxlive .ftr{left:50%;right:auto;top:6px;bottom:6px;width:6px;height:auto;margin:0 0 0 -3px}
  .mxlive .fcap{left:0;right:0;top:auto;bottom:calc(var(--v)*(100% - 22px));width:auto;height:22px}
  .mxlive .fcap::after{left:5px;right:5px;top:50%;bottom:auto;width:auto;height:2px;margin:-1px 0 0}
  .mxmatch{grid-area:match;align-self:center}
}
