@import url("https://fonts.googleapis.com/css2?family=Red+Hat+Display:wght@500;700;900&display=swap");

:root,
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0;
}

:root {
  /* Primary colors. */
  --pale-blue: hsl(225, 100%, 94%);
  --bright-blue: hsl(245, 75%, 52%);
  /* Neutral colors. */
  --very-pale-blue: hsl(225, 100%, 98%);
  --desaturated-blue: hsl(224, 23%, 55%);
  --dark-blue: hsl(223, 47%, 23%);
  --light-purple: hsl(244, 83%, 68%);
}

body {
  min-height: 100vh;
  background-color: var(--pale-blue);
  background-image: url("./images/pattern-background-mobile.svg");
  background-size: contain;
  background-repeat: no-repeat;
  font-family: "Red Hat Display", sans-serif;
  display: flex;
  flex-direction: column;
}

.order-summary-card {
  max-width: 327px;
  background-color: white;
  border-radius: 1.25rem;
  box-shadow: 0px 40px 40px -20px rgba(13, 48, 189, 0.151826);
  margin: auto;
}

.success-hero-image {
  width: 100%;
  border-top-left-radius: 1.25rem;
  border-top-right-radius: 1.25rem;
}

.order-summary-text {
  padding: 2rem 2rem 0;
}

.order-summary-boxes {
  padding: 0 1.5rem 2rem;
}

.title {
  color: var(--dark-blue);
  font-size: 1.375rem;
  font-weight: 900;
  line-height: 1.8125rem;
  text-align: center;
}

.description {
  color: var(--desaturated-blue);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.5625rem;
  text-align: center;
  margin-top: 1rem;
}

.price-plan {
  background-color: var(--very-pale-blue);
  border-radius: 0.6875rem;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
}

.annual-price-plan {
  color: var(--dark-blue);
  font-size: 0.875rem;
  font-weight: 900;
  line-height: 1.1875rem;
  margin-left: 1rem;
}

.price {
  color: var(--desaturated-blue);
  font-weight: 500;
}

.change-plan {
  color: var(--bright-blue);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.0625rem;
  text-decoration-line: underline;
}

.change-plan:hover {
  color: var(--light-purple);
  text-decoration: none;
}

.proceed-button {
  background-color: var(--bright-blue);
  border-radius: 0.6875rem;
  box-shadow: 0px 20px 20px rgba(56, 42, 225, 0.190291);
  color: white;
  font-family: "Red Hat Display", sans-serif;
  font-size: 0.9375rem;
  font-weight: 900;
  line-height: 1.25rem;
  padding: 0.875rem;
  width: 100%;
}

.proceed-button:hover {
  background-color: var(--light-purple);
  cursor: pointer;
}

.proceed-button:active {
  transform: translateY(2px);
}

.cancel-button {
  background-color: transparent;
  border: none;
  color: var(--desaturated-blue);
  font-size: 0.9375rem;
  font-weight: 900;
  line-height: 1.25rem;
  margin-top: 1.5rem;
  width: 100%;
}

.cancel-button:hover {
  color: var(--dark-blue);
  cursor: pointer;
}

.cancel-button:active {
  text-decoration: underline;
}

.attribution {
  font-size: 0.75rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
  text-align: center;
}

.attribution a {
  color: hsl(228, 45%, 44%);
  text-decoration: none;
}

.attribution a:hover {
  color: hsl(212, 95%, 48%);
}

/*
 * Desktop media query.
*/

@media screen and (min-width: 768px) {
  body {
    background-image: url("./images/pattern-background-desktop.svg");
  }

  .order-summary-card {
    max-width: 450px;
  }

  .order-summary-text {
    padding: 3rem 3rem 0;
  }

  .order-summary-boxes {
    padding: 0 3rem 3rem;
  }

  .title {
    font-size: 1.75rem;
    line-height: 2.3125rem;
  }

  .description {
    font-size: 1rem;
    line-height: 1.625rem;
  }

  .price-plan {
    padding: 1.5625rem 1.5rem;
  }

  .annual-price-plan {
    font-size: 1rem;
    line-height: 1.3125rem;
    margin-left: 1.25rem;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0.375rem;
  }

  .change-plan {
    font-size: 0.875rem;
    line-height: 1.1875rem;
  }

  .price-plan {
    margin-top: 1.25rem;
    margin-bottom: 2rem;
  }

  .cancel-button {
    margin-top: 2rem;
  }

  .attribution {
    font-size: 0.875rem;
  }
}