/* ════════════════════════════════════════════════════════════════
   Beat the Queue — SWIQ mini-game widget
   All selectors prefixed bq- so the widget never clashes with host pages.
   One-command removal: bash seo/remove-widget.sh
   ════════════════════════════════════════════════════════════════ */

.bq-mount { margin: 26px 0; }

.bq-card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(135deg, #0a1f44 0%, #123a7a 55%, #1d53c4 100%);
  color: #fff;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  box-shadow: 0 10px 30px rgba(10, 31, 68, .25);
  border: 1px solid rgba(255, 255, 255, .14);
  user-select: none;
  -webkit-user-select: none;
}
.bq-card * { box-sizing: border-box; }

/* ── Icons (inline SVG) ─────────────────────────────────────── */
.bq-ico { display: inline-block; flex: none; vertical-align: middle; }
.bq-gold { color: #ffd166; }
.bq-heart.fill { fill: currentColor; }
.bq-heart.dead { opacity: .28; fill: none; }
.bq-icn { display: inline-block; vertical-align: -3px; }

/* ── Teaser ─────────────────────────────────────────────────── */
.bq-teaser { padding: 22px 24px; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.bq-teaser-emoji {
  color: #67e8f9;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.35));
  animation: bq-bob 2.4s ease-in-out infinite;
}
.bq-teaser-emoji svg { width: 46px; height: 46px; }
@keyframes bq-bob { 0%,100% { transform: translateY(0) rotate(-4deg);} 50% { transform: translateY(-7px) rotate(4deg);} }
.bq-teaser-body { flex: 1; min-width: 210px; }
.bq-kicker {
  display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: #ffd166; margin-bottom: 5px;
}
.bq-teaser h3 { margin: 0 0 6px; font-size: 21px; font-weight: 900; letter-spacing: -.3px; }
.bq-teaser p { margin: 0; font-size: 14px; line-height: 1.55; color: rgba(255,255,255,.82); }
.bq-play {
  appearance: none; border: 0; cursor: pointer;
  background: linear-gradient(135deg, #ffd166, #ff9f1c);
  color: #25150a; font-weight: 900; font-size: 16px;
  padding: 15px 30px; border-radius: 999px;
  box-shadow: 0 8px 22px rgba(255, 159, 28, .42);
  transition: transform .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.bq-play:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 12px 26px rgba(255,159,28,.5); }
.bq-play:active { transform: scale(.97); }
.bq-teaser-sub { display: block; margin-top: 8px; font-size: 12px; color: rgba(255,255,255,.6); text-align: center; }

/* ── Game stage ─────────────────────────────────────────────── */
.bq-stage { display: none; padding: 16px 18px 20px; }
.bq-card.playing .bq-teaser { display: none; }
.bq-card.playing .bq-stage { display: block; }
.bq-card.over .bq-teaser { display: none; }
.bq-card.over .bq-stage { display: none; }

.bq-hud {
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 800; font-size: 15px; margin-bottom: 12px;
  background: rgba(255,255,255,.1); border-radius: 12px; padding: 9px 14px;
}
.bq-hud > span { display: inline-flex; align-items: center; gap: 6px; min-width: 74px; }
.bq-hud .bq-center { justify-content: center; }
.bq-hud .bq-right { justify-content: flex-end; font-variant-numeric: tabular-nums; }
.bq-lives { display: inline-flex; gap: 4px; align-items: center; }
.bq-lives .bq-ico { width: 15px; height: 15px; }

.bq-arena {
  position: relative;
  background: rgba(4, 14, 36, .55);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  height: 172px;
  overflow: hidden;
  display: flex; align-items: center;
}
.bq-counter {
  position: absolute; left: 0; top: 0; bottom: 0; width: 64px;
  background: linear-gradient(180deg, #ffd16633, #ffd16614);
  border-right: 2px dashed rgba(255, 209, 102, .55);
  display: flex; align-items: center; justify-content: center;
  color: #ffd166; z-index: 3;
}
.bq-queue {
  position: absolute; left: 64px; right: 0; top: 0; bottom: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 0 12px;
}
.bq-cust {
  position: relative; flex: 0 0 auto;
  width: 54px; text-align: center;
  transition: transform .28s ease, opacity .28s ease;
}
.bq-cust .bq-face {
  display: block;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,.4));
  animation: bq-walk .55s ease-in-out infinite alternate;
}
@keyframes bq-walk { from { transform: translateY(0) rotate(-6deg);} to { transform: translateY(-4px) rotate(6deg);} }
.bq-cust.front .bq-face { animation: bq-impat .4s ease-in-out infinite alternate; }
@keyframes bq-impat { from { transform: translateX(0) rotate(-7deg) scale(1);} to { transform: translateX(-3px) rotate(7deg) scale(1.07);} }
.bq-pat {
  margin-top: 7px; height: 7px; border-radius: 99px;
  background: rgba(255,255,255,.18); overflow: hidden;
}
.bq-pat i {
  display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, #34d399, #a3e635);
  transition: width .2s linear, background-color .2s;
}
.bq-pat.warn i { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.bq-pat.crit i { background: linear-gradient(90deg, #f87171, #ef4444); }
.bq-cust.leaving { transform: translateX(46px) rotate(16deg); opacity: 0; }
.bq-cust.served { transform: translateY(-40px) scale(.4); opacity: 0; }
.bq-float {
  position: absolute; left: 90px; top: 24px; z-index: 4;
  font-weight: 900; font-size: 22px; color: #ffd166;
  pointer-events: none; opacity: 0;
  text-shadow: 0 3px 8px rgba(0,0,0,.5);
}
.bq-float.go { animation: bq-float .7s ease-out forwards; }
@keyframes bq-float { 0% { opacity: 0; transform: translateY(8px) scale(.8);} 25% { opacity: 1; transform: translateY(-4px) scale(1.12);} 100% { opacity: 0; transform: translateY(-34px) scale(1);} }

.bq-combo {
  position: absolute; right: 12px; top: 10px; z-index: 4;
  font-weight: 900; font-size: 17px; color: #67e8f9;
  opacity: 0; transition: opacity .2s, transform .2s;
  transform: scale(.7);
}
.bq-combo.on { opacity: 1; transform: scale(1); }

.bq-actions { display: flex; gap: 10px; margin-top: 13px; }
.bq-serve {
  flex: 1; appearance: none; border: 0; cursor: pointer;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff; font-weight: 900; font-size: 18px; letter-spacing: .04em;
  padding: 17px; border-radius: 14px;
  box-shadow: 0 8px 20px rgba(34, 197, 94, .4);
  transition: transform .1s ease;
}
.bq-serve:active { transform: scale(.97); }
.bq-quit {
  appearance: none; cursor: pointer; background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.85); border: 1px solid rgba(255,255,255,.2);
  border-radius: 14px; padding: 0 16px; font-size: 14px; font-weight: 700;
}
.bq-quit:hover { background: rgba(255,255,255,.2); }

/* ── Game over ──────────────────────────────────────────────── */
.bq-over { display: none; padding: 26px 24px 24px; text-align: center; }
.bq-card.over .bq-over { display: block; }
.bq-over .bq-medal { line-height: 1; animation: bq-bob 2s ease-in-out infinite; }
.bq-over .bq-medal svg { width: 52px; height: 52px; }
.bq-over h3 { margin: 12px 0 4px; font-size: 23px; font-weight: 900; }
.bq-score { font-size: 40px; font-weight: 900; color: #ffd166; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.bq-score-label { font-size: 12px; text-transform: uppercase; letter-spacing: .16em; color: rgba(255,255,255,.6); font-weight: 800; }
.bq-best { margin-top: 6px; font-size: 13.5px; color: rgba(255,255,255,.75); }
.bq-newbest { color: #a3e635; font-weight: 900; }
.bq-stats {
  display: flex; justify-content: center; gap: 22px; margin: 16px 0 4px;
  font-size: 13.5px; color: rgba(255,255,255,.8);
}
.bq-stats b { display: block; font-size: 19px; color: #fff; }
.bq-again {
  appearance: none; border: 0; cursor: pointer; margin-top: 14px;
  background: linear-gradient(135deg, #ffd166, #ff9f1c);
  color: #25150a; font-weight: 900; font-size: 16px;
  padding: 14px 34px; border-radius: 999px;
  box-shadow: 0 8px 22px rgba(255,159,28,.4);
}
.bq-again:active { transform: scale(.97); }
.bq-share-row { display: flex; gap: 9px; justify-content: center; margin-top: 15px; flex-wrap: wrap; }
.bq-share {
  appearance: none; cursor: pointer; text-decoration: none;
  background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.22);
  font-size: 13px; font-weight: 800; padding: 9px 16px; border-radius: 999px;
  transition: background .15s;
}
.bq-share:hover { background: rgba(255,255,255,.24); }

/* ── End screen depth links ─────────────────────────────────── */
.bq-next { margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.16); text-align: left; }
.bq-next-title { font-size: 12px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: #67e8f9; margin-bottom: 9px; }
.bq-next-links { display: flex; flex-direction: column; gap: 8px; }
.bq-next-links a {
  display: flex; align-items: center; gap: 9px;
  background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.14);
  color: #fff; text-decoration: none; font-size: 14px; font-weight: 700;
  padding: 11px 14px; border-radius: 11px;
  transition: background .15s, transform .15s;
}
.bq-next-links a:hover { background: rgba(255,255,255,.19); transform: translateX(3px); }
.bq-next-links a span { flex: 1; }
.bq-next-links a b { color: #ffd166; display: flex; }
.bq-next-links a b svg { width: 17px; height: 17px; }

@media (max-width: 560px) {
  .bq-teaser { padding: 18px; gap: 12px; }
  .bq-teaser-emoji svg { width: 36px; height: 36px; }
  .bq-teaser h3 { font-size: 18px; }
  .bq-play { width: 100%; padding: 14px; }
  .bq-teaser-body { min-width: 100%; }
  .bq-arena { height: 150px; }
  .bq-counter { width: 48px; }
  .bq-counter svg { width: 21px; height: 21px; }
  .bq-queue { left: 48px; gap: 7px; }
  .bq-cust { width: 44px; }
  .bq-cust .bq-face svg { width: 27px; height: 27px; }
  .bq-hud { font-size: 13.5px; }
  .bq-hud > span { min-width: 0; }
}
