.footer-ad-inline {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
}
.footer-ad {
  position: relative;
  display: inline-block;
}

.footer-ad__trigger {
  all: unset;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.footer-ad__visual {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.footer-ad__image {
  display: block;
  width: auto;
  max-width: 140px;
  height: 34px;
  border-radius: .6rem;
  opacity: .92;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
  transition: transform .2s ease, opacity .2s ease, filter .2s ease, box-shadow .2s ease;
}

.footer-ad__trigger:hover .footer-ad__image,
.footer-ad__trigger:focus .footer-ad__image {
  opacity: 1;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.footer-ad__text-visual {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .35rem .7rem;
  border: 1px solid color-mix(in srgb, var(--bs-primary) 35%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bs-primary) 15%, transparent);
  color: var(--bs-body-color);
  font-size: .8rem;
  font-weight: 600;
  transition: background-color .2s ease, color .2s ease;
}

.footer-ad__trigger:hover .footer-ad__text-visual {
  background: color-mix(in srgb, var(--bs-primary) 22%, transparent);
  color: var(--bs-primary);
}

.footer-ad__tooltip {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  z-index: var(--jm-z-docked-ui);
  min-width: 260px;
  max-width: 320px;
  padding: .9rem 1rem;
  border: 1px solid color-mix(in srgb, var(--bs-border-color) 80%, transparent);
  border-radius: .9rem;
  background:
    radial-gradient(600px 200px at 50% -40%, rgba(var(--bs-primary-rgb), .15), transparent 60%),
    color-mix(in srgb, var(--bs-body-bg) 92%, #0b1020 8%);
  color: var(--bs-body-color);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .25), 0 4px 12px rgba(0, 0, 0, .12);
  opacity: 0;
  pointer-events: none;
  text-align: left;
  backdrop-filter: blur(10px);
  transform: translateX(-50%) translateY(8px);
  transition: opacity .18s ease, transform .18s ease;
}

.footer-ad__tooltip.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%);
}

.footer-ad__tooltip::after {
  position: absolute;
  top: 100%;
  left: 50%;
  width: 12px;
  height: 12px;
  border-right: 1px solid color-mix(in srgb, var(--bs-border-color) 80%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--bs-border-color) 80%, transparent);
  background: inherit;
  content: "";
  transform: translateX(-50%) rotate(45deg);
}

.footer-ad__tooltip-title {
  display: block;
  margin-bottom: .35rem;
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.25;
}

.footer-ad__tooltip-body {
  display: block;
  color: var(--bs-secondary-color);
  font-size: .8rem;
  line-height: 1.45;
}

.footer-ad__tooltip-cta {
  display: inline-block;
  margin-top: .55rem;
  color: var(--bs-primary);
  font-size: .8rem;
  font-weight: 700;
  text-decoration: none;
}

.footer-ad__tooltip-cta:hover {
  text-decoration: underline;
}

.footer-ad__close {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1px solid color-mix(in srgb, var(--bs-border-color) 70%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bs-body-bg) 85%, black 15%);
  color: var(--bs-body-color);
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease;
}

.footer-ad__close:hover {
  background: color-mix(in srgb, var(--bs-danger) 20%, transparent);
  color: var(--bs-danger);
}

.footer-ad--fallback .footer-ad__image {
  height: 30px;
  opacity: .75;
  box-shadow: none;
}

.footer-ad--fallback .footer-ad__image:hover {
  opacity: 1;
}
