.voice-prompt-control {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  align-items: stretch;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line, #d8e0dc);
  border-radius: 13px;
  background: #fff;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.voice-prompt-control:focus-within {
  border-color: #78a99b;
  box-shadow: 0 0 0 4px rgba(120, 169, 155, .14);
}

.voice-prompt-control[data-invalid="true"],
.voice-prompt-control.is-error {
  border-color: #c96a5f;
  box-shadow: 0 0 0 4px rgba(201, 106, 95, .12);
}

.voice-prompt-control.is-recording {
  border-color: #bd5f56;
  background: #fffafa;
  box-shadow: 0 0 0 4px rgba(189, 95, 86, .13);
}

.voice-prompt-control.is-transcribing {
  border-color: #6f9b8f;
  background: #fbfdfc;
}

.voice-prompt-control > [data-voice-prompt-input] {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  width: 100%;
  height: 44px;
  margin: 0 !important;
  padding: 10px 10px 10px 14px !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--ink, #26333b);
  font: inherit;
}

.voice-prompt-control > [data-voice-prompt-input]:focus {
  outline: 0;
  box-shadow: none !important;
}

.voice-prompt-button {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  width: 46px;
  min-width: 46px;
  min-height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-left: 1px solid #e2e8e5;
  border-radius: 0;
  background: #f7faf8;
  color: #496159;
  cursor: pointer;
  transition: color .16s ease, background .16s ease, opacity .16s ease;
}

.voice-prompt-button:hover:not(:disabled) {
  background: #eaf3ef;
  color: #2f6658;
}

.voice-prompt-button:focus-visible {
  z-index: 1;
  outline: 2px solid #4f8979;
  outline-offset: -3px;
}

.voice-prompt-button:disabled {
  cursor: default;
  opacity: .42;
}

.voice-prompt-icon {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.voice-prompt-control.is-recording .voice-prompt-button {
  background: #f9e6e3;
  color: #a83f36;
}

.voice-prompt-control.is-recording .voice-prompt-icon {
  animation: voice-prompt-pulse 1.15s ease-in-out infinite;
}

.voice-prompt-timer {
  display: none;
  position: absolute;
  right: 3px;
  bottom: 2px;
  font-size: 8px;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  line-height: 1;
}

.voice-prompt-control.is-recording .voice-prompt-timer {
  display: block;
}

.voice-prompt-spinner {
  display: none;
  width: 17px;
  height: 17px;
  border: 2px solid rgba(47, 102, 88, .2);
  border-top-color: #3b7566;
  border-radius: 50%;
  animation: voice-prompt-spin .7s linear infinite;
}

.voice-prompt-control.is-transcribing .voice-prompt-icon {
  display: none;
}

.voice-prompt-control.is-transcribing .voice-prompt-spinner {
  display: block;
}

.voice-prompt-status {
  grid-column: 1 / -1;
  min-width: 0;
  padding: 0 13px 9px;
  color: #63736c;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}

.voice-prompt-status:empty {
  display: none;
}

.voice-prompt-status:not(.is-error):not(.validation-inline-error) {
  display: none;
}

.voice-prompt-status.is-error,
.voice-prompt-status.validation-inline-error {
  color: #a33b32;
}

.voice-prompt-control--spaced {
  margin-top: 16px;
}

.story-picker-form .voice-prompt-control,
.story-focus-form .voice-prompt-control,
.discussion-form .voice-prompt-control {
  min-width: 0;
}

.story-picker-form .voice-prompt-control > [data-voice-prompt-input],
.story-focus-form .voice-prompt-control > [data-voice-prompt-input] {
  height: 38px;
  font-size: 12px;
}

.story-picker-form .voice-prompt-button,
.story-focus-form .voice-prompt-button {
  min-height: 38px;
}

@keyframes voice-prompt-spin {
  to { transform: rotate(360deg); }
}

@keyframes voice-prompt-pulse {
  50% { transform: scale(.82); opacity: .62; }
}

@media (prefers-reduced-motion: reduce) {
  .voice-prompt-control,
  .voice-prompt-button {
    transition: none;
  }

  .voice-prompt-control.is-recording .voice-prompt-icon,
  .voice-prompt-spinner {
    animation: none;
  }
}

@media (max-width: 620px) {
  .voice-prompt-control {
    grid-template-columns: minmax(0, 1fr) 48px;
  }

  .voice-prompt-button {
    width: 48px;
    min-width: 48px;
    min-height: 48px;
  }

  .voice-prompt-control > [data-voice-prompt-input] {
    height: 48px;
  }
}
