.cp-price-tools {
  display: grid;
  grid-template-columns: minmax(min-content, 1fr) minmax(0, auto);
  grid-template-areas: "currency offer" "tiers tiers";
  align-items: center;
  gap: 8px;
}

.cp-price-tools > .cur-sw {
  grid-area: currency;
  justify-self: start;
  margin: 0 !important;
}

.cp-price-tools > .cp-tiers {
  grid-area: tiers;
}

.cp-price-offer {
  grid-area: offer;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin: 0;
  padding: 7px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue-glow), var(--blue-deep));
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

@media (max-width: 1199px) {
  .cp-price-tools > .cur-sw > span {
    display: none;
  }

  .cp-price-tools > .cur-sw > button {
    padding-inline: 9px;
  }
}

@media (max-width: 767px) {
  .cp-price-tools {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "currency" "tiers" "offer";
  }

  .cp-price-tools > .cur-sw {
    justify-self: center;
  }

  .cp-price-offer {
    min-height: 56px;
    font-size: 14px;
  }
}

@media (max-width: 899px) {
  .cp-bar {
    padding: 0;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .cp-bar button {
    width: 100%;
  }
}

@media (min-width: 768px) and (max-width: 960px) {
  .cp-price-tools > .cur-sw > button {
    padding-inline: 6px;
  }

  .cp-price-offer {
    padding-inline: 9px;
    font-size: 12px;
  }
}

button.cp-price-offer {
  border: 0;
  font-family: inherit;
  cursor: pointer;
}

button.cp-price-offer:hover {
  filter: brightness(1.08);
}

button.cp-price-offer:focus-visible,
.cp-offer-close:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.cp-offer-dialog {
  position: fixed;
  inset: 0;
  width: min(390px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 12px;
  overflow: auto;
  border: 0;
  border-radius: 22px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 22px 64px rgba(13, 15, 51, .28);
}

.cp-offer-dialog::backdrop {
  background: rgba(4, 6, 15, .42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

html:has(.cp-offer-dialog[open]) {
  overflow: hidden;
}

.cp-offer-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 13px;
}

.cp-offer-copy {
  padding: 14px 7px 8px;
}

.cp-offer-copy h2 {
  margin: 0 0 8px;
  font-size: clamp(19px, 5vw, 24px);
  line-height: 1.2;
  letter-spacing: -.025em;
}

.cp-offer-copy p {
  margin: 0;
  color: #4a4e78;
  font-size: 14px;
  line-height: 1.55;
}

.cp-offer-copy p + p {
  margin-top: 8px;
}

.cp-offer-close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

button.cp-price-offer {
  flex-wrap: wrap;
  gap: 3px 9px;
  line-height: 1.2;
}

.cp-offer-equation {
  font-size: 1.2em;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .cp-offer-dialog {
    width: min(580px, calc(100% - 48px));
    padding: 16px;
    border-radius: 24px;
  }

  .cp-offer-copy {
    padding: 20px 10px 10px;
  }

  .cp-offer-copy h2 {
    margin-bottom: 10px;
    font-size: 30px;
  }

  .cp-offer-copy p {
    font-size: 16px;
  }

  .cp-offer-close {
    top: 24px;
    right: 24px;
  }
}
