#loyalty-greeting {
  margin: 0;
  padding: 0 0 5;
  font-size: 16px;
}

[data-view="my_niku_journey"] p,
.loyalty-diagram p {
  font-size: 14px;
  line-height: 175%;
  margin: 12px 0 0;
}

.loyalty-diagram p {
  line-height: 150%;
  margin: 0 0 0 -30.5px;
}

#loyalty-tier-section {
  font-weight: normal;
  margin-top: 12px;
  margin-bottom: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#loyalty-tier-section p {
  text-align: justify;
}

.loyalty-bigger-badge {
  max-width: 120px;
}

p.available_credits {
  width: max-content;
  height: 26px;
  margin: 30px 0 0 auto;
  padding: 0 10px;
  right: 0;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #F2F2F2;
}

.loyalty-diagram {
  height: 177px;
  width: 100%;
  overflow: auto;
  margin-bottom: 18px;
  margin-top: -53.75px;
  cursor: grabbing;
  /* disable text selection highlighting (drag will be only used to scroll) */
  /* iOS Safari */
  -webkit-touch-callout: none;
  /* Safari */
  -webkit-user-select: none;
  /* Konqueror HTML */
  -khtml-user-select: none;
  /* Old versions of Firefox */
  -moz-user-select: none;
  /* Internet Explorer/Edge */
  -ms-user-select: none;
  /* Non-prefixed version, currently supported by Chrome, Edge, Opera and Firefox */
  user-select: none;
}

.loyalty-diagram.has-next-tier {
  height: 214px;
}

.loyalty-diagram-truck {
  position: absolute;
  top: -75px;
  height: 75px;
  transform: scaleX(-1);
}

.no-reward .loyalty-diagram-truck {
  /* no-reward steps are shorter than reward. This fix the truck position */
  top: -79.5px;
}

.loyalty-diagram-progress {
  display: flex;
  position: relative;
  height: 32px;
  width: max-content;
  margin: 82px 0px 40px;
  align-items: center;
}

.loyalty-diagram-bar {
  position: absolute;
  height: 10px;
  /* to finish before last element. Used half no-reward step diameter */
  width: calc(100% - 11.5px);
  background-color: #FFFFFF;
  border: 1px solid #808080;
  border-radius: 10px;
}

.fulfilled-bar {
  background-color: #C5D86D;
  height: 10px;
  position: absolute;
  margin-left: 1px;
  /* width is defined in js/loyalty_program */
}

.loyalty-diagram-reward-titles {
  background-color: white;
  position: absolute;
  margin-top: -35px;
  font-weight: 500;
  font-size: 15px;
  line-height: 40px;
  color: #222222;
  padding: 0 10px 0 5px;
}

.loyalty-diagram-reward-titles.highlight_adjustments {
  -moz-box-shadow: 15px 0 15px -10px rgba(0, 0, 0, 0.1);
  -webkit-box-shadow: 15px 0 15px -10px rgba(0, 0, 0, 0.1);
  box-shadow: 15px 0 15px -10px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease-in-out;
}

.loyalty-diagram-step {
  /* the truck and the discounts are positioned relatively to each step */
  position: relative;
  background-color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  font-family: Roboto;
  font-style: normal;
  font-weight: bold;
  font-size: 14px;
}

.counter {
  width: inherit;
  height: inherit;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
  border: 1px solid #808080;
  border-radius: 50%;
}

.loyalty-diagram-step.fulfilled-step .counter {
  border-color: #C5D86D;
}

.loyalty-diagram-step.next-step .counter {
  border-color: #FFD385;
}

.loyalty-diagram-step.no-reward {
  height: 23px;
  width: 23px;
  /* results in 69px distance between steps (9px more than reward steps to compensate the wider circle)*/
  margin: 0 34.5px;
}

.loyalty-diagram-step.reward,
.loyalty-diagram-step.next-step {
  height: 32px;
  width: 32px;
  /* results in 60px distance between steps */
  margin: 0 30px;
}

.loyalty-diagram-step.fulfilled-step,
.loyalty-diagram-step.fulfilled-step .loyalty-diagram-reward-label {
  color: #025A00;
  background-color: #C5D86D;
}

