﻿/**
 * ════════════════════════════════════════════════
 * n-amine STUDIO — DAW Styles
 * ════════════════════════════════════════════════
 *
 * BEM naming: .daw__
 * Consistent with n-amine design aesthetic:
 * monospace, all-caps, black/white/grey.
 */

/* ── Container ─────────────────────────────── */

.daw {
  position: relative;
  width: 100%;
  background: #0a0a0a;
  border: 1px solid #222;
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 11px;
  color: #888;
  text-transform: uppercase;
  user-select: none;
  overflow: hidden;
}

.daw input,
.daw input[type="range"] {
  accent-color: #fff;
}

.daw input[type="range"]::-webkit-slider-thumb {
  background: #fff;
}

.daw input[type="range"]::-moz-range-thumb {
  background: #fff;
  border-color: #fff;
}

/* ── Toolbar ───────────────────────────────── */

.daw__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 0 12px;
  background: #111;
  border-bottom: 1px solid #222;
  gap: 16px;
  flex-wrap: wrap;
}

.daw__transport {
  display: flex;
  align-items: center;
  gap: 6px;
}

.daw__toolbar-center {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.daw__toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.daw__time-display {
  font-size: 14px;
  color: #fff;
  letter-spacing: 1px;
  margin-left: 8px;
  min-width: 85px;
}

.daw__time-seconds {
  font-size: 11px;
  color: #555;
  margin-left: 4px;
}

/* ── Buttons ───────────────────────────────── */

.daw__btn {
  background: #1a1a1a;
  border: 1px solid #333;
  color: #888;
  padding: 4px 10px;
  font-family: inherit;
  font-size: 11px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.1s;
  letter-spacing: 0.5px;
}

.daw__btn:hover {
  background: #222;
  color: #ccc;
  border-color: #555;
}

.daw__btn--active {
  background: #333;
  color: #fff;
  border-color: #666;
}

.daw__btn--center-follow {
  border-color: #aaa;
}

.daw__btn--mute.daw__btn--active {
  color: #fff;
}

.daw__btn--solo.daw__btn--active {
  color: #fff;
}

.daw__btn--add-track {
  width: 100%;
  margin-top: 4px;
  border-style: dashed;
  color: #555;
}

.daw__btn--add-track:hover {
  color: #888;
  border-color: #555;
}

.daw__btn--delete {
  padding: 1px 5px;
  font-size: 9px;
  color: #555;
  border-color: #2a2a2a;
  background: transparent;
  margin-left: auto;
  line-height: 1;
}

.daw__btn--delete:hover {
  color: #fff;
  border-color: #fff;
}

.daw__btn--add-fx {
  padding: 1px 5px;
  font-size: 8px;
  color: #555;
  border-style: dashed;
  border-color: #2a2a2a;
  background: transparent;
}

.daw__btn--add-fx:hover {
  color: #888;
  border-color: #555;
}

.daw__btn--zoom {
  padding: 2px 8px;
  font-size: 12px;
  min-width: 24px;
  text-align: center;
}

.daw__btn--timebase {
  padding: 2px 6px;
  font-size: 9px;
  letter-spacing: 1px;
}

.daw__waveform-zoom {
  -webkit-appearance: none;
  appearance: none;
  width: 52px;
  height: 3px;
  background: #333;
  outline: none;
  cursor: pointer;
}

.daw__waveform-zoom::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 8px;
  height: 12px;
  background: #666;
  border: none;
  cursor: pointer;
}

/* ── Tempo / Snap ──────────────────────────── */

.daw__tempo-label,
.daw__snap-label {
  color: #555;
  font-size: 10px;
}

.daw__tempo-input {
  width: 48px;
  background: #1a1a1a;
  border: 1px solid #333;
  color: #ccc;
  padding: 2px 4px;
  font-family: inherit;
  font-size: 11px;
  text-align: center;
}

