* {
  box-sizing: border-box;
}

body {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100vh;
  font-family: Public Sans;
  position: relative;
  margin: 0;
}

header {
  display: flex;
  justify-content: space-between;
  padding-block: 2rem;
  padding-inline: 3rem;
}

textarea {
  width: 100%;
  height: 16rem;
  font-size: 1rem;
  border: none;
  resize: none;
  overflow-y: "hidden";
  font-family: Public Sans;
  border: 1px #d6d6d6 solid;
  padding: 1rem;
}

h1 {
  font-size: 4rem;
}

h2 {
  color: #737373;
}

main {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: scroll;
}

.btn {
  text-decoration: none;
  color: var(--base-white, #fff);
  width: 92px;
  height: 30px;
  font-family: Inter;
  font-size: 18px;
  line-height: 28px; /* 155.556% */
  border: 1px solid var(--grey-950, #0f0f0f);
  background: var(--grey-950, #0f0f0f);
  box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
  cursor: pointer;
}

.btn:disabled {
  background-color: #F5F5F5;
  color: #A3A3A3;
  border: 1px solid #F5F5F5;
}

.speech-input-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: relative;
  justify-self: center;
}

.text-area-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: end;
}

.disclaimer {
  align-self: center;
  color: #b10204;
  background-color: #fef1f0;
  padding: 1rem;
  border: 1px #ffbfc0 solid;
  max-width: 40rem;
  grid-area: disclaimer;
}

.close-icon {
  width: 32px;
  height: 32px;
  position: absolute;
  right: 2rem;
  top: 2rem;
}

.analyse-wrapper {
  flex-grow: 1;
  width: 100%;
  justify-self: center;
  align-self: center;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.analyse-wrapper.error {
  color: #b10204;
  font-size: 1.5rem;
}

.analyse-wrapper > div {
  display: flex;
  flex-direction: column;
}

.percentage {
  color: #b10204;
  font-weight: bold;
  font-size: 2rem;
}

.percentage::after {
  content: "%";
}

.text {
  max-height: 390px;
  min-height: 40px;
  overflow: auto;
  position: relative;
  display: block;
}

.text-wrapper {
  position: relative;
}

.text-wrapper:after {
  content: '';
  position: absolute;
  bottom: 0;
  width: 100%;
  background: linear-gradient(to bottom, transparent, white);
  left: 0;
  height: 20px;
}

.main-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  justify-self: center;
}

.footer-title {
  font-size: 8rem;
  font-weight: bold;
  color: #e5e5e5;
  /* position: absolute;
  bottom: 0;
  left: 0; */
  letter-spacing: -8px;
  z-index: -2;
}

.label {
  color: #737373;
  font-weight: bold;
}

.background-blob {
  height: 1300px;
  width: 4000px;
  background-color: #ff0000;
  opacity: 0.8;
  transform: rotate(70deg);
  border-radius: 50%;
  box-shadow: 0px 0px 80px 80px #ff0000;
  position: absolute;
  top: 200px;
  left: -2600px;
  z-index: -1;
}

.text-danger {
  color: #92090a;
}

.label {
  font-weight: 700;
}

.header {
  display: flex;
  justify-content: space-between;
}

.main-container {
  padding-top: 5rem;
  display: grid;
  flex-direction: column;
  grid-template-columns: 29rem 29rem;
  gap: 10rem;
  row-gap: 1rem;
  grid-template-areas:
    "title disclaimer"
    "input analysis";
  align-self: center;
  justify-self: center;
  margin: auto;
  max-width: fit-content;
}

.title {
  grid-area: title;
  letter-spacing: -5px;
}

#check-the-speech-image {
  height: 10rem;
  width: 10rem;
  align-self: center;
  justify-self: center;
}

.loader {
  color: red;
  font-size: 10px;
  width: 1em;
  height: 1em;
  border-radius: 50%;
  position: relative;
  text-indent: -9999em;
  animation: mulShdSpin 1.3s infinite linear;
  transform: translateZ(0);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(50%, 50%);
  display: none;
}

