/* spark-info ("Buy Sparks") modal — flat Stage-themed design, matched to the
   leaderboard / streak / chat-history / spark-store modals.
   Surface = #141417 (same as the leaderboard modal). Colour language:
   gold #ffc83d = value, --button-color (#ff2e68) = action, green #36d399 = bonus.
   Flat: solid fills, no gradients, no glow halos. Header uses the shared
   .mg-mtitle / .mg-mclose primitives (defined in profile-modal.css, always loaded). */

.spark-info-modal-content {
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.spark-info-modal-content::-webkit-scrollbar {
    display: none;
}

/* ── header ── */
.bs-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 20px 22px 0; }

/* ── balance row (identical to spark-store .ss-bal — ties the two money modals together) ── */
.bs-bal { display: flex; align-items: center; justify-content: space-between; gap: 14px;
    margin: 16px 22px 0; padding: 16px 18px; border-radius: 18px;
    background: rgba(255,200,61,0.07); border: 1px solid rgba(255,200,61,0.20); }
.bs-bal-lbl { font-size: 13px; color: rgba(255,255,255,0.6); font-weight: 600; }
.bs-bal-amt { font-size: 24px; font-weight: 800; color: #ffc83d; display: flex; align-items: center; gap: 7px; font-variant-numeric: tabular-nums; }
.bs-bal-amt .lt { font-size: 19px; }

/* ── body ── */
.bs-body { padding: 18px 22px 22px; overflow-y: auto; }

/* ── section label (uppercase, no dot) ── */
.bs-seclabel { margin: 0 0 12px; }
.bs-seclabel .txt { color: rgba(255,255,255,0.45); font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; }

/* ── login notice (logged-out) — matches .ss-login ── */
.bs-login { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 18px;
    border-radius: 14px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); }
.bs-login-ic { width: 34px; height: 34px; border-radius: 10px; flex: none; display: grid; place-items: center;
    background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.7); }
