:root {
  --sticky-cta-height: calc(81px + env(safe-area-inset-bottom, 0px));
  scroll-padding-bottom: calc(var(--sticky-cta-height) + 16px);
}

.has-sticky-cta {
  padding-bottom: var(--sticky-cta-height);
}

.sticky-cta {
  position: fixed;
  z-index: 900;
  bottom: 0;
  left: 50%;
  width: min(100%, 960px);
  padding: 12px max(24px, env(safe-area-inset-right, 0px))
    calc(12px + env(safe-area-inset-bottom, 0px))
    max(24px, env(safe-area-inset-left, 0px));
  border-top: 1px solid var(--line, #d7e2ef);
  background: #fff;
  box-shadow: 0 -6px 24px rgb(7 27 50 / 7%);
  transform: translateX(-50%);
}

.sticky-cta-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: min(100%, 680px);
  min-height: 56px;
  margin-inline: auto;
  padding: 12px 20px;
  border-radius: 12px;
  background: linear-gradient(110deg, #0757be, #0050b8);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
}

.sticky-cta-button > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.sticky-cta-arrow {
  position: relative;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
}

.sticky-cta-arrow::before {
  position: absolute;
  top: 9px;
  left: 0;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  content: "";
}

.sticky-cta-arrow::after {
  position: absolute;
  top: 5px;
  right: 2px;
  width: 10px;
  height: 10px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  content: "";
}

.has-sticky-cta .page-top {
  bottom: calc(var(--sticky-cta-height) + 16px);
}

@media (hover: hover) {
  .sticky-cta-button:hover {
    filter: brightness(1.08);
  }
}

@media (max-width: 767px) {
  :root {
    --sticky-cta-height: calc(73px + env(safe-area-inset-bottom, 0px));
  }

  .sticky-cta {
    padding: 10px max(14px, env(safe-area-inset-right, 0px))
      calc(10px + env(safe-area-inset-bottom, 0px))
      max(14px, env(safe-area-inset-left, 0px));
  }

  .sticky-cta-button {
    gap: 12px;
    min-height: 52px;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 16px;
  }

  .has-sticky-cta .page-top {
    bottom: calc(var(--sticky-cta-height) + 12px);
  }
}

@media print {
  .has-sticky-cta {
    padding-bottom: 0;
  }

  .sticky-cta,
  .has-sticky-cta .page-top {
    display: none;
  }
}
