.fsp-progress {
  --fsp-accent: #45c6d7;
  --fsp-track: #e7e7e7;
  --fsp-text: #222222;
  --fsp-icon-color: #00a9e0;
  --fsp-radius: 999px;
  --fsp-height: 6px;

  position: relative;
  box-sizing: border-box;
  width: 100%;
  margin: 1rem 0 1.25rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--fsp-text);
  font-family: inherit;
}

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

.fsp-progress__message {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  margin: 0 0 0.7rem;
  color: var(--fsp-text);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.35;
}

.fsp-progress__info {
  position: relative;
  z-index: 30;
  display: inline-flex;
  flex: 0 0 22px;
  align-items: center;
  justify-content: center;
  width: 22px;
  min-width: 22px;
  height: 22px;
  min-height: 22px;
}

/*
 * Stronger reset is intentional. Some custom themes style every <button>
 * globally, which previously turned the icon into a blank grey square.
 */
.fsp-progress button.fsp-progress__icon-button {
  -webkit-appearance: none !important;
  appearance: none !important;
  display: inline-flex !important;
  flex: 0 0 22px !important;
  align-items: center !important;
  justify-content: center !important;
  width: 22px !important;
  min-width: 22px !important;
  max-width: 22px !important;
  height: 22px !important;
  min-height: 22px !important;
  max-height: 22px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--fsp-icon-color) !important;
  font: inherit !important;
  line-height: 1 !important;
  text-decoration: none !important;
  cursor: pointer;
  touch-action: manipulation;
}

.fsp-progress button.fsp-progress__icon-button svg {
  display: block !important;
  width: 22px !important;
  min-width: 22px !important;
  height: 22px !important;
  min-height: 22px !important;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.fsp-progress button.fsp-progress__icon-button:hover {
  filter: brightness(0.9);
}

.fsp-progress button.fsp-progress__icon-button:focus-visible {
  outline: 2px solid var(--fsp-icon-color) !important;
  outline-offset: 3px;
}

.fsp-progress__tooltip,
.fsp-progress [data-fsp-tooltip] {
  position: absolute !important;
  right: auto !important;
  bottom: calc(100% + 0.75rem) !important;
  left: -0.45rem !important;
  z-index: 1000 !important;
  display: block !important;
  width: 320px !important;
  max-width: min(320px, calc(100vw - 2rem)) !important;
  margin: 0 !important;
  padding: 1rem 1.1rem !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: #111111 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2) !important;
  color: #ffffff !important;
  font-family: inherit !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  line-height: 1.38 !important;
  text-align: center !important;
  white-space: normal !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition:
    opacity 160ms ease,
    visibility 160ms ease,
    transform 160ms ease;
}

.fsp-progress__tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 14px;
  width: 12px;
  height: 12px;
  background: #111111;
  transform: translateY(-7px) rotate(45deg);
}

.fsp-progress__info.is-open .fsp-progress__tooltip,
.fsp-progress__info:focus-within .fsp-progress__tooltip {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

@media (hover: hover) and (pointer: fine) {
  .fsp-progress__info:hover .fsp-progress__tooltip {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }
}

.fsp-progress__tooltip-intro,
.fsp-progress__tooltip-title {
  margin: 0 !important;
  padding: 0 !important;
  color: inherit !important;
  font: inherit !important;
  line-height: inherit !important;
}

.fsp-progress__tooltip-title {
  margin-top: 0.65rem !important;
  font-weight: 700 !important;
}

.fsp-progress__tooltip-list {
  margin: 0.3rem 0 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.fsp-progress__tooltip-list li {
  display: block !important;
  margin: 0.12rem 0 !important;
  padding: 0 !important;
  color: inherit !important;
  font: inherit !important;
  line-height: inherit !important;
}

.fsp-progress__tooltip-list li::before {
  content: '• ';
}

.fsp-progress__message-text {
  display: block;
  min-width: 0;
  flex: 1 1 auto;
}

.fsp-progress__track {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: var(--fsp-height);
  border-radius: var(--fsp-radius);
  background: var(--fsp-track);
}

.fsp-progress__fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--fsp-accent);
  transition: width 450ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: width;
}

.fsp-progress__values {
  margin-top: 0.45rem;
  color: var(--fsp-text);
  font-size: 0.75rem;
  line-height: 1.2;
  text-align: right;
  opacity: 0.62;
}

.fsp-progress--achieved .fsp-progress__message {
  color: var(--fsp-text);
}

@media (max-width: 767px) {
  .fsp-progress {
    margin: 0.875rem 0 1rem;
  }

  .fsp-progress__message {
    gap: 0.5rem;
    font-size: 0.875rem;
  }

  .fsp-progress__tooltip,
  .fsp-progress [data-fsp-tooltip] {
    width: min(300px, calc(100vw - 2rem)) !important;
    padding: 0.9rem 1rem !important;
    font-size: 0.8125rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fsp-progress__fill,
  .fsp-progress__tooltip {
    transition: none;
  }
}
