/* THOMZY.com — mixer.css  ·  Collaborative DJ mixing table */

/* ══════════════════════════════════════════════════════════════════════════
   Root + Panel
   ══════════════════════════════════════════════════════════════════════════ */
.mixer-panel {
  border-color: rgba(182,92,255,0.7);
  background: linear-gradient(160deg, rgba(18,8,40,0.96) 0%, rgba(8,18,36,0.98) 100%);
}
.mixer-panel > .panel-h { color: #d070ff; }

#mixer-root {
  display: flex;
  flex-direction: column;
  gap: 10px;
  user-select: none;
}

/* ══════════════════════════════════════════════════════════════════════════
   Visualizers
   ══════════════════════════════════════════════════════════════════════════ */
.mx-visualizer { display: flex; flex-direction: column; gap: 4px; }

.mx-canvas {
  width: 100%; height: 48px; display: block;
  border: 1px solid rgba(37,232,255,0.18);
  background: #020210;
  border-radius: 3px;
  image-rendering: pixelated;
}

/* ══════════════════════════════════════════════════════════════════════════
   Section labels
   ══════════════════════════════════════════════════════════════════════════ */
.mx-section-label {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(37,232,255,0.6);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.mx-section-label::before,
.mx-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(37,232,255,0.2));
}
.mx-section-label::after {
  background: linear-gradient(90deg, rgba(37,232,255,0.2), transparent);
}

/* ══════════════════════════════════════════════════════════════════════════
   10-Band EQ
   ══════════════════════════════════════════════════════════════════════════ */
.mx-eq-section {
  background: rgba(6,6,20,0.9);
  border: 1px solid rgba(255,232,58,0.25);
  border-radius: 4px;
  padding: 7px 8px;
  transition: box-shadow 0.25s;
}

.mx-eq-row {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  justify-content: space-between;
}

.mx-eq-band {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
  position: relative;
  padding: 2px 1px;
  border-radius: 3px;
  transition: background 0.15s;
}

.mx-eq-db {
  font-family: var(--mono);
  font-size: 7px;
  color: rgba(255,232,58,0.5);
  white-space: nowrap;
  min-height: 10px;
  transition: color 0.15s, text-shadow 0.15s;
}

.mx-eq-lbl {
  font-family: var(--mono);
  font-size: 7px;
  color: rgba(37,232,255,0.5);
  text-align: center;
  transition: color 0.15s;
}

/* ══════════════════════════════════════════════════════════════════════════
   DJ Mixer Faders (custom pointer-event, cross-browser)
   FADER_H=72, FADER_CAP=8 — keep in sync with mixer.js constants
   ══════════════════════════════════════════════════════════════════════════ */
.mx-fader-track-outer {
  position: relative;
  width: 16px;
  height: 72px; /* FADER_H */
  cursor: ns-resize;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

.mx-fader-rail {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  background: linear-gradient(
    to bottom,
    rgba(255, 80, 80, 0.25)  0%,
    rgba(255,232, 58, 0.35) 35%,
    rgba(255,232, 58, 0.60) 50%,
    rgba(255,232, 58, 0.35) 65%,
    rgba(255, 80, 80, 0.25) 100%
  );
  border-radius: 2px;
  box-shadow: inset 0 0 4px rgba(0,0,0,0.8);
}

/* 0 dB marker — sits at 50% of track height, aligns with cap center at 0 dB */
.mx-fader-zero {
  position: absolute;
  left: 2px; right: 2px;
  top: 50%;
  height: 1px;
  background: rgba(255,232,58,0.55);
  pointer-events: none;
}

.mx-fader-cap {
  position: absolute;
  left: 1px; right: 1px;
  height: 8px; /* FADER_CAP */
  top: 32px;   /* default 0 dB → (FADER_H - FADER_CAP) × 0.5 = 32 */
  background: linear-gradient(180deg,
    rgba(255,255,255,0.25)  0%,
    rgba(255,232, 58,0.90) 20%,
    rgba(180,148,  0,1.00) 50%,
    rgba(255,232, 58,0.90) 80%,
    rgba(255,255,255,0.10) 100%
  );
  border-radius: 2px;
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.75),
    0 2px 5px rgba(0,0,0,0.65),
    inset 0 1px 0 rgba(255,255,255,0.28);
  transition: box-shadow 0.15s;
  --cap-color: #ffe83a;
}

/* Center groove line */
.mx-fader-cap::before {
  content: '';
  position: absolute;
  left: 25%; right: 25%;
  top: 50%; transform: translateY(-50%);
  height: 1px;
  background: rgba(0,0,0,0.5);
}

