:root {
  --very-light-grayish-blue: hsl(240, 78%, 98%);
  --light-grayish-blue: hsl(234, 14%, 74%);
  --grayish-blue: hsl(233, 13%, 49%);
  --dark-grayish-blue: hsl(232, 13%, 33%);
  --purple-light: hsl(236, 72%, 79%);
  --purple-dark: hsl(237, 63%, 64%);
  --card-gradient: linear-gradient(var(--purple-light), var(--purple-dark));
  --button-gradient: linear-gradient(to right, var(--purple-light), var(--purple-dark));
}

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

html {
  height: 100%;
  margin: 0;
}

body {
  height: 100%;
  margin: 0;
  background-color: var(--very-light-grayish-blue);
  font-family: 'Montserrat', sans-serif;
}

img {
  max-width: 100%;
  max-height: 100%;
  user-select: none;
}

main {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: center;
  z-index: 10;
}

.panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 40px;
  padding: 40px 20px;

  & > span {
    font-size: 30px;
    color: var(--grayish-blue);
  }
}

.payment-type {
  display: flex;
  align-items: center;
  gap: 20px;

  & span {
    font-size: 14px;
    color: var(--light-grayish-blue);
  }
}

.panel:has(input[id=choice]:checked) {
  & .offer__price--monthly {
    display: flex;
  }

  & .offer__price--annually {
    display: none;
  }
}

.offers {
  display: flex;
  flex-direction: row;
  justify-content: center;
  width: 100%;
}

.offer {
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: center;
  text-align: center;
  padding: 30px;
  font-size: 15px;
  border-radius: 10px;
  max-width: 280px;
  width: 100%;

  &:nth-child(odd) { /*Basic and Master*/
    background-color: white;
    margin: 20px 0;
    box-shadow: 0 10px 30px 0 rgba(0, 0, 0, 0.2);

    & span {
      color: var(--dark-grayish-blue);
    }

    & .learn-more {
      color: white;
      z-index: 1;
      border: 1px solid transparent;
      background: linear-gradient(white, white) padding-box,
      var(--button-gradient) border-box;
      border-radius: 6px;

      &::before {
        content: '';
        position: absolute;
        border-radius: 4px;
        top: 0;
        left: 0;
        bottom: 0;
        right: 0;
        z-index: -1;
        transition: opacity 200ms;
        background-image: var(--button-gradient);
      }

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

    & .desc__content {
      &::before {
        background-color: rgb(223, 223, 223);
      }

      &::after {
        background-color: rgb(223, 223, 223);
      }
    }
  }

  &:nth-child(even) { /*Professional*/
    background-image: var(--card-gradient);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.2);
    z-index: 1;

    & span {
      color: var(--very-light-grayish-blue);
    }

    & .learn-more {
      color: var(--purple-dark);
      background-color: white;
      border: 1px solid white;

      &:hover {
        color: white;
      }
    }
  }
}

.offer__title {
  font-size: 16px;
}

.offer__price {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 50px;
}

.dollar {
  font-size: 30px;
}

.offer__price--monthly {
  display: none;
}

.offer__price--annually {
  display: flex;
}

.offer__desc {
  margin-top: 10px;
  display: flex;
  gap: 30px;
  flex-direction: column;
  text-align: center;
}

.desc__content {
  font-size: 12px;
  position: relative;

  &::before {
    content: '';
    position: absolute;
    height: 1px;
    width: 100%;
    background-color: var(--light-grayish-blue);
    top: -15px;
    left: 0;
  }

  &:last-child::after {
    content: '';
    position: absolute;
    height: 1px;
    width: 100%;
    background-color: var(--light-grayish-blue);
    bottom: -15px;
    left: 0;
  }
}

.learn-more {
  margin-top: 20px;
  padding: 10px 20px;
  border-radius: 6px;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 1px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 200ms, color 200ms;
  position: relative;

  &:hover {
    background-color: transparent !important;
  }

  &:hover::before {
    opacity: 0;
  }
}

#bg-top {
  position: fixed;
  top: 0;
  right: 0;
}

#bg-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
}

@media screen and (width < 800px) {
  .offers {
    flex-direction: column;
    align-items: center;
  }

  .offer {
    &:nth-child(even) {
      box-shadow: 0 10px 30px 0 rgba(0, 0, 0, 0.2);
    }
  }

  #bg-bottom {
    display: none;
  }
}