.loyalty-diagram-step.next-step,
.loyalty-diagram-step.next-step .loyalty-diagram-reward-label,
.loyalty-diagram-step.next-step .loyalty-diagram-other-discount-label {
  color: #6F4900;
  background-color: #FFD385;
}

.loyalty-diagram-step.badge {
  background-color: unset;
  height: 32px;
}

/* delivery-date hover boxes */
.loyalty-diagram-step .delivery-date {
  position: absolute;
  top: 100%;
  visibility: hidden;
  z-index: 1;
  margin: 16px 0;
  text-align: center;
  width: 80px;
  padding: 8px;
  font-family: Roboto;
  font-style: normal;
  font-weight: 400;
  font-size: 12px;
  line-height: 14px;
  color: #000000;
  background-color: #ffffff;
  border-radius: 3px;
  filter: drop-shadow(0px 0px 5px rgba(0, 0, 0, 0.15));
}

/* show delivery-date content on hover */
.loyalty-diagram-step .counter:hover~.delivery-date,
.loyalty-diagram-step .loyalty-diagram-badge:hover~.delivery-date {
  visibility: visible;
}

/* arrow from delivery-date box */
.loyalty-diagram-step .counter:hover~.delivery-date::after,
.loyalty-diagram-step .loyalty-diagram-badge:hover~.delivery-date::after {
  content: "";
  position: absolute;
  bottom: 100%;
  left: calc(40px - 16px);
  border-width: 16px;
  border-style: solid;
  border-color: transparent transparent white transparent;
}

/* adjustments for the zero step (no left margin) */
.loyalty-diagram-step:nth-of-type(3) {
  margin-left: 0px;
}

/* adjustments for the first step (format date differently) */
.loyalty-diagram-step:nth-of-type(4) .delivery-date {
  top: unset;
  bottom: 100%;
}

.loyalty-diagram-step:nth-of-type(4) .counter:hover~.delivery-date::after,
.loyalty-diagram-step:nth-of-type(4) .loyalty-diagram-badge:hover~.delivery-date::after {
  top: 100%;
  border-color: white transparent transparent transparent;
}

/* adjustments for date box of the next step */
.next-step .delivery-date {
  width: 110px;
  top: unset;
  bottom: 100%;
  left: -1px;
}

.next-step .delivery-date span {
  font-weight: 700;
  font-size: 14px;
  line-height: 16px;
}

.next-step .counter:hover~.delivery-date::after,
.next-step .loyalty-diagram-badge:hover~.delivery-date::after {
  top: 100%;
  left: 12px;
  border-width: 14px 12px 0 3.5px;
  border-color: white transparent transparent transparent;
}

/* make sure the last step ends on the very right of the diagram */
.loyalty-diagram-step:last-of-type {
  margin-right: 0px;
}

.loyalty-diagram-rewards {
  display: flex;
}

.loyalty-diagram-reward-label,
.loyalty-diagram-other-discount-label {
  background: #E6E6E6;
  position: absolute;
  /* 32px of bigger step + 12px of margin */
  top: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 61px;
  height: 24px;
  border-radius: 16px;
}

.loyalty-diagram.has-next-tier .loyalty-diagram-other-discount-label {
  top: 84px;
}

.referral-message {
  position: absolute;
  top: 44px;
  left: 50%;
  width: max-content;
  font-weight: normal;
  font-size: 16px;
  color: #000000;
}

.loyalty-diagram.has-next-tier .referral-message {
  top: 84px;
}

.referral-message a {
  color: #D74344;
  text-decoration: underline;
  font-weight: 700;
  cursor: pointer;
}

.my-impact-intro {
  font-weight: normal;
}

.my-impact-intro.unsubscribe-flow {
  margin: 0 auto;
  text-align: center;
  width: 60%;
  max-width: 584px;
}

.my-impact-intro.unsubscribe-flow p {
  margin: 0;
}

.my-impact {
  display: flex;
  justify-content: space-between;
  max-width: 410;
  margin-top: 18px;
}

