*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Roboto', sans-serif;
}

.demo {
  display: flex;
  flex-direction: column;
  padding: 30px 20px;
}

.demo__nav {
  display: flex;
  justify-content: center;
  margin-bottom: 25px;
}

.demo__logo {
  display: flex;
  width: 180px;
  height: 30px;
}

.demo__logo img {
  width: 100%;
  height: 100%;
}

.demo__container {
  align-self: center;
  max-width: 700px;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.demo__loader {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
  margin-bottom: 25px;
  height: 100px;
}
.demo__loader-status {
  font-size: 1.5rem;
  font-weight: medium;
}

.demo__trial-note {
  display: flex;
  gap: 10px;
  background-color: rgb(255, 244, 229);
  max-width: 600px;
  width: 100%;
  align-self: center;
  padding: 10px;
  border-radius: 10px;
  margin-bottom: 25px;
  min-height: 100px;
}
.demo__trial-note--warning {
  background-color: rgb(253, 237, 237);
  color: rgb(95, 33, 32);
}
.demo__trial-note--err {
  min-height: auto;
}
.demo__trial-note-msg {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
  color: rgb(102, 60, 0);
}
.demo__trial-note-icon {
  flex-shrink: 0;
  fill: #ed6c02;
}
.demo__trial-note--warning .demo__trial-note-icon {
  fill: #d32f2f;
}

.demo__error {
  display: flex;
  align-self: center;
  gap: 10px;
  padding: 10px;
  background-color: rgb(253, 237, 237);
  color: rgb(95, 33, 32);
  border-radius: 4px;
  margin-bottom: 25px;
  max-width: 600px;
  width: 100%;
}
.demo__error-msg {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.demo__error-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: #d32f2f;
}
.demo__override-lock-btn {
  margin-top: 10px;
}

.demo__select-mic {
  position: relative;
  margin-bottom: 25px;
  align-self: center;
  max-width: 400px;
  width: 100%;
}
.demo__select-mic-input {
  width: 100%;
  appearance: none;
  background-color: transparent;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.07);
  padding: 15px 40px;
  cursor: pointer;
  color: #000;
}
.demo__select-mic-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
.demo__select-mic-chevron {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.demo__title {
  display: flex;
  flex-direction: column;
  position: relative;
  align-self: center;
  align-items: center;
}
.demo__title-msg {
  letter-spacing: 0.25rem;
  font-weight: 900;
  text-align: center;
  margin-top: 0px;
  margin-bottom: 25px;
}
.demo__title-beta-label {
  background-color: rgb(253, 237, 237);
  padding: 5px 10px;
  font-weight: bold;
  font-size: 10px;
  border-radius: 30px;
  margin-bottom: 10px;
}

.demo__phrases {
  font-size: 1.25rem;
  margin-bottom: 25px;
}

.demo__result {
  margin-bottom: 25px;
  font-size: 1.25rem;
}
.demo__no-result {
  color: darkgray;
}
.demo__partial-result {
  color: darkgray;
}
.demo__final-result {
  color: black;
}

.demo__phones-result {
  font-size: 1.25rem;
  margin-bottom: 30px;
  line-height: 1.75;
  white-space: pre-wrap;
}
.phone-word {
  background-color: #e9e9e9;
}
.phone-error {
  color: red;
}
.phone-warning {
  color: orange;
}
.phone-success {
  color: green;
}
.phone-score {
  font-weight: 300;
}

.demo__btn {
  align-self: center;
  -webkit-tap-highlight-color: transparent;
  background-color: #111111;
  border-radius: 12px;
  border: none;
  padding: 0;
  cursor: pointer;
  outline-offset: 4px;
  margin-bottom: 25px;
}
.demo__btn-front {
  display: block;
  padding: 12px 42px;
  border-radius: 12px;
  background-color: #333333;
  font-size: 1.25rem;
  color: white;
  transform: translateY(-6px);
}
.demo__btn:active:not(:disabled) .demo__btn-front {
  transform: translateY(-2px);
}
.demo__btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.spinner {
  display: inline-flex;
  position: relative;
}
.spinner__progress {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  color: #888;
}
.spinner__svg {
  color: #333333;
  animation: spin 0.75s linear infinite;
  width: 50px;
  height: 50px;
}
.spinner__ring {
  opacity: 0.25;
}
.spinner__spin {
  opacity: 0.75;
}

@media screen and (min-width: 900px) {
  .demo__title-msg {
    font-size: 2.1rem;
  }

  .demo__commands {
    font-size: 1.5rem;
    line-height: 2.2rem;
  }

  .demo__recognition {
    font-size: 1.5rem;
    line-height: 2.2rem;
  }
}

@media screen and (min-width: 820px) {
  .demo__title-beta-label {
    position: absolute;
    left: 102%;
    bottom: 85%;
    white-space: nowrap;
    margin: 0;
  }
}

@media screen and (min-width: 1080px) {
  .demo__nav {
    margin-bottom: 0px;
  }

  .demo__logo {
    position: absolute;
    top: 30px;
    left: 20px;
  }
}