/* Hover highlight */
.mx-fader-track-outer:hover .mx-fader-cap:not(.is-remote) {
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.75),
    0 0 9px rgba(255,232,58,0.45),
    0 2px 5px rgba(0,0,0,0.65),
    inset 0 1px 0 rgba(255,255,255,0.28);
}

/* Remote user color tint */
.mx-fader-cap.is-remote {
  background: linear-gradient(180deg,
    rgba(255,255,255,0.2)  0%,
    var(--cap-color)       20%,
    color-mix(in srgb, var(--cap-color) 55%, black) 50%,
    var(--cap-color)       80%,
    rgba(255,255,255,0.1)  100%
  );
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.75),
    0 0 12px var(--cap-color),
    0 2px 5px rgba(0,0,0,0.65),
    inset 0 1px 0 rgba(255,255,255,0.25);
}
.mx-eq-band.mx-modified .mx-eq-lbl { color: #ff3ec9; }
.mx-eq-band.mx-modified .mx-fader-cap { background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, #ff3ec9 20%, #aa1a80 50%, #ff3ec9 80%, rgba(255,255,255,0.1) 100%); }

.mx-eq-band.mx-locked {
  pointer-events: none;
  outline: 1px solid var(--lock-color, #ff3ec9);
  outline-offset: 1px;
}
.mx-eq-band.mx-locked::after {
  content: attr(data-locked-by);
  position: absolute; inset: 0;
  background: color-mix(in srgb, var(--lock-color, #ff3ec9) 18%, transparent);
  border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 7px; font-weight: bold;
  color: var(--lock-color, #ff3ec9);
  text-shadow: 0 0 4px #000;
  pointer-events: none; z-index: 5;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  animation: mx-lock-pulse 1.5s ease-in-out infinite;
}

/* ══════════════════════════════════════════════════════════════════════════
   Effects section
   ══════════════════════════════════════════════════════════════════════════ */
.mx-fx-section {
  background: rgba(6,6,20,0.7);
  border: 1px solid rgba(182,92,255,0.2);
  border-radius: 4px;
  padding: 7px 8px;
}

.mx-fx-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.mx-module {
  background: linear-gradient(180deg, rgba(30,28,55,0.95) 0%, rgba(14,12,35,0.98) 100%);
  border: 1px solid rgba(182,92,255,0.3);
  border-top: 1px solid rgba(182,92,255,0.5);
  border-radius: 4px;
  padding: 5px 5px 7px;
  flex: 1 1 56px;
  max-width: 84px;
  min-width: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    inset 0 -1px 0 rgba(0,0,0,0.4),
    0 2px 6px rgba(0,0,0,0.45);
  transition: border-color 0.2s, box-shadow 0.2s;
  position: relative;
}

.mx-mod-hd {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 1px;
}

.mx-mod-title {
  font-family: var(--mono);
  font-size: 8px;
  font-weight: bold;
  letter-spacing: 1px;
  color: rgba(200,160,255,0.8);
  text-transform: uppercase;
}

.mx-mod-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 100%;
}

/* ══════════════════════════════════════════════════════════════════════════
   Knob
   ══════════════════════════════════════════════════════════════════════════ */
.mx-knob-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  position: relative;
}

.mx-knob-canvas {
  display: block;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

.mx-knob-val {
  font-family: var(--mono);
  font-size: 7px;
  color: rgba(255,232,58,0.7);
  text-align: center;
  min-width: 26px;
  transition: color 0.15s;
  letter-spacing: 0.3px;
}

.mx-knob-lbl {
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 1px;
  color: rgba(140,196,255,0.55);
  text-transform: uppercase;
  text-align: center;
}

.mx-knob-wrap.mx-modified .mx-knob-val { color: #ff3ec9; text-shadow: 0 0 5px #ff3ec9; }
.mx-knob-wrap.mx-modified .mx-knob-lbl { color: rgba(255,62,201,0.7); }

/* ══════════════════════════════════════════════════════════════════════════
   LED Toggle Button
   ══════════════════════════════════════════════════════════════════════════ */
.mx-led-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.mx-led-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 3px;
  padding: 3px 4px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, box-shadow 0.12s;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.5px;
  color: rgba(200,200,200,0.6);
  text-transform: uppercase;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.mx-led-btn:hover:not(.mx-led-locked) {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.8);
}

.mx-led-btn:active:not(.mx-led-locked) { transform: translateY(1px); }

.mx-led {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  transition: background 0.15s, box-shadow 0.15s;
  --led-on-color: #ffe83a;
}

.mx-led-btn.mx-led-on {
  background: rgba(255,232,58,0.08);
  border-color: rgba(255,232,58,0.4);
  color: #ffe83a;
  box-shadow: 0 0 8px rgba(255,232,58,0.15), inset 0 0 4px rgba(255,232,58,0.06);
}
.mx-led-btn.mx-led-on .mx-led {
  background: var(--led-on-color);
  box-shadow: 0 0 6px var(--led-on-color), 0 0 14px var(--led-on-color);
  border-color: transparent;
}

.mx-led-btn.mx-led-locked {
  cursor: not-allowed;
  border-color: var(--led-lock-color, #ff3ec9);
  box-shadow: 0 0 8px var(--led-lock-color, #ff3ec9);
  animation: mx-lock-pulse 1.5s ease-in-out infinite;
}

.mx-led-label { pointer-events: none; }

/* ══════════════════════════════════════════════════════════════════════════
   Touch presence dots
   ══════════════════════════════════════════════════════════════════════════ */
.mx-touch-dots {
  display: inline-flex;
  gap: 2px;
  align-items: center;
  pointer-events: none;
}

.mx-touch-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  animation: mx-dot-pulse 0.9s ease-in-out infinite;
}

@keyframes mx-dot-pulse {
  0%, 100% { transform: scale(1);   opacity: 1;   }
  50%       { transform: scale(1.5); opacity: 0.5; }
}

@keyframes mx-lock-pulse {
  0%, 100% { opacity: 0.75; }
  50%       { opacity: 1;    }
}

/* ══════════════════════════════════════════════════════════════════════════
   Reset All button
   ══════════════════════════════════════════════════════════════════════════ */
.mx-reset-btn {
  background: rgba(255,62,201,0.10);
  border: 1px solid rgba(255,62,201,0.35);
  border-radius: 3px;
  color: rgba(255,62,201,0.75);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 1.5px;
  padding: 2px 7px;
  cursor: pointer;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 0.12s, border-color 0.12s, box-shadow 0.12s, color 0.12s;
  line-height: 1;
}
.mx-reset-btn:hover {
  background: rgba(255,62,201,0.22);
  border-color: rgba(255,62,201,0.65);
  box-shadow: 0 0 8px rgba(255,62,201,0.3);
  color: #ff3ec9;
}
.mx-reset-btn:active { transform: translateY(1px); }

/* ══════════════════════════════════════════════════════════════════════════
   YouTube warning note
   ══════════════════════════════════════════════════════════════════════════ */
.yt-note {
  color: #ff4747;
  background: rgba(255,71,71,0.1);
  border: 1px solid rgba(255,71,71,0.4);
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 9px;
  font-family: var(--mono);
  letter-spacing: 1px;
}

/* ══════════════════════════════════════════════════════════════════════════
   Responsive
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 680px) {
  .mx-module { max-width: 100%; flex: 1 1 calc(50% - 4px); }
  .mx-fx-row { gap: 4px; }
}

/* ══════════════════════════════════════════════════════════════════════════
   Loop Roll section
   ══════════════════════════════════════════════════════════════════════════ */
.mx-roll-section {
  background: rgba(6,6,20,0.9);
  border: 1px solid rgba(37,232,255,0.2);
  border-radius: 4px;
  padding: 7px 8px;
}

.mx-roll-row {
  display: flex;
  gap: 4px;
}

.mx-roll-btn {
  flex: 1;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 1px;
  color: rgba(37,232,255,0.7);
  background: rgba(37,232,255,0.06);
  border: 1px solid rgba(37,232,255,0.22);
  border-radius: 4px;
  padding: 9px 0;
  cursor: pointer;
  user-select: none;
  touch-action: none;
  transition: background 0.08s, border-color 0.08s, color 0.08s, box-shadow 0.08s;
}
.mx-roll-btn:hover {
  background: rgba(37,232,255,0.12);
  border-color: rgba(37,232,255,0.5);
  color: #25e8ff;
}
.mx-roll-btn.active {
  color: #fff;
  background: rgba(37,232,255,0.22);
  border-color: #25e8ff;
  animation: mx-roll-pulse 0.35s ease-in-out infinite alternate;
}

@keyframes mx-roll-pulse {
  from { box-shadow: 0 0 6px rgba(37,232,255,0.5), 0 0 14px rgba(37,232,255,0.2); }
  to   { box-shadow: 0 0 14px rgba(37,232,255,0.9), 0 0 28px rgba(37,232,255,0.45); }
}

/* ── Custom loop capture row ────────────────────────────────────────── */
.mx-loop-custom {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 5px;
}

/* Loop length knob — compact fit inside the custom row */
.mx-looplen-knob {
  flex-shrink: 0;
  margin: 0 2px;
}
.mx-looplen-knob .mx-knob-val {
  font-size: 8px;
}
.mx-looplen-knob .mx-knob-lbl {
  font-size: 7px;
}

.mx-loop-rec-btn {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 1px;
  color: rgba(255,80,80,0.8);
  background: rgba(255,40,40,0.07);
  border: 1px solid rgba(255,60,60,0.3);
  border-radius: 4px;
  padding: 7px 10px;
  cursor: pointer;
  user-select: none;
  touch-action: none;
  transition: background 0.08s, border-color 0.08s, color 0.08s, box-shadow 0.08s;
  white-space: nowrap;
}
.mx-loop-rec-btn:hover {
  background: rgba(255,40,40,0.14);
  border-color: rgba(255,60,60,0.6);
  color: #ff6060;
}
.mx-loop-rec-btn.recording {
  color: #fff;
  background: rgba(255,30,30,0.28);
  border-color: #ff3a3a;
  animation: mx-rec-pulse 0.4s ease-in-out infinite alternate;
}
.mx-loop-rec-btn.looping {
  color: #25e8ff;
  border-color: rgba(37,232,255,0.5);
  background: rgba(37,232,255,0.08);
}

@keyframes mx-rec-pulse {
  from { box-shadow: 0 0 5px rgba(255,40,40,0.6); }
  to   { box-shadow: 0 0 14px rgba(255,50,50,0.95), 0 0 24px rgba(255,30,30,0.4); }
}

.mx-loop-len {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 1px;
  color: #25e8ff;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(37,232,255,0.18);
  border-radius: 4px;
  padding: 6px 8px;
  min-width: 54px;
  text-align: center;
  flex-shrink: 0;
}

.mx-loop-exit-btn {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 0.5px;
  color: rgba(255,80,80,0.7);
  background: rgba(255,40,40,0.06);
  border: 1px solid rgba(255,60,60,0.25);
  border-radius: 4px;
  padding: 7px 10px;
  cursor: pointer;
  user-select: none;
  transition: background 0.08s, border-color 0.08s, color 0.08s;
  white-space: nowrap;
  margin-left: auto;
}
.mx-loop-exit-btn:hover:not(:disabled) {
  background: rgba(255,40,40,0.14);
  border-color: rgba(255,60,60,0.55);
  color: #ff6060;
}
.mx-loop-exit-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

/* ══════════════════════════════════════════════════════════════════════════
   Mic PTT section
   ══════════════════════════════════════════════════════════════════════════ */
.mx-mic-section {
  background: rgba(6,6,20,0.9);
  border: 1px solid rgba(255,60,60,0.25);
  border-radius: 4px;
  padding: 7px 8px;
}

.mx-mic-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.mx-ptt-btn {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #ff6060;
  background: rgba(255,40,40,0.08);
  border: 2px solid rgba(255,60,60,0.45);
  border-radius: 6px;
  padding: 10px 24px;
  cursor: pointer;
  width: 100%;
  transition: background 0.12s, border-color 0.12s, color 0.12s, box-shadow 0.12s;
  user-select: none;
  touch-action: none;
}
.mx-ptt-btn:hover {
  background: rgba(255,40,40,0.15);
  border-color: rgba(255,60,60,0.7);
}
.mx-ptt-btn.active {
  color: #fff;
  background: rgba(255,30,30,0.3);
  border-color: #ff3a3a;
  box-shadow: 0 0 12px rgba(255,50,50,0.7), 0 0 28px rgba(255,50,50,0.35);
  animation: mx-ptt-pulse 0.9s ease-in-out infinite;
}

.mx-ptt-status {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 1.5px;
  color: transparent;
  min-height: 14px;
  transition: color 0.2s;
}
.mx-ptt-status.active {
  color: #25e8ff;
  text-shadow: 0 0 8px rgba(37,232,255,0.6);
}

@keyframes mx-ptt-pulse {
  0%, 100% { box-shadow: 0 0 10px rgba(255,50,50,0.65), 0 0 24px rgba(255,50,50,0.3); }
  50%       { box-shadow: 0 0 18px rgba(255,80,80,0.9), 0 0 40px rgba(255,50,50,0.5); }
}
