/* =========================================================================
   Every Praise — Song Trainer
   Scoped styling for the lesson's three simultaneous instrument keyboards
   (Alto, Piano Right Hand, Piano Left Hand). Deliberately namespaced with
   an "ep-" prefix and scoped under #ep-instruments / .ep-* classes so it
   can't collide with the shared design system in styles.css.
   ========================================================================= */

#ep-instruments {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 1.25rem 0;
}

.ep-instrument-panel {
  background: var(--stage-raised);
  border: 1px solid var(--stage-line);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}
.ep-instrument-panel.is-muted {
  opacity: 0.5;
}

.ep-instrument-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.ep-instrument-header h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--ivory);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.ep-instrument-header h3::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ep-inst-color, var(--brass));
  flex: none;
}

.ep-mute-toggle {
  font-size: 0.85rem;
  color: var(--ivory-dim);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
}

.ep-keyboard-scroller {
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: 8px;
  background: var(--stage);
  padding: 8px 0 12px;
}

.ep-keyboard {
  position: relative;
  height: 130px;
  touch-action: pan-x;
}

.ep-white-layer, .ep-black-layer {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
}

.ep-key {
  position: absolute;
  top: 0;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transition: background-color 0.06s ease;
}

.ep-white-key {
  width: 26px;
  height: 130px;
  background: var(--ivory);
  border: 1px solid var(--stage-line);
  border-radius: 0 0 4px 4px;
  z-index: 1;
}

.ep-black-key {
  width: 16px;
  height: 80px;
  background: var(--ink);
  border: 1px solid #000;
  border-radius: 0 0 3px 3px;
  z-index: 2;
}

.ep-key-label {
  font-size: 7px;
  color: #444;
  margin-bottom: 4px;
  pointer-events: none;
  writing-mode: horizontal-tb;
}

.ep-black-label {
  color: #ccc;
  font-size: 6.5px;
  margin-bottom: 3px;
}

.ep-white-key.is-active {
  background: var(--ep-hl, var(--brass));
  border-color: var(--ep-hl, var(--brass));
}
.ep-white-key.is-active .ep-key-label { color: #10121a; font-weight: 700; }

.ep-black-key.is-active {
  background: var(--ep-hl, var(--brass));
  border-color: var(--ep-hl, var(--brass));
}
.ep-black-key.is-active .ep-key-label { color: #10121a; font-weight: 700; }

/* Transport strip: reuses .card / .controls-row / .field / .actions-row
   from styles.css, plus the small pieces below for the seek bar row. */
.ep-seek-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.ep-seek-row input[type="range"] {
  flex: 1;
}
.ep-seek-row span {
  font-variant-numeric: tabular-nums;
  color: var(--ivory-dim);
  font-size: 0.85rem;
  min-width: 90px;
  text-align: right;
}

@media (max-width: 640px) {
  .ep-instrument-panel { padding: 0.75rem; }
}
