.cb-course-offer {
  --cb-offer-blue: var(--blue, #2563eb);
  --cb-offer-green: var(--green, #13b981);
  --cb-offer-ink: var(--ink, #101828);
  position: fixed;
  z-index: 9990;
  right: clamp(16px, 2.5vw, 34px);
  bottom: clamp(16px, 2.5vw, 30px);
  width: min(410px, calc(100vw - 32px));
  max-height: min(650px, calc(100vh - 32px));
  overflow: auto;
  color: var(--cb-offer-ink);
  background:
    radial-gradient(circle at 100% 0, rgba(37, 99, 235, .12), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(245, 250, 255, .94));
  border: 1px solid rgba(255, 255, 255, .95);
  border-radius: var(--cb-radius-md, 20px);
  box-shadow:
    inset 0 1.5px 1px #fff,
    0 24px 60px rgba(16, 24, 40, .16),
    0 0 0 1px rgba(148, 163, 184, .18);
  font-family: var(--font-body, Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  opacity: 0;
  transform: translate3d(calc(100% + 48px), 0, 0);
  transition: opacity .28s ease, transform .42s cubic-bezier(.16, 1, .3, 1);
  overscroll-behavior: contain;
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}

.cb-course-offer::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--cb-offer-blue), #7c5ce7 52%, var(--cb-offer-green));
}

.cb-course-offer.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.cb-course-offer.is-leaving {
  opacity: 0;
  transform: translate3d(24px, 0, 0);
}

.cb-course-offer__close {
  position: absolute;
  z-index: 3;
  top: 13px;
  right: 13px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: #475569;
  background: rgba(255, 255, 255, .86);
  border: 1px solid rgba(148, 163, 184, .25);
  border-radius: 999px;
  box-shadow: inset 0 1px 1px #fff, 0 5px 14px rgba(16, 24, 40, .08);
  cursor: pointer;
}

.cb-course-offer__close:hover,
.cb-course-offer__close:focus-visible {
  color: var(--cb-offer-blue);
  background: #fff;
  border-color: rgba(37, 99, 235, .4);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .14);
  outline: none;
}

.cb-course-offer__close svg,
.cb-course-offer__cta svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cb-course-offer__media {
  height: 112px;
  background:
    linear-gradient(180deg, rgba(245, 250, 255, .08), rgba(245, 250, 255, .94) 108%),
    var(--cb-offer-image) center 42% / cover no-repeat;
  border-radius: var(--cb-radius-md, 20px) var(--cb-radius-md, 20px) 0 0;
}

.cb-course-offer__body {
  padding: 22px;
}

.cb-course-offer__topline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-right: 34px;
}

.cb-course-offer__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #1e40af;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.cb-course-offer__eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--cb-offer-green);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(19, 185, 129, .7);
}

.cb-course-offer__badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 9px;
  color: #4a2c00;
  background: linear-gradient(135deg, #ffeb72, #ffcd38);
  border: 1px solid rgba(206, 151, 0, .16);
  border-radius: 999px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .8), 0 4px 12px rgba(255, 193, 7, .18);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.cb-course-offer h2 {
  margin: 12px 0 8px;
  color: var(--cb-offer-ink);
  font-family: var(--font-heading, "Plus Jakarta Sans", Inter, sans-serif);
  font-size: clamp(21px, 3vw, 26px);
  line-height: 1.18;
  letter-spacing: -.035em;
}

.cb-course-offer__body > p {
  margin: 0;
  color: #526277;
  font-size: 13px;
  line-height: 1.58;
}

.cb-course-offer__highlights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.cb-course-offer__highlights li {
  position: relative;
  min-width: 0;
  padding: 9px 9px 9px 28px;
  color: #334155;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(148, 163, 184, .2);
  border-radius: 11px;
  box-shadow: inset 0 1px 1px #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.cb-course-offer__highlights li::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 13px;
  width: 8px;
  height: 5px;
  border-left: 2px solid var(--cb-offer-green);
  border-bottom: 2px solid var(--cb-offer-green);
  transform: rotate(-45deg);
}

.cb-course-offer__footer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.cb-course-offer__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 17px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border: 1px solid rgba(29, 78, 216, .35);
  border-radius: var(--cb-radius-sm, 12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .38), 0 9px 22px rgba(37, 99, 235, .25);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.cb-course-offer__cta:hover,
.cb-course-offer__cta:focus-visible {
  color: #fff;
  background: linear-gradient(135deg, #1d4ed8, #173a8a);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 13px 28px rgba(37, 99, 235, .34);
  outline: 3px solid rgba(37, 99, 235, .2);
  outline-offset: 3px;
  transform: translateY(-1px);
}

.cb-course-offer__course {
  min-width: 0;
  padding: 5px 8px;
  color: #047857;
  background: rgba(19, 185, 129, .09);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .cb-course-offer {
    left: 10px;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    width: auto;
    max-height: min(68vh, 520px);
    border-radius: 17px;
    transform: translate3d(0, calc(100% + 28px), 0);
  }

  .cb-course-offer.is-visible {
    transform: translate3d(0, 0, 0);
  }

  .cb-course-offer.is-leaving {
    transform: translate3d(0, 22px, 0);
  }

  .cb-course-offer__media {
    height: 78px;
    border-radius: 16px 16px 0 0;
  }

  .cb-course-offer__body {
    padding: 16px;
  }

  .cb-course-offer h2 {
    margin-top: 10px;
    font-size: 19px;
  }

  .cb-course-offer__body > p {
    font-size: 12px;
  }

  .cb-course-offer__highlights {
    grid-template-columns: 1fr;
    gap: 5px;
    margin-top: 13px;
  }

  .cb-course-offer__highlights li:nth-child(n+3) {
    display: none;
  }

  .cb-course-offer__footer {
    align-items: stretch;
    flex-direction: column;
    gap: 7px;
    margin-top: 14px;
  }

  .cb-course-offer__cta {
    width: 100%;
  }

  .cb-course-offer__course {
    align-self: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cb-course-offer,
  .cb-course-offer__cta {
    scroll-behavior: auto;
    transition-duration: .01ms;
  }
}
