.voice-dictation,
.name-pronunciation {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.read-aloud {
  display: inline-flex;
  vertical-align: middle;
  align-items: center;
  margin-inline-start: 0.35rem;
}

.voice-dictation__button,
.name-pronunciation__button,
.read-aloud__button {
  display: inline-flex;
  min-height: 2rem;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid #cbd5e1;
  border-radius: 9999px;
  background: #fff;
  color: #1e3a8a;
  padding: 0.35rem 0.75rem;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.voice-dictation__button:hover,
.name-pronunciation__button:hover,
.read-aloud__button:hover {
  border-color: #60a5fa;
  background: #eff6ff;
  box-shadow: 0 2px 8px rgb(37 99 235 / 12%);
}

.voice-dictation__button:focus-visible,
.name-pronunciation__button:focus-visible,
.read-aloud__button:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.voice-dictation__button:disabled,
.name-pronunciation__button:disabled,
.read-aloud__button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.voice-dictation__status,
.name-pronunciation__status,
.read-aloud__status {
  color: #475569;
  font-size: 0.75rem;
}

.name-pronunciation {
  margin: 0.4rem 0 0.65rem;
}

.name-pronunciation__title {
  color: #1e293b;
  font-size: 0.85rem;
}

.name-pronunciation__audio {
  width: min(15rem, 100%);
  height: 2rem;
}

.read-aloud__status:empty {
  display: none;
}

.read-aloud__button {
  width: 2rem;
  min-width: 2rem;
  min-height: 2rem;
  padding: 0.35rem;
  border-radius: 9999px;
  vertical-align: middle;
}

.read-aloud__button svg {
  display: block;
  width: 1.1rem;
  height: 1.1rem;
}

.read-aloud__button.is-reading svg {
  fill: currentColor;
}

.read-aloud__status {
  margin-inline-start: 0.4rem;
  font-weight: 400;
}

.dark .voice-dictation__button,
.dark .name-pronunciation__button,
.dark .read-aloud__button {
  border-color: #475569;
  background: #0f172a;
  color: #bfdbfe;
}

.dark .voice-dictation__button:hover,
.dark .name-pronunciation__button:hover,
.dark .read-aloud__button:hover {
  border-color: #60a5fa;
  background: #1e293b;
}

.dark .voice-dictation__status,
.dark .name-pronunciation__status,
.dark .read-aloud__status {
  color: #cbd5e1;
}

.dark .name-pronunciation__title {
  color: #e2e8f0;
}

@media (prefers-reduced-motion: reduce) {
  .voice-dictation__button,
  .name-pronunciation__button,
  .read-aloud__button {
    transition: none;
  }
}
