/* Widget: Milestones */

.sla-milestones {
  padding-top: 48px;
  background: #f6f6f6;
}

.sla-milestones__heading {
  margin: 0 0 8px;
  padding: 0 15px;
  font-family: var(--sla-font-body);
  font-size: 32px;
  font-weight: 500;
  line-height: 35.2px;
  color: #201c1c;
  text-align: center;
}

/* Buttons and panels are siblings: buttons first (order 0), panels after (order 1). */
.sla-milestones__track {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 3px 15px 0;
}

.sla-milestones__year {
  order: 0;
  width: 64px;
  height: 64px;
  margin: 3.2px 5px;
  padding: 0;
  font-size: 14px;
  line-height: 64px;
  color: #222;
  text-align: center;
  background: #efe9e9;
  border: 0;
  border-radius: 48px;
}

.sla-milestones__year[aria-selected="true"] {
  background: #fff;
}

.sla-milestones__panel {
  order: 1;
  flex: 0 0 calc(100% + 30px);
  margin: 16px -15px 0;
  padding: 16px 15px;
  text-align: center;
  background: #fff;
}

.sla-milestones__panel > * {
  max-width: 808px;
  margin-right: auto;
  margin-left: auto;
}

.sla-milestones__date {
  margin-bottom: 32px;
  padding-top: 8px;
  font-family: "Raleway Light", var(--sla-font-display);
  font-size: 27.2px;
  font-weight: 500;
  line-height: 29.92px;
  color: #959da3;
}

.sla-milestones__entry {
  margin-bottom: 24px;
}

.sla-milestones__icon {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.sla-milestones__text {
  display: block;
  margin-top: 2px;
  font-size: 16px;
  font-weight: 100;
  line-height: 24px;
  letter-spacing: 0.32px;
  color: #444;
}

/* Phones: vertical list of large circles, each followed by its panel. */
@media (max-width: 767.98px) {
  .sla-milestones__track {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
    padding-bottom: 16px;
  }

  .sla-milestones__year,
  .sla-milestones__panel {
    order: 0;
  }

  .sla-milestones__year {
    width: 96px;
    height: 96px;
    margin: 9px 0;
    font-size: 16px;
    line-height: 96px;
    background: #fff;
  }

  .sla-milestones__panel {
    flex-basis: auto;
    width: calc(100% + 30px);
    margin: 25px -15px;
  }
}

/* Fade in a panel's contents when its year is selected. */
.sla-milestones__panel:not([hidden]) > * {
  animation: sla-milestones-fade-in 700ms ease-out;
}

@keyframes sla-milestones-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sla-milestones__panel:not([hidden]) > * {
    animation: none;
  }
}
