/* ── BrowserDAW global layout ─────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

body {
  background: #111;
  color: #ccc;
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  margin: 0;
  padding: 0;
}

/* ── Sticky header ───────────────────────────────────────────────────────── */

.daw-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #0a0a0a;
  border-bottom: 1px solid #333;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.daw-title {
  font-size: 14px;
  font-weight: bold;
  color: #e8520a;
  letter-spacing: 0.2em;
  flex: 0 0 auto;
}

/* ── Global transport ────────────────────────────────────────────────────── */

.global-transport {
  display: flex;
  align-items: center;
  gap: 8px;
}

.global-transport__btn {
  padding: 6px 14px;
  border-radius: 3px;
  border: 1px solid #444;
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: background 0.1s, border-color 0.1s;
}

.global-transport__btn--play {
  background: #1a3a1a;
  color: #4caf50;
  border-color: #2e5e2e;
}

.global-transport__btn--play:hover,
.global-transport__btn--play.is-playing {
  background: #2e6e2e;
  color: #fff;
  border-color: #4caf50;
}

.global-transport__btn--stop {
  background: #1a1a1a;
  color: #888;
  border-color: #333;
}

.global-transport__btn--stop:hover {
  background: #3a1a1a;
  color: #e44;
  border-color: #844;
}

.global-transport__bpm {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #888;
  font-size: 10px;
  letter-spacing: 0.1em;
}

.global-transport__bpm input {
  width: 54px;
  background: #1a1a1a;
  color: #ccc;
  border: 1px solid #333;
  border-radius: 3px;
  padding: 3px 6px;
  text-align: center;
  font-family: inherit;
  font-size: 11px;
}

.global-transport__bpm input:focus {
  outline: 1px solid #e8520a;
  border-color: #e8520a;
}

/* Hide drum machine BPM controls — replaced by clock strips above each section */
#tr808-app .dm-bpm-control,
#tr909-app .dm-bpm-control { display: none; }

/* ── Instrument sections ─────────────────────────────────────────────────── */

.instrument-section {
  padding: 16px 20px;
  border-bottom: 1px solid #1e1e1e;
}

/* ── Per-instrument clock strip ──────────────────────────────────────────── */

.clock-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  font-size: 10px;
  color: #666;
}

.clock-strip__mode {
  display: flex;
  gap: 2px;
}

.clock-strip__mode-btn {
  padding: 3px 8px;
  border: 1px solid #2a2a2a;
  border-radius: 2px;
  background: #111;
  color: #555;
  font-family: inherit;
  font-size: 9px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.1s;
}

.clock-strip__mode-btn:hover {
  border-color: #555;
  color: #999;
}

.clock-strip__mode-btn.is-active {
  background: #222;
  border-color: #666;
  color: #ccc;
}

.clock-strip__bpm {
  display: flex;
  align-items: center;
  gap: 4px;
}

.clock-strip__bpm input {
  width: 50px;
  background: #1a1a1a;
  color: #ccc;
  border: 1px solid #2a2a2a;
  border-radius: 2px;
  padding: 2px 4px;
  text-align: center;
  font-family: inherit;
  font-size: 10px;
}

.clock-strip__bpm input:focus {
  outline: 1px solid #555;
}

/* FREE mode — visually distinct so it's clear this device is running independently */
.clock-strip__bpm-input--free {
  border-color: #5a8a5a !important;
  color: #8ecf8e !important;
}

.clock-strip__mult {
  display: flex;
  align-items: center;
  gap: 4px;
}

.clock-strip__mult select {
  background: #1a1a1a;
  color: #ccc;
  border: 1px solid #2a2a2a;
  border-radius: 2px;
  padding: 2px 4px;
  font-family: inherit;
  font-size: 10px;
}

.clock-strip__mult select:disabled {
  opacity: 0.35;
}

/* ── Mixer section ───────────────────────────────────────────────────────── */

#mixer-section {
  padding: 16px 20px 24px;
}

#mixer-section h2 {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: #555;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.mixer-strips {
  display: flex;
  gap: 1px;
  background: #1a1a1a;
  border: 1px solid #222;
  border-radius: 6px;
  overflow: hidden;
  width: fit-content;
}

.mixer-strip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 10px;
  background: #161616;
  min-width: 72px;
}

.mixer-strip--master {
  background: #111;
  border-left: 1px solid #333;
}

.mixer-strip__label {
  font-size: 9px;
  letter-spacing: 0.15em;
  color: #666;
  text-transform: uppercase;
}

.mixer-strip--master .mixer-strip__label {
  color: #888;
}

.mixer-strip__fader {
  writing-mode: vertical-lr;
  direction: rtl;
  width: 24px;
  height: 80px;
  cursor: pointer;
  accent-color: #e8520a;
}

.mixer-strip__pan {
  width: 54px;
  cursor: pointer;
  accent-color: #666;
}

.mixer-strip__mute {
  padding: 3px 8px;
  border: 1px solid #2a2a2a;
  border-radius: 2px;
  background: #111;
  color: #555;
  font-family: inherit;
  font-size: 9px;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.1s;
}

.mixer-strip__mute:hover {
  border-color: #555;
  color: #999;
}

.mixer-strip__mute.is-muted {
  background: #3a1a1a;
  border-color: #844;
  color: #e44;
}

.mixer-strip__value {
  font-size: 8px;
  color: #444;
  min-width: 28px;
  text-align: center;
}