.bs-login-ic svg { width: 17px; height: 17px; }
.bs-login-txt { flex: 1; min-width: 0; }
.bs-login-txt .t { color: #fff; font-weight: 700; font-size: 13px; }
.bs-login-txt .d { color: rgba(255,255,255,0.4); font-size: 11.5px; margin-top: 1px; }
.bs-login-btn { background: var(--button-color, #ff2e68); color: #fff; padding: 8px 16px; border-radius: 11px;
    text-decoration: none; font-weight: 800; font-size: 12.5px; white-space: nowrap; flex: none; transition: filter .16s; }
.bs-login-btn:hover { filter: brightness(1.08); }

/* ── perks grid (flat neutral tiles — borderless icon, matches .ss-login-ic) ── */
.bs-perks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 22px; }
.bs-perk { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px;
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07); transition: background .18s, border-color .18s; }
.bs-perk:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.12); }
.bs-perk-ic { width: 34px; height: 34px; border-radius: 10px; flex: none; display: grid; place-items: center;
    background: rgba(255,255,255,0.06); color: #fff; }
.bs-perk-ic svg { width: 17px; height: 17px; }
.bs-perk-body { min-width: 0; flex: 1; }
.bs-perk-t { color: #fff; font-size: 12px; font-weight: 700; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bs-perk-s { color: rgba(255,255,255,0.4); font-size: 10.5px; line-height: 1.3; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── package cards (flat, mirrors .ss-card) ── */
@keyframes bsRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.bs-packs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.bs-pack { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center;
    padding: 18px 12px 14px; border-radius: 18px; cursor: pointer;
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07);
    transition: transform .16s, border-color .16s, background .16s; animation: bsRise .4s ease both; }
.bs-pack:hover { transform: translateY(-3px); border-color: rgba(255,255,255,0.15); background: rgba(255,255,255,0.07); }
.bs-pack:active { transform: translateY(0); }
/* featured = flat GOLD accent tint (value), no gradient, no glow */
.bs-pack.featured { border-color: rgba(255,200,61,0.32); background: rgba(255,200,61,0.05); }
.bs-pack.featured:hover { border-color: rgba(255,200,61,0.5); background: rgba(255,200,61,0.08); }

/* "Most Popular" chip — flat gold pill (matches .ss-state-gold / .sk-ms-next) */
.bs-ribbon { position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
    font-size: 9.5px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; white-space: nowrap;
    color: #ffc83d; background: rgba(255,200,61,0.16); border: 1px solid rgba(255,200,61,0.32); padding: 4px 10px; border-radius: 9px; }
/* on the featured card the gold tint behind the chip would muddy it → solid backing */
.bs-pack.featured .bs-ribbon { background: #2a2415; }

.bs-pack-amt { display: flex; align-items: center; justify-content: center; gap: 5px; margin: 4px 0; }
.bs-pack-amt .bolt { font-size: 22px; line-height: 1; }
.bs-pack-amt .n { color: #fff; font-weight: 800; font-size: 22px; line-height: 1; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.bs-pack-name { color: rgba(255,255,255,0.5); font-size: 11px; margin-bottom: 8px; }
.bs-pack-bonus { font-size: 10px; font-weight: 800; letter-spacing: .3px; display: inline-block; margin-bottom: 10px;
    color: #36d399; background: rgba(54,211,153,0.14); border: 1px solid rgba(54,211,153,0.3); padding: 3px 9px; border-radius: 8px; }
.bs-pack-bonus.spacer { visibility: hidden; }
/* price = gold value pill (value language = gold across all modals) */
.bs-pack-price { width: 100%; padding: 9px 12px; border-radius: 11px; font-weight: 800; font-size: 14px;
    color: #ffc83d; background: rgba(255,200,61,0.14); border: 1px solid rgba(255,200,61,0.30);
    transition: background .16s, border-color .16s, filter .16s; font-variant-numeric: tabular-nums; }
.bs-pack:hover .bs-pack-price { background: rgba(255,200,61,0.22); border-color: rgba(255,200,61,0.45); }
/* featured card: price becomes the solid pink ACTION button (pink = buy) */
.bs-pack.featured .bs-pack-price { color: #fff; background: var(--button-color, #ff2e68); border-color: transparent;
    box-shadow: 0 8px 20px -8px rgba(255,46,104,0.5); }
.bs-pack.featured:hover .bs-pack-price { filter: brightness(1.08); }

/* ── empty state — all packs disabled (matches .lb-empty / .ch-empty) ── */
.bs-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
    padding: 40px 24px 36px; gap: 14px; animation: bsRise .4s ease both; }
.bs-empty-ic { width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center;
    background: rgba(255,200,61,0.10); border: 1px solid rgba(255,200,61,0.22); color: #ffc83d; }
.bs-empty-ic svg { width: 30px; height: 30px; }
.bs-empty-msg { font-size: 15.5px; font-weight: 700; color: rgba(255,255,255,0.72); }
.bs-empty-sub { font-size: 12.5px; color: rgba(255,255,255,0.4); max-width: 260px; line-height: 1.45; }

/* ── purchase confirm dialog (self-contained clone of spark-store .ss-cf) ── */
.meetgle-modal-content.bs-cf { max-width: 400px; background: #141417; border: 1px solid rgba(255,255,255,0.14);
    border-radius: 22px; text-align: center; padding: 26px 24px 22px; }
.bs-cf-ic { width: 60px; height: 60px; border-radius: 16px; display: grid; place-items: center; margin: 0 auto 16px;
    background: rgba(255,46,104,0.12); border: 1px solid rgba(255,46,104,0.28); font-size: 30px; line-height: 1; }
.bs-cf-title { font-size: 19px; font-weight: 800; color: #fff; margin: 0 0 6px; }
.bs-cf-sub { font-size: 13.5px; color: rgba(255,255,255,0.6); line-height: 1.5; margin: 0 0 18px; }
.bs-cf-sub strong { color: #fff; }
.bs-cf-actions { display: flex; gap: 10px; }
.bs-cf-btn { flex: 1; appearance: none; border: 0; cursor: pointer; font-family: inherit; font-weight: 800; font-size: 14.5px;
    padding: 14px; border-radius: 14px; transition: filter .16s, background .16s; }
.bs-cf-cancel { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.6); }
.bs-cf-cancel:hover { background: rgba(255,255,255,0.12); color: #fff; }
.bs-cf-confirm { background: var(--button-color, #ff2e68); color: #fff; box-shadow: 0 12px 28px -10px rgba(255,46,104,0.5); }
.bs-cf-confirm:hover { filter: brightness(1.08); }

/* ── responsive ── */
@media (max-width: 620px) {
    .bs-perks { grid-template-columns: repeat(2, 1fr); }
    .bs-packs { grid-template-columns: repeat(2, 1fr); }
}

/* ── Mobile fullscreen (PRESERVED — same sizing as before; width/height unchanged) ── */
@media (max-width: 900px) {
    #sparkInfoModal { padding: 0 !important; }
    #sparkInfoModal > .spark-info-modal-content {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        height: 100svh !important;
        max-height: 100vh !important;
        max-height: 100svh !important;
        border-radius: 0 !important;
    }
    .bs-head { padding: 18px 16px 0; }
    .bs-bal { margin: 14px 16px 0; }
    .bs-body { padding: 14px 16px 20px; }
}

/* ============================================================
   Purchase success toast — UNCHANGED (already on-brand gold).
   ============================================================ */
.spark-purchase-toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-24px);
    z-index: 100002;
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(20,20,30,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 200, 61, 0.35);
    border-radius: 16px;
    padding: 12px 16px 12px 12px;
    color: #fff;
    box-shadow:
        0 20px 50px rgba(0,0,0,0.55),
        0 0 30px rgba(255, 200, 61, 0.25),
        inset 0 1px 0 rgba(255,255,255,0.06);
    max-width: 420px;
    width: calc(100% - 32px);
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}
.spark-purchase-toast.is-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}
.spark-purchase-toast-glow {
    position: absolute;
    top: -40%;
    left: -10%;
    width: 50%;
    height: 180%;
    background: radial-gradient(ellipse at center, rgba(255,200,61,0.35) 0%, transparent 70%);
    filter: blur(20px);
    pointer-events: none;
    animation: sparkToastGlow 2.6s ease-in-out infinite;
}
@keyframes sparkToastGlow {
    0%, 100% { opacity: 0.6; transform: translateX(0); }
    50%      { opacity: 1;   transform: translateX(20%); }
}
.spark-purchase-toast-icon {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: radial-gradient(circle at 30% 30%, #fff8c2 0%, #fde047 35%, #ffc83d 75%, #b45309 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow:
        inset 0 -3px 5px rgba(120,53,15,0.55),
        inset 0 1px 2px rgba(255,255,255,0.7),
        0 4px 12px rgba(255,200,61,0.45);
    animation: sparkToastIconPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.spark-purchase-toast-bolt {
    font-size: 22px;
    line-height: 1;
    filter: drop-shadow(0 1px 1px rgba(120,53,15,0.5));
    animation: sparkToastBolt 1.4s ease-in-out infinite;
}
@keyframes sparkToastIconPop {
    0%   { transform: scale(0.4) rotate(-25deg); opacity: 0; }
    60%  { transform: scale(1.15) rotate(8deg);  opacity: 1; }
    100% { transform: scale(1)    rotate(0);     opacity: 1; }
}
@keyframes sparkToastBolt {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.12); }
}
.spark-purchase-toast-body {
    flex: 1;
    min-width: 0;
}
.spark-purchase-toast-title {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.1px;
    line-height: 1.2;
}
.spark-purchase-toast-msg {
    font-size: 12.5px;
    color: rgba(255,255,255,0.6);
    line-height: 1.35;
    margin-top: 3px;
}
.spark-purchase-toast-close {
    background: rgba(255,255,255,0.06);
    border: none;
    color: rgba(255,255,255,0.55);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
    padding: 0;
}
.spark-purchase-toast-close:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
}
@media (max-width: 480px) {
    .spark-purchase-toast {
        top: 12px;
        gap: 10px;
        padding: 10px 12px 10px 10px;
        border-radius: 14px;
    }
    .spark-purchase-toast-icon { width: 38px; height: 38px; border-radius: 10px; }
    .spark-purchase-toast-bolt { font-size: 19px; }
    .spark-purchase-toast-title { font-size: 14px; }
    .spark-purchase-toast-msg { font-size: 11.5px; }
}
@media (prefers-reduced-motion: reduce) {
    .spark-purchase-toast,
    .spark-purchase-toast-glow,
    .spark-purchase-toast-icon,
    .spark-purchase-toast-bolt {
        animation: none !important;
        transition: opacity 0.2s ease !important;
    }
}

/* ============================================================
   Lemon Squeezy injected overlay — force full-viewport cover
   (UNCHANGED). Selectors intentionally permissive to survive
   future LS.js renames.
   ============================================================ */
body > [id^="lemonsqueezy"],
body > [class^="lemonsqueezy"],
body > [class*="lemonsqueezy-modal"],
body > [class*="lemonsqueezy-overlay"],
body > [class*="ls-checkout-overlay"],
body > [class*="LemonSqueezyOverlay"] {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 2147483647 !important;
}
