:root {
  --primary-color: hsl(25, 97%, 53%);
  --white: hsl(0, 0%, 100%);
  --light-grey: hsl(217, 12%, 63%);
  --medium-grey: hsl(216, 12%, 54%);
  --dark-blue: hsl(213, 19%, 18%);
  --very-dark-blue: hsl(216, 12%, 8%);
}

* {
  box-sizing: border-box;
}

body {
  font-size: 15px;
  background-color: var(--very-dark-blue);
  display: flex;
  place-items: center;
  height: 100dvh;
  width: 100dvw;
  margin: 0;
}

.container {
  margin: 0 auto;
  background-color: var(--very-dark-blue);
  background-image: linear-gradient(var(--dark-blue), #171e28);
  border-radius: 8%;
  width: 400px;
  height: 400px;
  padding: 2rem;
}

.positioning-element {
  position: relative;
  height: 100%;
  width: 100%;
  transition: all 0.8s;
  transform-style: preserve-3d;
}
.form,
.thank-you {
  display: flex;
  position: absolute;
  top: 0;
  left: 0;
  flex-direction: column;
  justify-content: space-between;
  transition: 300ms ease-in-out;
  height: 100%;
  opacity: 1;
  .star {
    border-radius: 50%;
    width: 3rem;
    background-color: #262f38;
    display: flex;
    justify-content: center;
    padding: 1rem;
  }
  .heading {
    color: var(--white);
    font-size: 2em;
  }

  .description {
    color: var(--light-grey);
    line-height: 1.5;
    font-size: 1.1em;
  }

  .ratings {
    display: flex;
    justify-content: space-between;
    .rating {
      border-radius: 50%;
      background-color: var(--dark-blue);
      color: var(--light-grey);
      display: flex;
      justify-content: center;
      padding: 1.2rem;
      width: 3.3rem;
      opacity: 0.7;
      font-weight: 600;
      transition: 300ms;
      cursor: pointer;
      font-size: 1.1em;
      /* color: var(--medium-grey); */
      &:hover {
        background-color: var(--primary-color);
        color: var(--white);
      }

      &:active {
        filter: brightness(85%);
      }

      &.selected {
        color: var(--white);
        background-color: var(--light-grey);
      }
    }
  }

  .submit {
    border-radius: 2rem;
    background-color: var(--primary-color);
    color: var(--white);
    display: flex;
    place-content: center;
    padding: 1rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: 300ms;

    &:hover {
      background-color: var(--white);
      color: var(--primary-color);
    }

    &:active {
      filter: brightness(130%);
    }
  }
}

.thank-you {
  place-items: center;
  justify-content: space-around;

  .description {
    text-align: center;
  }

  .selected-rating {
    background-color: #262f38;
    border-radius: 1.5rem;
    padding: 0.5rem 1rem;
    color: var(--primary-color);
    opacity: 0.8;
  }
}

.hidden {
  visibility: hidden;
  opacity: 0;
}