@keyframes mulShdSpin {
  0%,
  100% {
    box-shadow: 0 -3em 0 0.2em, 
    2em -2em 0 0em, 3em 0 0 -1em, 
    2em 2em 0 -1em, 0 3em 0 -1em, 
    -2em 2em 0 -1em, -3em 0 0 -1em, 
    -2em -2em 0 0;
  }
  12.5% {
    box-shadow: 0 -3em 0 0, 2em -2em 0 0.2em, 
    3em 0 0 0, 2em 2em 0 -1em, 0 3em 0 -1em, 
    -2em 2em 0 -1em, -3em 0 0 -1em, 
    -2em -2em 0 -1em;
  }
  25% {
    box-shadow: 0 -3em 0 -0.5em, 
    2em -2em 0 0, 3em 0 0 0.2em, 
    2em 2em 0 0, 0 3em 0 -1em, 
    -2em 2em 0 -1em, -3em 0 0 -1em, 
    -2em -2em 0 -1em;
  }
  37.5% {
    box-shadow: 0 -3em 0 -1em, 2em -2em 0 -1em,
    3em 0em 0 0, 2em 2em 0 0.2em, 0 3em 0 0em, 
    -2em 2em 0 -1em, -3em 0em 0 -1em, -2em -2em 0 -1em;
  }
  50% {
    box-shadow: 0 -3em 0 -1em, 2em -2em 0 -1em,
    3em 0 0 -1em, 2em 2em 0 0em, 0 3em 0 0.2em, 
    -2em 2em 0 0, -3em 0em 0 -1em, -2em -2em 0 -1em;
  }
  62.5% {
    box-shadow: 0 -3em 0 -1em, 2em -2em 0 -1em,
    3em 0 0 -1em, 2em 2em 0 -1em, 0 3em 0 0, 
    -2em 2em 0 0.2em, -3em 0 0 0, -2em -2em 0 -1em;
  }
  75% {
    box-shadow: 0em -3em 0 -1em, 2em -2em 0 -1em, 
    3em 0em 0 -1em, 2em 2em 0 -1em, 0 3em 0 -1em, 
    -2em 2em 0 0, -3em 0em 0 0.2em, -2em -2em 0 0;
  }
  87.5% {
    box-shadow: 0em -3em 0 0, 2em -2em 0 -1em, 
    3em 0 0 -1em, 2em 2em 0 -1em, 0 3em 0 -1em, 
    -2em 2em 0 0, -3em 0em 0 0, -2em -2em 0 0.2em;
  }
}


@media (max-width: 1279px) {
  body {
    overflow: scroll;
  }

  .title {
    font-size: 2.5rem;
    letter-spacing: normal;
    margin: 12px 0 18px;
    letter-spacing: -1.44px;
  }

  .main-container {
    gap: 0;
    row-gap: 0;
    grid-template-columns: auto;
    grid-template-areas:
      "title"
      "disclaimer"
      "input"
      "analysis";
    padding-inline: 1rem;
    padding-top: 16px;
  }

  .background-blob {
    display: none;
  }

  .footer-title {
    display: none;
  }
}

@media (max-width: 640px) {
  .title {
    font-size: 1.5rem;
    letter-spacing: normal;
    margin: 12px 0 18px;
    letter-spacing: -1.44px;
  }

  .close-icon {
    height: auto;
    width: auto;
    right: 11px;
    top: 33px;
  }

  h2 {
    font-size: 0.875rem;
  }

  .main-container {
    display: flex;
    /* gap: 2rem; */
    padding-top: 1rem;
  }

  .speech-input-wrapper {
    gap: 0.5rem;
  }

  .text-danger.label {
    font-size: 14px;
    margin-bottom: 4px;
    line-height: 20px;
    display: block;
  }
  .text-danger {
    font-size: 12px;
    line-height: 16px;
  }

  .disclaimer {
    padding: 8px 12px;
  }
}