.pricing {
  background: $color-white;
  padding-bottom: 4rem;
  padding-top: 8rem;

  @media screen and (min-width: 870px) {
    padding-bottom: 4rem;
    padding-top: 0;
  }
}

.plans {
  display: flex;
  flex-wrap: wrap;
  margin: -2rem;
}

.plan {
  flex: 0 0 100%;
  padding: 2rem;
  position: relative;

  @media screen and (min-width: 520px) {
    flex: 0 0 50%;
  }

  @media screen and (min-width: 870px) {
    flex: 0 0 25%;
  }
}

.plan--top-bar {
  background: $color-dark;
  display: none;
  padding-bottom: 4rem;
  padding-top: 10rem;

  @media screen and (min-width: 870px) {
    display: block;
  }
}

.plan--include-top {
  display: block;

  .plan--title {
    color: $color-dark;
  }

  .plan--cost {
    color: $color-dark;
  }

  @media screen and (min-width: 870px) {
    display: none;
  }
}

.plan--title {
  color: $color-white;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plan--cost {
  align-items: flex-start;
  color: $color-white;
  display: flex;
  flex-direction: column;

  .plan--amount {
    display: flex;
  }

  .currency {
    display: block;
    font-size: 1.4rem;
    margin-right: 0.5rem;
    margin-top: 1.5rem;
  }

  .price {
    display: block;
    font-size: 5rem;
  }

  .price-note {
    display: block;
    font-size: 0.8rem;
    line-height: 1.35;
    margin: 0;
    max-width: 120px;
    opacity: 0.6;
  }

  @media screen and (min-width: 1300px) {
    flex-direction: row;

    .price-note {
      margin: 1.5rem 0 0 1rem;
    }
  }
}

.plan--description {
  color: $color-white;
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  margin-top: 0.5rem;
  width: 70%;
}

.plan--description__mobile {
  color: $color-dark;
}

.plan--cta {
  margin-top: 2rem;
  position: relative;

  @media screen and (min-width: 870px) {
    left: 2rem;
    margin: 0;
    position: absolute;
    top: 1rem;
  }
}

.plan--item {
  align-items: center;
  border-bottom: 1px solid $color-grey;
  display: flex;
  font-size: 0.8rem;
  padding: 0.5rem 0;
  position: relative;

  &:last-of-type {
    border-bottom: 0;
  }
}

.plan--item__info {
  margin-left: auto;
  position: relative;
}

.plan--item__tooltip-toggle {
  background-image: url("../img/info-circle.svg");
  background-repeat: no-repeat;
  background-size: contain;
  cursor: pointer;
  display: block;
  height: 12px;
  position: relative;
  width: 12px;

  &:hover + .plan--item__tooltip {
    opacity: 1;
    pointer-events: all;
    user-select: all;
  }
}

.plan--item__tooltip {
  background: $color-white;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 0.3rem;
  box-shadow: 0 8px 8px -5px rgba(0, 0, 0, 0.1);
  left: -0.5rem;
  opacity: 0;
  padding: 1rem;
  pointer-events: none;
  position: absolute;
  top: -1rem;
  transform: translate(-100%, 0%);
  transition: all 0.25s ease;
  user-select: none;
  width: 160px;
  z-index: 500;

  &.active {
    opacity: 1;
    pointer-events: all;
    user-select: all;
  }

  @media screen and (min-width: 870px) {
    left: 50%;
    transform: translate(-50%, -100%);
  }
}

.plan--item__includes {
  color: #999999;
  font-size: 0.8rem;
  font-style: italic;
}

.plan--item__includes {
  margin-top: 3.5rem;
}
