.ba-push-notification {
  position: fixed;
  z-index: 80;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
  visibility: hidden;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ba-push-notification.is-visible {
  pointer-events: auto;
  visibility: visible;
}

.ba-push-notification--top-left { top: max(var(--ba-notification-top, 18px), env(safe-area-inset-top)); left: 18px; }
.ba-push-notification--top-center { top: max(var(--ba-notification-top, 18px), env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); }
.ba-push-notification--top-right { top: max(var(--ba-notification-top, 18px), env(safe-area-inset-top)); right: 18px; }
.ba-push-notification--bottom-left { bottom: max(18px, env(safe-area-inset-bottom)); left: 18px; }
.ba-push-notification--bottom-center { bottom: max(18px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); }
.ba-push-notification--bottom-right { right: 18px; bottom: max(18px, env(safe-area-inset-bottom)); }

.ba-push-notification__card {
  --push-bg: rgba(255, 255, 255, .96);
  --push-fg: #17131c;
  --push-muted: #716975;
  --push-accent: #d84f7c;
  --ba-push-drag-y: 0px;
  position: relative;
  overflow: hidden;
  padding: 12px 13px 9px;
  border: 1px solid rgba(255, 255, 255, .66);
  border-radius: 21px;
  background: var(--push-bg);
  color: var(--push-fg);
  box-shadow: 0 18px 46px rgba(40, 20, 37, .25), 0 2px 6px rgba(40, 20, 37, .13);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  transform: translateY(calc(-10px + var(--ba-push-drag-y))) scale(.985);
  transition: opacity 220ms ease, transform 220ms ease;
}

.ba-push-notification--bottom-left .ba-push-notification__card,
.ba-push-notification--bottom-center .ba-push-notification__card,
.ba-push-notification--bottom-right .ba-push-notification__card { transform: translateY(calc(10px + var(--ba-push-drag-y))) scale(.985); }
.ba-push-notification.is-visible .ba-push-notification__card { opacity: 1; transform: translateY(var(--ba-push-drag-y)) scale(1); }
.ba-push-notification.is-dragging .ba-push-notification__card { transition: none; }
.ba-push-notification.is-dismissing .ba-push-notification__card {
  opacity: 0;
  transform: translateY(calc(var(--ba-push-drag-y) - 120%)) scale(.98);
}
.ba-push-notification--swipeable .ba-push-notification__card { touch-action: none; }

.ba-push-notification--dark .ba-push-notification__card { --push-bg: rgba(28, 27, 32, .96); --push-fg: #fffafc; --push-muted: #bbb4c1; --push-accent: #ff7ca8; }
.ba-push-notification--blue .ba-push-notification__card { --push-bg: rgba(232, 244, 255, .97); --push-fg: #10243b; --push-muted: #58718a; --push-accent: #2f77bd; }
.ba-push-notification--rose .ba-push-notification__card { --push-bg: rgba(255, 237, 244, .97); --push-fg: #3c1729; --push-muted: #8b6073; --push-accent: #d14279; }
.ba-push-notification--gold .ba-push-notification__card { --push-bg: rgba(255, 248, 222, .98); --push-fg: #34280c; --push-muted: #827354; --push-accent: #b98215; }
.ba-push-notification--mint .ba-push-notification__card { --push-bg: rgba(232, 250, 243, .97); --push-fg: #13372b; --push-muted: #607e72; --push-accent: #258860; }

.ba-push-notification__meta,
.ba-push-notification__content,
.ba-push-notification__sponsored {
  display: flex;
}

.ba-push-notification__meta {
  justify-content: space-between;
  align-items: center;
  margin: 0 28px 8px 0;
  color: var(--push-muted);
  font-size: 11px;
  font-weight: 650;
}

.ba-push-notification__app { color: var(--push-fg); }

.ba-push-notification__content {
  align-items: flex-start;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}

.ba-push-notification__content img,
.ba-push-notification__mark {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 11px;
  object-fit: cover;
}

.ba-push-notification__mark {
  display: grid;
  place-items: center;
  background: var(--push-accent);
  color: #fff;
  font-size: 21px;
  font-weight: 850;
}

.ba-push-notification__copy { min-width: 0; flex: 1; }
.ba-push-notification__copy strong { display: block; font-size: 14px; line-height: 1.25; }
.ba-push-notification__copy span { display: block; margin-top: 3px; color: var(--push-muted); font-size: 12px; line-height: 1.35; }

.ba-push-notification__close {
  position: absolute;
  top: 8px;
  right: 9px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--push-muted);
  font: inherit;
  font-size: 20px;
  line-height: 26px;
  cursor: pointer;
}

.ba-push-notification__close:hover,
.ba-push-notification__close:focus-visible { background: color-mix(in srgb, var(--push-fg) 9%, transparent); color: var(--push-fg); }

.ba-push-notification__sponsored {
  justify-content: flex-end;
  margin-top: 8px;
  color: var(--push-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

@media (max-width: 640px) {
  .ba-push-notification {
    width: calc(100vw - 32px);
  }
  .ba-push-notification--top-left,
  .ba-push-notification--top-center,
  .ba-push-notification--top-right {
    top: calc(env(safe-area-inset-top) + 8px);
    left: 10px;
    right: 10px;
    z-index: 1100;
    width: auto;
    transform: none;
  }
  .ba-push-notification__copy strong,
  .ba-push-notification__copy span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .ba-push-notification[data-show-close-button="false"] .ba-push-notification__close { display: none; }
  .ba-push-notification[data-show-close-button="false"] .ba-push-notification__meta { margin-right: 0; }
  .ba-push-notification--bottom-left { bottom: calc(76px + env(safe-area-inset-bottom)); left: 16px; }
  .ba-push-notification--bottom-center { bottom: calc(76px + env(safe-area-inset-bottom)); left: 50%; }
  .ba-push-notification--bottom-right { right: 16px; bottom: calc(76px + env(safe-area-inset-bottom)); }
}

@media (min-width: 641px) and (max-width: 1023px) {
  .ba-push-notification--bottom-left,
  .ba-push-notification--bottom-center,
  .ba-push-notification--bottom-right { bottom: calc(76px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  .ba-push-notification__card { transition: none; }
}

/* The video unit is a small, silent, moving corner of the page.
   The sizes below keep it inside the screen-coverage limits Google's own
   publisher guidance sets for a floating ad: at most a quarter of a phone
   screen and well under a tenth of a desktop one. */
.ba-video-slider {
  position: fixed;
  z-index: 90;
  bottom: max(12px, env(safe-area-inset-bottom));
  width: min(426px, 88vw);
  aspect-ratio: 16 / 9;
  transform: translateX(-115%);
  transition: transform .6s cubic-bezier(.22, .61, .36, 1);
  pointer-events: none;
  visibility: hidden;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ba-video-slider--bottom-left { left: 12px; }
.ba-video-slider--bottom-right { right: 12px; }
.ba-video-slider--right { transform: translateX(115%); }

.ba-video-slider.is-visible {
  transform: translateX(0);
  pointer-events: auto;
  visibility: visible;
}

.ba-video-slider.is-dismissing {
  transition: transform .24s ease-in, opacity .24s ease-in;
  opacity: 0;
}

.ba-video-slider__link {
  position: relative;
  display: block;
  line-height: 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .32);
}

.ba-video-slider__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0c0c10;
}

.ba-video-slider__sponsored {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, .62);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.6;
  text-transform: uppercase;
}

.ba-video-slider__close {
  position: absolute;
  top: -9px;
  right: -9px;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 50%;
  background: rgba(12, 12, 16, .92);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.ba-video-slider__close:hover,
.ba-video-slider__close:focus-visible { background: #1d1d24; }

@media (min-width: 641px) {
  .ba-video-slider {
    bottom: max(16px, env(safe-area-inset-bottom));
    width: min(426px, 26vw);
  }
  .ba-video-slider--bottom-left { left: 16px; }
  .ba-video-slider--bottom-right { right: 16px; }
}

/* Below the desktop breakpoint the mobile tab bar is fixed to the bottom edge
   and its height is decided by its own content. The runtime measures it and
   publishes it as --ba-mobile-bar-height; the floor is the one the push
   notification uses for the same bar, so a unit pinned to the edge rests on
   top of the bar instead of sliding in behind it. */
@media (max-width: 1023px) {
  .ba-video-slider {
    bottom: calc(max(76px, var(--ba-mobile-bar-height, 0px) + 12px) + env(safe-area-inset-bottom, 0px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .ba-video-slider { transition: none; }
  .ba-video-slider.is-dismissing { transition: opacity .12s ease-in; }
}
