/* ============================================
   MUSIC TOOLS — Additional Styles
   Extends style.css for music-specific components
   ============================================ */

/* ============================================
   METRONOME STYLES
   ============================================ */

.met-status-banner {
  background: rgba(0,230,138,.12);
  border: 1px solid rgba(0,230,138,.3);
  border-radius: var(--radius-md);
  padding: 10px 18px;
  font-size: 13px;
  color: var(--accent-green);
  text-align: center;
  margin-bottom: 16px;
  font-family: var(--font-mono);
}

/* Tempo segment rows */
.met-tempo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 8px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.met-tempo-row.active-segment {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 2px rgba(0,212,255,.15);
}

.met-seg-bpm {
  font-size: 20px;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--accent-cyan);
  min-width: 60px;
}

.met-seg-info {
  flex: 1;
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.met-badge {
  font-size: 11px;
  background: var(--accent-cyan-dim);
  color: var(--accent-cyan);
  border-radius: 5px;
  padding: 2px 8px;
  font-family: var(--font-mono);
}

.met-badge-alt {
  background: var(--accent-purple-dim);
  color: var(--accent-purple);
}

/* Beat dots */
.met-beat-display {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.met-beat-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-input);
  border: 2px solid var(--border-subtle);
  transition: background 0.08s, box-shadow 0.08s, border-color 0.08s;
}

.met-beat-dot.on-beat {
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 16px rgba(0,212,255,0.45);
}

.met-beat-dot.on-beat-1 {
  background: var(--accent-green);
  border-color: var(--accent-green);
  box-shadow: 0 0 20px rgba(0,230,138,0.5);
}

/* Now playing display */
.met-now-playing {
  text-align: center;
  margin-bottom: 20px;
}

.met-np-bpm {
  font-size: 56px;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--accent-cyan);
  line-height: 1;
  transition: color 0.3s;
}

.met-np-bpm.changed {
  color: var(--accent-orange);
}

.met-np-label {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-top: 4px;
}

.met-np-progress {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 8px;
  font-family: var(--font-mono);
}

.met-np-progress span {
  color: var(--text-primary);
  font-weight: 600;
}

/* Progress bar */
.met-progress-bar-wrap {
  background: var(--bg-input);
  border-radius: 4px;
  height: 6px;
  margin-bottom: 20px;
  overflow: hidden;
}

.met-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  border-radius: 4px;
  transition: width 0.1s linear;
  width: 0%;
}

/* Toggle switches */
.met-toggles {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.met-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}

.met-toggle {
  position: relative;
  width: 40px;
  height: 22px;
  display: inline-block;
}

.met-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.met-toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg-input);
  border-radius: 22px;
  cursor: pointer;
  transition: background 0.2s;
  border: 1px solid var(--border-subtle);
}

.met-toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 2px;
  top: 2px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: transform 0.2s, background 0.2s;
}

.met-toggle input:checked + .met-toggle-slider {
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

.met-toggle input:checked + .met-toggle-slider::before {
  transform: translateX(18px);
  background: #fff;
}

/* Timeline */
.met-tl-bar {
  display: flex;
  height: 28px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  gap: 2px;
}

.met-tl-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #fff;
  border-radius: 4px;
  min-width: 0;
  overflow: hidden;
  transition: opacity 0.2s;
  cursor: default;
}

.met-tl-seg.played { opacity: 0.35; }
.met-tl-seg.current { box-shadow: 0 0 0 2px #fff; opacity: 1; }
.met-tl-seg span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 4px; }


/* ============================================
   SHEET MUSIC CREATOR STYLES
   ============================================ */

.sm-btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.sm-dur-btn, .sm-acc-btn {
  min-width: 70px;
  padding: 8px 14px;
  font-size: 13px;
}

.sm-dur-btn.active,
.sm-acc-btn.active {
  background: var(--accent-cyan-dim) !important;
  border-color: var(--accent-cyan) !important;
  color: var(--accent-cyan) !important;
}

.sm-note-btn {
  width: 48px;
  height: 48px;
  font-size: 18px !important;
  font-weight: 700 !important;
  font-family: var(--font-display) !important;
  padding: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sm-note-btn:hover {
  background: var(--accent-cyan-dim) !important;
  border-color: var(--accent-cyan) !important;
  color: var(--accent-cyan) !important;
}

/* Note list */
.sm-note-list {
  max-height: 300px;
  overflow-y: auto;
}

.sm-note-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 13px;
}

.sm-note-row:last-child { border-bottom: none; }

.sm-note-idx {
  width: 24px;
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
}

.sm-note-name {
  font-weight: 600;
  color: var(--accent-cyan);
  min-width: 50px;
}

.sm-note-dur {
  color: var(--text-secondary);
  flex: 1;
}

/* Score container */
.sm-score-container {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  min-height: 180px;
  overflow-x: auto;
}

.sm-score-container svg {
  display: block;
  margin: 0 auto;
}


/* ============================================
   RESPONSIVE OVERRIDES
   ============================================ */

@media (max-width: 768px) {
  .met-np-bpm { font-size: 40px; }
  .sm-note-btn { width: 42px; height: 42px; font-size: 16px !important; }
  .sm-dur-btn, .sm-acc-btn { min-width: 60px; font-size: 12px; padding: 6px 10px; }
}
