/* ============================================================================
   STUDIO RECORDING BOOTH — mixer console styling
   A dark, brushed-metal console with channel strips, vertical faders,
   LED VU meters, and a transport bar. Designed to sit inside .panel.
   ============================================================================ */

.mixer-panel {
  background:
    linear-gradient(180deg, rgba(53,194,255,0.05), transparent 120px),
    var(--panel);
}

/* ---- Console shell ------------------------------------------------------- */
.mixer-console {
  margin-top: 14px;
  border: 1px solid #0a0c10;
  border-radius: 14px;
  padding: 16px 16px 18px;
  background:
    linear-gradient(180deg, #23262e 0%, #191c22 12%, #14161b 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    inset 0 -2px 6px rgba(0,0,0,0.55),
    0 10px 30px rgba(0,0,0,0.45);
  position: relative;
}
/* subtle brushed-metal texture */
.mixer-console::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(255,255,255,0.012) 0px,
    rgba(255,255,255,0.012) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: 0.6;
}

/* ---- Transport bar ------------------------------------------------------- */
.mixer-transport {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: relative;
  z-index: 1;
}
.mx-btn {
  font: inherit;
  font-size: 12.5px;
  color: var(--text);
  background: linear-gradient(180deg, #2c313b, #20242c);
  border: 1px solid #0c0e12;
  border-radius: 8px;
  padding: 7px 12px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 2px 4px rgba(0,0,0,0.4);
  transition: transform .06s ease, background .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.mx-btn:hover:not(:disabled) { background: linear-gradient(180deg, #343a46, #262b34); }
.mx-btn:active:not(:disabled) { transform: translateY(1px); box-shadow: inset 0 2px 4px rgba(0,0,0,0.5); }
.mx-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.mx-song-name {
  font-size: 12px;
  color: var(--text-dim);
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.05);
  font-variant-numeric: tabular-nums;
}
.mx-song-name.empty { font-style: italic; opacity: 0.7; }

.mx-transport-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mx-time {
  font-size: 12.5px;
  color: var(--accent-2);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
  min-width: 92px;
  text-align: right;
  text-shadow: 0 0 8px rgba(53,194,255,0.35);
}

/* ---- Seek bar ------------------------------------------------------------ */
.mx-seek {
  height: 10px;
  margin: 12px 0 16px;
  border-radius: 6px;
  background: linear-gradient(180deg, #0c0e12, #16191f);
  border: 1px solid #0a0c10;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.6);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  z-index: 1;
}
.mx-seek-fill {
  height: 100%;
  width: 0%;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--accent-2), #7fe0ff);
  box-shadow: 0 0 10px rgba(53,194,255,0.5);
  transition: width .05s linear;
}

/* ---- Channel strips ------------------------------------------------------ */
.mx-strips {
  display: flex;
  gap: 14px;
  justify-content: center;
  align-items: stretch;
  padding: 6px 0 4px;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
}
.mx-strip {
  flex: 1 1 0;
  min-width: 96px;
  max-width: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 8px 10px;
  border-radius: 10px;
  background: linear-gradient(180deg, #1c2027, #14171c);
  border: 1px solid #0a0c10;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 3px 8px rgba(0,0,0,0.4);
}
.mx-strip-master {
  background: linear-gradient(180deg, #20262f, #161a20);
  border-color: #0d1015;
}
.mx-strip-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: var(--text-dim);
  text-transform: uppercase;
}
.mx-strip-master .mx-strip-label { color: var(--accent-2); }

/* ---- VU meter ------------------------------------------------------------ */
.mx-meter {
  display: flex;
  flex-direction: column-reverse; /* index 0 renders at the bottom */
  gap: 2px;
  width: 22px;
  height: 132px;
  padding: 3px;
  border-radius: 5px;
  background: #0a0c10;
  border: 1px solid #050608;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.8);
}
.mx-seg {
  flex: 1 1 0;
  border-radius: 2px;
  background: #1a1d23;
  transition: background .04s linear, box-shadow .04s linear;
}
.mx-seg.seg-green.on  { background: #35ff9e; box-shadow: 0 0 6px rgba(53,255,158,0.7); }
.mx-seg.seg-yellow.on { background: #ffd23f; box-shadow: 0 0 6px rgba(255,210,63,0.7); }
.mx-seg.seg-red.on    { background: #ff4d5e; box-shadow: 0 0 7px rgba(255,77,94,0.8); }

/* ---- Vertical fader ------------------------------------------------------ */
.mx-fader {
  -webkit-appearance: none;
  appearance: none;
  writing-mode: vertical-lr;
  direction: rtl;
  width: 30px;
  height: 132px;
  background: transparent;
  cursor: pointer;
  margin: 0;
}
.mx-fader::-webkit-slider-runnable-track {
  width: 8px;
  border-radius: 5px;
  background: linear-gradient(180deg, #0a0c10, #1a1e25);
  border: 1px solid #050608;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.7);
}
.mx-fader::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 30px;
  height: 16px;
  margin-left: -11px;
  border-radius: 4px;
  background: linear-gradient(180deg, #e9edf3, #aab2bf 55%, #7d8593);
  border: 1px solid #050608;
  box-shadow: 0 2px 4px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.8);
}
.mx-fader::-webkit-slider-thumb::after { content: ""; }
.mx-fader::-moz-range-track {
  width: 8px;
  border-radius: 5px;
  background: #12151a;
}
.mx-fader::-moz-range-thumb {
  width: 28px;
  height: 15px;
  border-radius: 4px;
  background: linear-gradient(180deg, #e9edf3, #aab2bf);
  border: 1px solid #050608;
}

.mx-db {
  font-size: 11px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.3px;
}

/* ---- Strip buttons (M / S / monitor) ------------------------------------ */
.mx-strip-btns { display: flex; gap: 5px; }
.mx-mini {
  font: inherit;
  font-size: 10.5px;
  font-weight: 700;
  width: 26px;
  height: 22px;
  border-radius: 5px;
  cursor: pointer;
  color: var(--text-dim);
  background: linear-gradient(180deg, #2a2f38, #1d2129);
  border: 1px solid #0a0c10;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  transition: all .12s ease;
}
.mx-mini:hover { color: var(--text); }
.mx-mini.active {
  color: #06202b;
  background: linear-gradient(180deg, #ffd23f, #f0b400);
  border-color: #7a5c00;
  box-shadow: 0 0 8px rgba(255,210,63,0.5);
}
.mx-mini.mute.active {
  color: #2b060a;
  background: linear-gradient(180deg, #ff6b7a, #e23b4c);
  border-color: #7a0f1a;
  box-shadow: 0 0 8px rgba(255,77,94,0.5);
}
.mx-mini.monitor.active {
  color: #06202b;
  background: linear-gradient(180deg, #7fe0ff, #35c2ff);
  border-color: #0a5a7a;
  box-shadow: 0 0 8px rgba(53,194,255,0.6);
}

/* ---- Record row ---------------------------------------------------------- */
.mx-record-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
  position: relative;
  z-index: 1;
}
.mx-record-btn {
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #fff;
  background: linear-gradient(180deg, #ff5a6b, #d81f33);
  border: 1px solid #7a0f1a;
  border-radius: 10px;
  padding: 11px 22px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(216,31,51,0.4), inset 0 1px 0 rgba(255,255,255,0.25);
  transition: transform .06s ease, box-shadow .15s ease;
}
.mx-record-btn:hover:not(:disabled) { box-shadow: 0 6px 18px rgba(216,31,51,0.55), inset 0 1px 0 rgba(255,255,255,0.3); }
.mx-record-btn:active:not(:disabled) { transform: translateY(1px); }
.mx-record-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.mx-record-btn.recording {
  animation: mxRecPulse 1.1s ease-in-out infinite;
}
@keyframes mxRecPulse {
  0%, 100% { box-shadow: 0 4px 12px rgba(216,31,51,0.4), inset 0 1px 0 rgba(255,255,255,0.25); }
  50%      { box-shadow: 0 0 22px rgba(255,77,94,0.9), inset 0 1px 0 rgba(255,255,255,0.35); }
}
.mx-rec-timer {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
  color: var(--accent);
  min-width: 58px;
  text-shadow: 0 0 8px rgba(255,107,53,0.4);
}
.mx-rec-status {
  font-size: 12px;
  color: var(--text-dim);
  flex: 1 1 160px;
}

/* ---- Click / metronome row ---------------------------------------------- */
.mx-click-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
  position: relative;
  z-index: 1;
}
.mx-btn.on {
  color: #06202b;
  background: linear-gradient(180deg, #7fe0ff, #35c2ff);
  border-color: #0a5a7a;
  box-shadow: 0 0 10px rgba(53,194,255,0.55), inset 0 1px 0 rgba(255,255,255,0.3);
}
.mx-bpm {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  letter-spacing: 1px;
  color: var(--text-dim);
  text-transform: uppercase;
}
.mx-bpm input {
  width: 62px;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  background: #0c0e12;
  border: 1px solid #0a0c10;
  border-radius: 6px;
  padding: 6px 8px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.6);
  font-variant-numeric: tabular-nums;
}
.mx-beats { display: flex; gap: 6px; margin-left: auto; }
.mx-beat {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #14171c;
  border: 1px solid #0a0c10;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.7);
  transition: background .05s linear, box-shadow .05s linear;
}
.mx-beat.on {
  background: #35ff9e;
  box-shadow: 0 0 10px rgba(53,255,158,0.8);
}
.mx-beat.on.downbeat {
  background: #ff6b35;
  box-shadow: 0 0 12px rgba(255,107,53,0.9);
}

/* ---- Take bar ------------------------------------------------------------ */
.mx-take-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(53,255,158,0.08), rgba(53,255,158,0.02));
  border: 1px solid rgba(53,255,158,0.35);
  position: relative;
  z-index: 1;
}
.mx-take-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent-3);
  letter-spacing: 0.3px;
}
.mx-btn.mx-keep {
  color: #06241a;
  background: linear-gradient(180deg, #6bffb0, #35ff9e);
  border-color: #0a5a3a;
  box-shadow: 0 0 10px rgba(53,255,158,0.5), inset 0 1px 0 rgba(255,255,255,0.3);
}

/* ---- Count-in overlay ---------------------------------------------------- */
.mx-countin {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: rgba(7,8,10,0.72);
  backdrop-filter: blur(2px);
  z-index: 5;
  pointer-events: none;
}
.mx-countin-num {
  font-size: 92px;
  font-weight: 800;
  line-height: 1;
  color: var(--accent-2);
  text-shadow: 0 0 30px rgba(53,194,255,0.7);
  animation: mxCountPop .5s ease-out;
}
.mx-countin-cap {
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-dim);
}
@keyframes mxCountPop {
  0%   { transform: scale(1.6); opacity: 0; }
  40%  { transform: scale(1);   opacity: 1; }
  100% { transform: scale(1);   opacity: 1; }
}

/* ---- Headphone warning --------------------------------------------------- */
.mx-headphone-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 0;
  padding: 8px 12px;
  font-size: 12px;
  color: #ffd9a8;
  background: rgba(255,107,53,0.10);
  border: 1px solid rgba(255,107,53,0.35);
  border-radius: 8px;
  position: relative;
  z-index: 1;
}
.mx-headphone-note b { color: #ffb27a; }

@media (max-width: 560px) {
  .mx-strips { gap: 8px; }
  .mx-strip { min-width: 78px; padding: 10px 5px 8px; }
  .mx-meter, .mx-fader { height: 108px; }
  .mx-song-name { max-width: 150px; }
}

/* ============================================================================
   HIGH-TECH STUDIO RACK (D3) — loop region, input scope, tuner, input
   conditioning, and the multi-take list.
   ============================================================================ */

/* ---- Loop region row ----------------------------------------------------- */
.mx-loop-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 16px;
  position: relative;
  z-index: 1;
}
.mx-loop-row .mx-btn { font-size: 11.5px; padding: 6px 10px; }
.mx-loop-row .mx-btn.active {
  color: #08151a;
  background: linear-gradient(180deg, #7fe0ff, #35c2ff);
  border-color: #0a4a66;
  box-shadow: 0 0 10px rgba(53,194,255,0.55);
}
.mx-loop-readout {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}
.mx-seek-in, .mx-seek-out {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 2;
}
.mx-seek-in { background: var(--accent-3); box-shadow: 0 0 8px rgba(53,255,158,0.85); }
.mx-seek-out { background: var(--accent); box-shadow: 0 0 8px rgba(255,107,53,0.85); }

/* ---- Studio rack --------------------------------------------------------- */
.mx-rack {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 12px;
  margin: 4px 0 16px;
  position: relative;
  z-index: 1;
}
.mx-scope-card, .mx-tuner-card, .mx-input-card {
  border: 1px solid #0a0c10;
  border-radius: 10px;
  padding: 10px 12px 12px;
  background: linear-gradient(180deg, #1b1f27, #14161b);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), inset 0 -2px 6px rgba(0,0,0,0.5);
}
.mx-input-card { grid-column: 1 / -1; }
.mx-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.mx-card-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--accent-2);
  padding: 2px 7px;
  border-radius: 20px;
  border: 1px solid rgba(53,194,255,0.3);
  background: rgba(53,194,255,0.08);
  text-transform: uppercase;
}
.mx-scope, .mx-tuner {
  display: block;
  width: 100%;
  height: 96px;
  border-radius: 8px;
  background: radial-gradient(120% 120% at 50% 0%, #0b0e13, #06080b 70%);
  border: 1px solid #05070a;
  box-shadow: inset 0 0 22px rgba(0,0,0,0.8);
}
.mx-tuner { height: 72px; margin-top: 4px; }
.mx-tuner-note {
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
  letter-spacing: -1px;
  text-shadow: 0 0 16px rgba(53,194,255,0.4);
}
.mx-tuner-cents {
  font-size: 11.5px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  margin-top: 4px;
}

/* ---- Input conditioning -------------------------------------------------- */
.mx-knob-row {
  display: grid;
  grid-template-columns: 150px 1fr auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--text-dim);
}
.mx-knob-row label { display: flex; align-items: center; gap: 6px; }
.mx-knob-row input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 4px;
  background: linear-gradient(180deg, #0c0e12, #1b1f27);
  border: 1px solid #0a0c10;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.6);
}
.mx-knob-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #7fe0ff, #35c2ff 60%, #1c7fb0);
  border: 1px solid #0a4a66;
  box-shadow: 0 0 8px rgba(53,194,255,0.6);
  cursor: pointer;
}
.mx-knob-row input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #7fe0ff, #35c2ff 60%, #1c7fb0);
  border: 1px solid #0a4a66;
  cursor: pointer;
}
.mx-kv {
  font-size: 11.5px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  min-width: 52px;
  text-align: right;
}
.mx-gate-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.mx-gate-toggle input { accent-color: var(--accent-3); }
.mx-gate-toggle.armed span { color: var(--accent-3); }
.mx-gate-toggle.open span::after { content: " \25cf"; color: var(--accent-3); }
.mx-rack-note {
  margin: 6px 0 0;
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ---- Multi-take list ----------------------------------------------------- */
.mx-takes {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(53,194,255,0.05), rgba(53,194,255,0.01));
  border: 1px solid rgba(53,194,255,0.25);
  position: relative;
  z-index: 1;
}
.mx-takes-head {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent-2);
  margin-bottom: 8px;
}
.mx-take-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.mx-take {
  display: grid;
  grid-template-columns: 26px 1fr auto auto auto;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(0,0,0,0.28);
  border: 1px solid #0a0c10;
  cursor: pointer;
  transition: border-color .12s, background .12s;
}
.mx-take:hover { border-color: rgba(53,194,255,0.4); }
.mx-take.selected {
  border-color: var(--accent-3);
  background: linear-gradient(180deg, rgba(53,255,158,0.12), rgba(53,255,158,0.03));
}
.mx-take-idx {
  font-size: 11px; font-weight: 800; text-align: center;
  color: #08151a; background: var(--accent-2);
  border-radius: 6px; padding: 2px 0;
}
.mx-take-name { font-size: 12.5px; color: var(--text); }
.mx-take-dur { font-size: 11.5px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.mx-take-btn {
  font: inherit; font-size: 11px; padding: 4px 9px;
  border-radius: 6px; cursor: pointer;
  color: var(--text); background: linear-gradient(180deg, #2c313b, #20242c);
  border: 1px solid #0c0e12;
}
.mx-take-btn:hover { background: linear-gradient(180deg, #343a46, #262b34); }
.mx-take-btn.danger { color: #ff8a6b; }
.mx-take-empty { font-size: 12px; color: var(--text-dim); padding: 4px 2px; }

@media (max-width: 640px) {
  .mx-rack { grid-template-columns: 1fr; }
  .mx-knob-row { grid-template-columns: 1fr; }
  .mx-kv { text-align: left; }
}
