/* First-visit offer card.
   Colours come from DESIGN.md. The card declares its own tokens and sets `color` on the same
   rule as `background`, then flips the tokens on html[data-bnb-theme="dark"] — the attribute this
   site actually uses. An earlier version keyed off prefers-color-scheme and [data-theme], neither
   of which this site sets, so the card stayed white while the page's dark heading colour bled
   through and the title became unreadable.
   The !important rules beat two site-wide !important rules: the heading colour in ui-system.css
   and the dark-mode link colour; and the theme styles every bare <button> gold, which the close
   control must opt out of. */

.bnb-offer-pop{
  --pop-sheet:#fff; --pop-ink:#102b4e; --pop-muted:#56677d; --pop-line:#dfe4ea;
  --pop-row:#fbfaf6; --pop-kicker:#8a650a; --pop-good:#216846; --pop-code-br:#65748a;
  position:fixed;inset:0;z-index:99990;display:flex;align-items:center;justify-content:center;
  padding:16px;background:rgba(7,11,18,.62);overflow-y:auto;color:var(--pop-ink)
}
html[data-bnb-theme="dark"] .bnb-offer-pop{
  --pop-sheet:#102744; --pop-ink:#f4f1ea; --pop-muted:#b3c2d5; --pop-line:#304764;
  --pop-row:#070b12; --pop-kicker:#f0c75a; --pop-good:#6fd39b; --pop-code-br:#8496ad
}
.bnb-offer-pop[hidden]{display:none}

.bnb-offer-pop-sheet{position:relative;width:100%;max-width:440px;background:var(--pop-sheet);
  color:var(--pop-ink);border-radius:16px;padding:28px 24px 22px;
  box-shadow:0 24px 64px rgba(7,11,18,.34);font-family:'Noto Sans Bengali',system-ui,sans-serif}

/* The theme paints every bare <button> gold; these two are not that kind of button. */
.bnb-offer-pop .bnb-offer-pop-x,
.bnb-offer-pop .bnb-offer-pop-later{background:none!important;border:0!important;box-shadow:none!important}
.bnb-offer-pop .bnb-offer-pop-x{position:absolute;top:8px;right:10px;width:36px;height:36px;
  font-size:26px;line-height:1;color:var(--pop-muted)!important;cursor:pointer;border-radius:9999px!important;padding:0}
.bnb-offer-pop .bnb-offer-pop-x:hover{background:var(--pop-row)!important}

.bnb-offer-pop-kicker{margin:0 0 4px;font-size:.78rem;letter-spacing:.06em;font-weight:600;
  color:var(--pop-kicker)}
.bnb-offer-pop-sheet h2{margin:0 0 16px;font-family:'Tiro Bangla',serif;font-weight:400;
  font-size:clamp(1.45rem,5vw,1.8rem);line-height:1.25}
html[data-bnb-theme] .bnb-offer-pop-sheet h2{color:var(--pop-ink)!important}

.bnb-offer-pop-list{list-style:none;margin:0 0 20px;padding:0;display:grid;gap:10px}
.bnb-offer-pop-list li{display:grid;grid-template-columns:1fr auto;gap:2px 10px;align-items:center;
  padding:12px 14px;background:var(--pop-row);color:var(--pop-ink);
  border:1px solid var(--pop-line);border-radius:10px}
.bnb-offer-pop-what{grid-column:1;font-weight:600;font-size:.97rem;color:var(--pop-ink)}
.bnb-offer-pop-detail{grid-column:1;font-size:.84rem;color:var(--pop-muted)}
.bnb-offer-pop-price{grid-column:2;grid-row:1/span 2;text-align:right;white-space:nowrap;
  font-size:.95rem;color:var(--pop-ink)}
.bnb-offer-pop-price s{color:var(--pop-muted);font-size:.82rem}
.bnb-offer-pop-price b{color:var(--pop-good)}

.bnb-offer-pop .bnb-offer-pop-code{grid-column:1/-1;justify-self:start;margin-top:6px;
  display:inline-flex;gap:8px;align-items:baseline;font:inherit;font-weight:700;letter-spacing:.08em;
  cursor:pointer;padding:7px 12px;border:1px dashed var(--pop-code-br)!important;border-radius:8px!important;
  background:var(--pop-sheet)!important;color:var(--pop-ink)!important}
.bnb-offer-pop-code small{font-weight:400;letter-spacing:0;color:var(--pop-muted)}
.bnb-offer-pop .bnb-offer-pop-code:hover{border-style:solid!important;background:var(--pop-row)!important}
.bnb-offer-pop-code[data-copied] small{color:var(--pop-good)}

.bnb-offer-pop .bnb-offer-pop-go{display:block;text-align:center;padding:14px 18px;
  border-radius:9999px;background:#e3b23c!important;color:#10213c!important;font-weight:700;
  text-decoration:none!important}
.bnb-offer-pop .bnb-offer-pop-go:hover{background:#f0c75a!important;color:#10213c!important}
.bnb-offer-pop .bnb-offer-pop-later{display:block;width:100%;margin-top:8px;padding:10px;
  font:inherit;color:var(--pop-muted)!important;cursor:pointer;text-decoration:underline}

.bnb-offer-pop :is(.bnb-offer-pop-code,.bnb-offer-pop-go,.bnb-offer-pop-later,.bnb-offer-pop-x):focus-visible{
  outline:3px solid var(--pop-kicker);outline-offset:2px}

.bnb-offer-confetti{position:fixed;inset:0;z-index:99991;pointer-events:none}

@media (max-width:420px){
  .bnb-offer-pop-sheet{padding:24px 18px 18px}
  .bnb-offer-pop-list li{grid-template-columns:1fr}
  .bnb-offer-pop-price{grid-column:1;grid-row:auto;text-align:left}
}

/* The card is the message; the confetti is decoration and goes first. */
@media (prefers-reduced-motion:reduce){
  .bnb-offer-confetti{display:none!important}
}
