/* Hari Villa — audio notes (design 031).
   Mobile-first: the record button is a real thumb target, because a phone in
   a hand is where thirty seconds of speech actually gets recorded. Desktop
   only tightens, inside the 900px query. */

.audio-list { display: flex; flex-direction: column; gap: 0.7rem; }

.audio-row {
  border-left: 3px solid var(--gold);
  padding: 0.3rem 0 0.3rem 0.7rem;
}
.audio-row audio {
  width: 100%;
  max-width: 100%;
  margin-top: 0.35rem;
  display: block;
}
.audio-title { color: var(--ink); font-weight: 600; word-break: break-word; }
.audio-title.is-untitled { font-weight: 500; color: var(--muted); }
.audio-meta {
  margin-top: 0.2rem;
  font-size: 0.78rem;
  color: var(--muted);
  display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap;
}

/* The controls. 44px floor on phone — never smaller. */
.audio-controls {
  display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center;
  margin-bottom: 0.7rem;
}
.audio-btn {
  min-height: 44px;
  min-width: 44px;
  padding: 0 1rem;
  border: 1px solid var(--navy);
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.audio-btn:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); }
.audio-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.audio-btn.is-recording {
  border-color: var(--red);
  color: #fff;
  background: var(--red);
}
.audio-upload { display: inline-block; margin: 0; cursor: pointer; }

/* The live timer while recording — reads as a clock, not decoration. */
.audio-timer {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--red);
  min-width: 3.5rem;
}
.audio-timer[hidden] { display: none; }

.audio-hint { font-size: 0.78rem; color: var(--muted); margin-bottom: 0.6rem; }
.audio-error:empty { display: none; }

/* The pending recording, before it is saved: hear it back, then keep or bin. */
.audio-pending {
  border: 1px dashed var(--gold);
  border-radius: 8px;
  padding: 0.6rem;
  margin-bottom: 0.7rem;
}
.audio-pending[hidden] { display: none; }
.audio-pending audio { width: 100%; display: block; margin-bottom: 0.5rem; }
.audio-pending input[type="text"] {
  width: 100%;
  min-height: 44px;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  margin-bottom: 0.5rem;
}

@media (min-width: 900px) {
  .audio-btn { min-height: 36px; }
  .audio-pending input[type="text"] { min-height: 36px; }
}
