.context-popup-backdrop[hidden],
.context-bottom-bar[hidden] { display: none !important; }

.context-popup-backdrop {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgb(24 11 38 / 68%);
  backdrop-filter: blur(5px);
}

.context-popup {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 15px 18px;
  width: min(620px, 100%);
  max-height: min(84vh, 680px);
  overflow: auto;
  padding: 30px;
  color: #fff;
  background: #f2e5cf;
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: 22px;
  box-shadow: 0 24px 80px rgb(15 5 25 / 38%);
}

body.context-popup-open { overflow: hidden; }

.context-popup:focus { outline: none; }
.context-popup:focus-visible { outline: 3px solid #f5c64a; outline-offset: 5px; }

.context-popup__close,
.context-bottom-bar__close {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: inherit;
  background: rgb(255 255 255 / 10%);
  border: 1px solid rgb(255 255 255 / 28%);
  border-radius: 50%;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.context-popup__close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.context-popup__close:focus-visible,
.context-bottom-bar__close:focus-visible,
.context-popup__cta:focus-visible,
.context-bottom-bar__cta:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.context-popup__mark {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  color: #30174f;
  background: #e8d85c;
  border-radius: 21px 21px 21px 7px;
  font-size: 2rem;
  font-weight: 900;
  transform: rotate(-5deg);
}

.context-popup__copy { align-self: center; padding-right: 28px; }
.context-popup__copy .eyebrow { color: #f5c64a; }
.context-popup__copy h2 { margin: 6px 0 8px; color: #fff; font: 800 clamp(1.35rem, 3vw, 1.85rem)/1.15 Manrope, sans-serif; letter-spacing: -.045em; }
.context-popup__copy p { margin: 0; color: #f2eaf6; font-size: .95rem; line-height: 1.6; }

.context-popup__cta {
  grid-column: 2;
  display: inline-flex;
  width: fit-content;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 19px;
  color: #30174f;
  background: #f5c64a;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 800;
  text-decoration: none;
}

.context-bottom-bar { display: none; }

@media (max-width: 767px) {
  .context-popup-backdrop { display: none !important; }
  .context-bottom-bar:not([hidden]) {
    position: fixed;
    z-index: 8;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 10px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 44px;
    align-items: center;
    gap: 9px;
    min-height: 72px;
    padding: 11px 12px 11px 16px;
    color: #fff;
    background: #492738;
    border: 1px solid rgb(255 255 255 / 24%);
    border-radius: 17px;
    box-shadow: 0 10px 32px rgb(19 8 29 / 32%);
  }

  body.context-bottom-bar-visible { padding-bottom: calc(var(--context-bar-height, 72px) + max(20px, calc(env(safe-area-inset-bottom, 0px) + 10px))); }
  .context-bottom-bar__copy { display: grid; min-width: 0; gap: 3px; }
  .context-bottom-bar__copy span { overflow: hidden; color: #f5c64a; font-size: .63rem; font-weight: 800; letter-spacing: .06em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
  .context-bottom-bar__copy b { display: -webkit-box; overflow: hidden; font-size: .8rem; line-height: 1.3; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .context-bottom-bar__cta { display: inline-flex; max-width: 132px; min-height: 44px; align-items: center; justify-content: center; padding: 8px 10px; color: #30174f; background: #f5c64a; border-radius: 999px; font-size: .72rem; font-weight: 800; line-height: 1.15; text-align: center; text-decoration: none; }
  .context-bottom-bar__close { width: 44px; height: 44px; font-size: 1.25rem; }
  .mobile-nav-open .context-bottom-bar:not([hidden]) { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .context-popup-backdrop { backdrop-filter: none; }
}
