/* Mirrors PracticeScreen.RecordButton and RecordingState from the Android app. */
.record-button {
  position: relative;
  isolation: isolate;
  width: 104px;
  height: 104px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  transition: transform 180ms cubic-bezier(.2,.8,.2,1), background-color 180ms ease;
}

.record-button:active {
  transform: scale(.9);
}

.record-button-surface {
  position: absolute;
  inset: 8px;
  z-index: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #0d4f8c;
  box-shadow: 0 8px 17px rgba(0,0,0,.17);
}

.record-button .microphone-icon {
  display: inline-block;
  position: relative;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 0;
  overflow: visible;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.record-button::before,
.record-button::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 8px;
  border-radius: 50%;
  background: #a94d42;
  opacity: 0;
  pointer-events: none;
}

.record-button.recording {
  background: transparent;
}

.record-button.recording .record-button-surface {
  background: #a94d42;
}

.record-button.recording::before {
  animation: recording-outer-pulse 1.2s cubic-bezier(.4,0,.2,1) infinite;
}

.record-button.recording::after {
  background: #c26b60;
  animation: recording-inner-pulse 1.2s cubic-bezier(.4,0,.2,1) .5s infinite;
}

.record-button.recording .microphone-icon {
  animation: microphone-breathing .4s cubic-bezier(.4,0,.2,1) infinite alternate;
}

.recording-state {
  min-height: 92px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.recording-state > strong {
  color: #0d4f8c;
  font-size: 12px;
  letter-spacing: 1.2px;
  animation: listening-fade 1s cubic-bezier(.4,0,.2,1) infinite alternate;
}

.audio-levels {
  height: 40px;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.audio-levels i {
  display: block;
  width: 3px;
  height: 4px;
  border-radius: 99px;
  background: #0d4f8c;
  transition: height 70ms linear;
}

@keyframes recording-outer-pulse {
  from { transform: scale(1); opacity: .45; }
  to { transform: scale(1.55); opacity: 0; }
}

@keyframes recording-inner-pulse {
  from { transform: scale(1); opacity: .3; }
  to { transform: scale(1.35); opacity: 0; }
}

@keyframes microphone-breathing {
  from { transform: scale(1); }
  to { transform: scale(1.15); }
}

@keyframes listening-fade {
  from { opacity: 1; }
  to { opacity: .5; }
}

@media (prefers-reduced-motion: reduce) {
  .record-button,
  .record-button::before,
  .record-button::after,
  .record-button .microphone-icon,
  .recording-state > strong { animation: none !important; transition: none !important; }
}