.daw__snap-select {
  background: #1a1a1a;
  border: 1px solid #333;
  color: #ccc;
  padding: 2px 4px;
  font-family: inherit;
  font-size: 10px;
  max-width: 80px;
}

/* ── Body Layout ───────────────────────────── */

.daw__body {
  display: flex;
  height: 400px;
  position: relative;
}

/* ── Track Headers ─────────────────────────── */

.daw__tracks {
  width: 210px;
  min-width: 210px;
  background: #0d0d0d;
  border-right: 1px solid #222;
  overflow-y: auto;
  padding-top: 24px;  /* align with ruler */
}

.daw__track-header {
  border-bottom: 1px solid #1a1a1a;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.daw__track-title {
  display: flex;
  align-items: center;
  gap: 4px;
}

.daw__track-name {
  font-size: 10px;
  color: #888;
  letter-spacing: 1px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  flex: 1;
}

.daw__track-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.daw__track-waveform-zoom {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 2px;
}

.daw__track-mini-label {
  color: #555;
  font-size: 8px;
  letter-spacing: 0.5px;
}

.daw__track-controls .daw__btn {
  padding: 2px 6px;
  font-size: 9px;
  min-width: 20px;
  text-align: center;
}

.daw__track-vol,
.daw__track-pan {
  -webkit-appearance: none;
  appearance: none;
  width: 40px;
  height: 3px;
  background: #333;
  outline: none;
  cursor: pointer;
}

.daw__track-vol::-webkit-slider-thumb,
.daw__track-pan::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 8px;
  height: 12px;
  background: #666;
  border: none;
  cursor: pointer;
}

/* ── Track FX Row ──────────────────────────── */

.daw__track-fx-row {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 3px;
  flex-wrap: wrap;
}

.daw__fx-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 3px;
  font-size: 7px;
  color: #888;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.daw__fx-tag--bypassed {
  color: #444;
  border-color: #222;
  opacity: 0.72;
}

.daw__fx-bypass {
  background: transparent;
  border: 1px solid #333;
  color: #444;
  font-family: inherit;
  font-size: 8px;
  line-height: 1;
  width: 14px;
  height: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.daw__fx-bypass--active {
  color: #fff;
  border-color: #777;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}

.daw__fx-open {
  color: inherit;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0 1px;
}

.daw__fx-tag:hover {
  color: #ccc;
  border-color: #555;
}

.daw__fx-tag-x {
  background: none;
  border: none;
  color: #555;
  font-size: 8px;
  cursor: pointer;
  padding: 0 1px;
  font-family: inherit;
  text-transform: uppercase;
  line-height: 1;
}

.daw__fx-tag-x:hover {
  color: #fff;
}

/* ── FX Dropdown ───────────────────────────── */

.daw__fx-dropdown {
  position: absolute;
  z-index: 200;
  background: #111;
  border: 1px solid #333;
  min-width: 120px;
  max-height: 200px;
  overflow-y: auto;
}

.daw__fx-option {
  padding: 5px 10px;
  font-size: 9px;
  color: #888;
  cursor: pointer;
  letter-spacing: 0.5px;
}

.daw__fx-option:hover {
  background: #222;
  color: #fff;
}

.daw__fx-option--import {
  border-top: 1px solid #2a2a2a;
  color: #555;
  font-style: italic;
}

.daw__fx-option--import:hover {
  color: #ccc;
}

/* ── Plugin Editor Panel ───────────────────── */

.daw__plugin-editor {
  position: absolute;
  z-index: 150;
  background: #111;
  border: 1px solid #333;
  padding: 12px;
  min-width: 260px;
  max-width: min(520px, calc(100% - 24px));
}

.daw__plugin-editor-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  margin-bottom: 8px;
}

.daw__plugin-editor-name {
  font-size: 10px;
  color: #ccc;
  letter-spacing: 1px;
  margin-right: auto;
}

.daw__btn--close-editor,
.daw__btn--plugin-bypass {
  padding: 1px 5px;
  font-size: 9px;
}

/* ── DAW Knobs ─────────────────────────────── */

.daw-knob-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.daw-knob {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 58px;
  cursor: pointer;
}

.daw-knob__svg {
  width: 48px;
  height: 48px;
}

.daw-knob__value {
  font-size: 9px;
  color: #888;
  margin-top: 1px;
  text-align: center;
  white-space: nowrap;
}

.daw-knob__label {
  font-size: 8px;
  color: #555;
  text-align: center;
  letter-spacing: 0.5px;
}

.daw__smart-tooltip {
  position: absolute;
  z-index: 300;
  width: 248px;
  background: #181818;
  border: 1px solid #555;
  color: #d0d0d0;
  padding: 8px 10px;
  font-size: 10px;
  line-height: 1.45;
  letter-spacing: 0;
  text-transform: none;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
}

/* ── Timeline Canvas ───────────────────────── */

.daw__timeline {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.daw__timeline-canvas {
  width: 100%;
  height: calc(100% - 10px);
  display: block;
}

.daw__drop-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #333;
  font-size: 14px;
  letter-spacing: 3px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}

.daw__empty-state {
  position: absolute;
  inset: 24px 0 10px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #444;
  pointer-events: none;
}

.daw__empty-import {
  pointer-events: auto;
  border: 1px dashed #444;
  color: #888;
  background: rgba(16,16,16,0.92);
  padding: 10px 18px;
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 2px;
  cursor: pointer;
}

.daw__empty-import:hover {
  border-color: #888;
  color: #fff;
}

.daw__empty-sub {
  font-size: 9px;
  letter-spacing: 2px;
  color: #333;
}

/* ── Horizontal Scrollbar ──────────────────── */

.daw__h-scrollbar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 10px;
  background: #0d0d0d;
  border-top: 1px solid #1a1a1a;
}

