/* MP4 to MP3 — local styles. Everything else reuses the shared design system. */

.m2a-file {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
}
.m2a-file-info { min-width: 0; }
.m2a-file-name {
  font-weight: 600;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.m2a-file-info p.small { margin: 0.15rem 0 0; }

/* ---- Waveform + trim ---- */
.m2a-wave {
  position: relative;
  height: 6.5rem;
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  user-select: none;
}
.m2a-wave canvas { display: block; width: 100%; height: 100%; }
.m2a-wave-mask {
  position: absolute;
  top: 0;
  bottom: 0;
  background: color-mix(in srgb, var(--surface-sunken) 78%, transparent);
  pointer-events: none;
}
.m2a-wave-mask-l { left: 0; }
.m2a-wave-mask-r { right: 0; }
.m2a-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1rem;
  margin-left: -0.5rem;
  cursor: ew-resize;
  touch-action: none;
}
.m2a-handle::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  margin-left: -1.5px;
  background: var(--primary);
  border-radius: 2px;
}
.m2a-handle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1.15rem;
  height: 1.15rem;
  margin: -0.575rem 0 0 -0.575rem;
  background: var(--primary);
  border: 2px solid var(--on-primary);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}
.m2a-handle:focus-visible::after { outline: 2px solid var(--focus); outline-offset: 2px; }
.m2a-playbar { margin-top: 0.6rem; align-items: center; }

/* Bigger touch target for the trim handles on touch screens (the visual line/knob stays the same size). */
@media (pointer: coarse) {
  .m2a-handle { width: 2.75rem; margin-left: -1.375rem; }
}

.m2a-cover {
  width: 4.5rem;
  height: 4.5rem;
  flex: none;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-sunken) center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  overflow: hidden;
}
.m2a-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---- Batch file list ---- */
.m2a-row-status { display: flex; align-items: center; gap: 0.5rem; flex: none; }
.m2a-row-status .progress-wrap { width: 7rem; margin: 0; }
.m2a-row-status .progress-wrap .progress-label { display: none; }

/* ---- Result ---- */
.m2a-players { display: flex; flex-direction: column; gap: 0.75rem; }
audio.m2a-player { width: 100%; height: 2.75rem; border-radius: var(--radius-sm); }

@media (max-width: 640px) {
  .m2a-wave { height: 5.5rem; }
}

.seg label:has(input:disabled) { opacity: 0.5; cursor: not-allowed; }