.my-impact-data {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.my-impact-data img {
  height: 55px
}

.my-impact-data h2 {
  font-weight: 500;
  font-size: 14px;
  line-height: 24px;
  margin: 10 0 5;
}

.my-impact-data span {
  font-weight: bold;
  font-size: 24px;
  line-height: 48px;
  letter-spacing: -0.02em;
}

.my-impact-data p {
  font-weight: 500;
  line-height: 24px;
  text-align: center;
  margin: 0;
}

.loyalty-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 27.5px;
}

.loyalty-scroll-button {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  margin: 0;
  padding: 0;
  width: 27.5px;
  height: 27.5px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  -moz-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.25);
  -webkit-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.25);
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.25);
  transform: rotate(0deg);
}

.loyalty-scroll-button.back-button {
  transform: rotate(180deg);
}

.loyalty-scroll-button .nav-arrows {
  color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  line-height: 19px;
  height: 27.5px;
}

.loyalty-scroll-button-fadeOut {
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s linear 300ms, opacity 300ms;
}

.loyalty-scroll-button-fadeIn {
  visibility: visible;
  opacity: 1;
  transition: visibility 0s linear 0s, opacity 300ms;
}

.loyalty-diagram-badge {
  position: absolute;
  height: 32px;
  z-index: 2;
}

.my-impact-notes {
  margin-top: 30px;
}

.my-impact-notes p,
.my-impact-notes sup,
.my-impact-notes sub {
  font-size: 12px !important;
}

/* start rules for element in deliveries view for cancelled subs */
#my-impact-recap,
#my-impact-recap-notes {
  display: none;
}

#my-impact-recap {
  padding: 32px;
  margin: 0 0 24px;
  box-shadow: -2px 2px 10px rgb(0 0 0 / 25%);
  border-radius: 8px;
}

#my-impact-recap h4 {
  font-weight: 700;
  font-size: 20px;
  line-height: 24px;
  margin-bottom: 16px;
}

#my-impact-recap img {
  height: 70px;
  margin-bottom: 16px;
}

#my-impact-recap .my-impact-data span {
  font-size: 20px;
  line-height: 28px;
}

#my-impact-recap .impact-flex-container {
  flex-wrap: wrap;
}

#my-impact-recap .my-impact-data {
  margin: 24px 16px 0;
  flex: 1;
}

#my-impact-recap .my-impact-data p {
  font-weight: 400;
  font-size: 16px;
}

#my-impact-recap-notes p {
  margin: 0 0 8px;
  font-size: 14px !important;
  line-height: 21px;
  color: #4F4F4F;
}

#my-impact-recap-notes a {
  color: #4F4F4F;
}

/* Tablet adjustments */
@media (min-width: 768px) {
  #loyalty-greeting {
    font-size: 24px;
  }

  [data-view="my_niku_journey"] p,
  .loyalty-diagram p {
    font-size: 16px;
  }

  #loyalty-tier-section {
    margin-top: 0px;
    margin-bottom: 40px;
    flex-direction: row;
  }

  #loyalty-tier-section p {
    margin: 16px;
  }

  .loyalty-bigger-badge {
    margin: 16px 16px 16px 0;
    max-width: 150px;
  }

  p.available_credits {
    height: 35px;
    font-size: 20px;
    padding: 0 15px;
    margin-top: 40px;
  }

  .loyalty-diagram {
    margin-bottom: 30px;
  }

  .loyalty-diagram-reward-titles {
    margin-top: -35px;
    font-weight: 500;
    font-size: 16px;
  }

  .my-impact {
    max-width: 500;
    margin-top: 21px;
  }

  .my-impact-data h2 {
    font-size: 16px;
    margin: 10 0;
  }

  .my-impact-data span {
    font-size: 36px;
  }

  /* start rules for element in deliveries view for cancelled subs */
  #my-impact-recap {
    margin: 0 0 32px;
  }

  #my-impact-recap h4 {
    font-size: 24px;
    line-height: 28px;
  }

  #my-impact-recap img {
    height: 100px;
  }

  #my-impact-recap .my-impact-data span {
    font-size: 24px;
  }
}

/* Laptop adjustments */
@media (min-width: 960px) {
  .my-impact {
    max-width: 600;
  }
}