.daw__h-scrollbar-thumb {
  position: absolute;
  top: 1px;
  height: 8px;
  background: #333;
  min-width: 20px;
  cursor: grab;
  border-radius: 1px;
}

.daw__h-scrollbar-thumb:hover {
  background: #444;
}

.daw__h-scrollbar-thumb:active {
  background: #555;
  cursor: grabbing;
}

/* ── Mixer ─────────────────────────────────── */

.daw__mixer-container {
  width: 80px;
  min-width: 80px;
  background: #0d0d0d;
  border-left: 1px solid #222;
  display: flex;
  align-items: center;
  justify-content: center;
}

.daw__mixer {
  text-align: center;
}

.daw__mixer-master {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.daw__mixer-label {
  font-size: 9px;
  color: #555;
  letter-spacing: 2px;
}

.daw__mixer-meter-canvas {
  border: 1px solid #222;
}

.daw__mixer-clip-light {
  width: 34px;
  padding: 2px 0;
  border: 1px solid #333;
  color: #555;
  background: #111;
  font-size: 8px;
  letter-spacing: 1px;
}

.daw__mixer-clip-light--active {
  color: #fff;
  background: #fff;
  border-color: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.75);
}

.daw__mixer-fader {
  writing-mode: vertical-lr;
  direction: rtl;
  width: 20px;
  height: 80px;
  background: #1a1a1a;
}

.daw__mixer-db {
  font-size: 9px;
  color: #666;
}

/* ── Scrollbar styling ─────────────────────── */

.daw__tracks::-webkit-scrollbar {
  width: 4px;
}

.daw__tracks::-webkit-scrollbar-track {
  background: #0a0a0a;
}

.daw__tracks::-webkit-scrollbar-thumb {
  background: #333;
}

.daw__fx-dropdown::-webkit-scrollbar {
  width: 4px;
}

.daw__fx-dropdown::-webkit-scrollbar-track {
  background: #111;
}

.daw__fx-dropdown::-webkit-scrollbar-thumb {
  background: #333;
}
