/* Practice mode styles */

/* BPM Slider */
.bpm-slider-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 16px;
}
.bpm-slider {
  flex: 1;
  accent-color: var(--primary);
  height: 6px;
  cursor: pointer;
}
.bpm-label {
  font-size: 0.72rem;
  color: var(--text-secondary);
  min-width: 24px;
  text-align: center;
}

/* Metronome tempo display */
.metro-tempo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tempo-adjust {
  width: 36px;
  height: 36px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.tempo-adjust:hover {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

.tempo-display-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
}

.tempo-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.tempo-unit {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Subdivision options */
.metro-options {
  width: 100%;
  padding: 12px 16px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.metro-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.metro-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.metro-btns {
  display: flex;
  gap: 6px;
}

.subdiv-btn {
  padding: 6px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
}

.subdiv-btn:hover {
  border-color: var(--primary);
}

.subdiv-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Input toggles */
.input-section {
  width: 100%;
  display: flex;
  gap: 16px;
  padding: 12px 16px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.input-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}

.input-status {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.input-status.connected {
  color: var(--correct);
}

/* Measure indicator */
.measure-indicator {
  width: 100%;
  padding: 10px 16px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Practice staff - highlight current measure */
#practice-staff {
  width: 100%;
  min-height: 200px;
  transition: background-color 0.15s ease;
}

/* Beat flash indicator */
.beat-flash {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.08s ease;
  display: inline-block;
  margin: 0 2px;
}

.beat-flash.on {
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
}

.beat-flash.accent {
  background: var(--correct, #2ecc71);
  box-shadow: 0 0 8px var(--correct, #2ecc71);
}

/* Shared instrument toggle (visible when Hint or Mic is on) */
.instrument-toggle-section {
  width: 100%;
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 10px 16px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.mic-controls {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 16px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.mic-meter {
  position: relative;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
}
.mic-meter-fill {
  height: 100%;
  width: 0%;
  background: var(--primary);
  border-radius: 4px;
  transition: width 0.05s linear;
}
.mic-meter-threshold {
  position: absolute;
  top: -3px; bottom: -3px;
  width: 2px;
  background: var(--wrong);
  border-radius: 1px;
}
.mic-threshold-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}
.mic-threshold-label input[type="range"] {
  flex: 1;
  accent-color: var(--primary);
}

/* Practice note buttons */
.practice-note-buttons {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 12px 16px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-height: 48px;
}

.practice-note-btn {
  min-width: 48px;
  height: 48px;
  padding: 8px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.12s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.practice-note-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.practice-note-btn:active,
.practice-note-btn.pressed {
  transform: translateY(0);
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.practice-note-btn.correct {
  background: var(--correct);
  border-color: var(--correct);
  color: #fff;
}

.practice-note-btn.wrong {
  background: var(--wrong);
  border-color: var(--wrong);
  color: #fff;
}

.practice-note-btn.rest-btn {
  font-style: italic;
  opacity: 0.7;
  cursor: default;
}

.practice-note-btn.active-note {
  border-color: var(--primary);
  box-shadow: 0 0 8px var(--primary);
}
