/* BPM to ms — Console layer on top of css/styles.css. */

/* ── Tap switch ──────────────────────────────────────────────────────────
   A momentary switch on the panel, not a filled button: recessed, LED
   legend, lighting on contact. The LED is the signal, not the surface. */
.tap-btn {
  width: 100%;
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-narrow);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-indent: 0.28em;   /* re-centres text that letter-spacing pushes left */
  color: var(--led);
  background: var(--well);
  border: 1px solid #0b0e10;
  border-top-color: #070909;
  border-radius: var(--radius-md);
  box-shadow: var(--inset);
  cursor: pointer;
  touch-action: manipulation;
  transition: background var(--transition), box-shadow var(--transition), color var(--transition);
}
.tap-btn:hover { box-shadow: var(--inset), 0 0 0 1px rgba(0,212,170,.35); }
.tap-btn:active,
.tap-btn.tapping {
  background: rgba(0, 212, 170, 0.13);
  color: var(--led-hi);
  box-shadow: var(--inset), 0 0 0 1px var(--led), 0 0 14px rgba(0,212,170,.28) inset;
}
.tap-btn:focus-visible { outline: 2px solid var(--led); outline-offset: 2px; }

/* Field errors — the slot collapses when empty so the hint tucks straight
   under the input, matching the other tools. */
.error-message {
  color: var(--red);
  font-size: 0.75rem;
  min-height: 0;
}
.error-message:empty { display: none; }
input[aria-invalid="true"] { border-color: var(--red) !important; }
input[aria-invalid="true"]:focus { box-shadow: var(--inset), 0 0 0 2px rgba(228, 87, 61, 0.2) !important; }

/* ── Note value table ────────────────────────────────────────────────────
   A recessed window like the readouts, not a bordered card. */
.table-wrap {
  overflow-x: auto;
  background: var(--well);
  border: 1px solid #0b0e10;
  border-top-color: #070909;
  border-radius: var(--radius-md);
  box-shadow: var(--inset);
}
.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.results-table th,
.results-table td {
  padding: 9px var(--spacing-md);
  text-align: left;
  border-bottom: 1px solid #1b1f23;
}
.results-table tbody tr:last-child td { border-bottom: none; }
.results-table th {
  font-family: var(--font-narrow);
  font-weight: 600;
  font-size: 0.6875rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--faint);
  border-bottom-color: var(--rule-2);
}
.results-table th:last-child { text-align: right; }
.results-table td:first-child {
  font-family: var(--font-mono);
  font-stretch: 87.5%;
  font-size: 0.875rem;
  color: var(--silk);
}
.results-table td:last-child {
  text-align: right;
  font-family: var(--font-mono);
  font-stretch: 87.5%;
  font-variant-numeric: tabular-nums;
  color: var(--led);
}
.results-table tbody tr:hover td { background: rgba(0, 212, 170, 0.05); }

/* ── Tempo matches ───────────────────────────────────────────────────────
   Rows on the panel, keyed by the same left rule the tool list uses. */
.tempo-matches {
  list-style: none;
  margin: var(--spacing-md) 0 0;
  padding: 0;
}
.tempo-matches li {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px var(--spacing-md);
  padding: 11px 0 11px 12px;
  border-bottom: 1px solid var(--rule-2);
  position: relative;
}
.tempo-matches li::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--rule-2);
}
.tempo-matches li:first-child::before { background: var(--led); }
.tempo-match-tempo {
  font-family: var(--font-mono);
  font-stretch: 87.5%;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  color: var(--led);
}
.tempo-match-note { color: var(--muted); font-size: 0.875rem; }
.tempo-match-exact {
  margin-left: auto;
  font-family: var(--font-narrow);
  font-weight: 600;
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .tap-btn.tapping { transition: none; }
}
