/* Voicemail greeting recorder (it-34). The one new widget the greeting library needs; everything
 * else on the page reuses house classes (.float-card, .btn, .field-input, .notice). Scoped to
 * .vm-rec so it can't leak. */

.vm-rec {
  display: flex;
  align-items: center;
  gap: var(--space-3, 0.75rem);
  flex-wrap: wrap;
}

/* The record / stop control — a round tappable target built from the button tokens. */
.vm-rec__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  background: var(--md-sys-color-primary);
}
.vm-rec__btn--recording {
  background: var(--md-sys-color-error);
}
.vm-rec__btn .material-symbols-rounded {
  font-size: 1.5rem;
}

/* mm:ss readout beside the control while recording / after a take. */
.vm-rec__timer {
  font-variant-numeric: tabular-nums;
  font-size: var(--md-sys-typescale-body-medium-size, 0.95rem);
  color: var(--md-sys-color-on-surface-variant);
  min-width: 3ch;
}

.vm-rec__player {
  width: 100%;
  max-width: 22rem;
  margin-top: var(--space-2, 0.5rem);
}

/* A soft pulse on the record button while capturing, so it reads as live. */
@media (prefers-reduced-motion: no-preference) {
  .vm-rec__btn--recording { animation: vm-rec-pulse 1.4s ease-in-out infinite; }
  @keyframes vm-rec-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); }
    50%      { box-shadow: 0 0 0 6px color-mix(in srgb, var(--md-sys-color-error) 25%, transparent); }
  }
}
