/* Lightning in a Bottle, the live demo store (/demos/lightning-in-a-bottle/;
   docs/website.md § The demo on the site's design). The page is built from
   the page kit; this file holds only what the kit has no part for: the
   price, pay.js's button drawn as the site's primary action, the status
   line, and the bottle with its lightning.

   Gold is the site's two accents and nothing else: rgba(232,181,60,X) and
   rgba(247,147,26,X), with near-white for the bolts themselves. */

/* ── The price and the button ─────────────────────────────────────────── */
.bottle-price { display:flex; align-items:baseline; flex-wrap:wrap; gap:6px 18px; margin:0 0 26px; }
.bottle-price strong { font-size:clamp(44px,4.4vw,60px); font-weight:500; line-height:1; letter-spacing:-.05em; color:var(--bitcoin-orange); }
.bottle-price span { font:11px/1.7 var(--font-mono); letter-spacing:.12em; color:#8f9185; }

/* pay.js puts its button straight after its script tag and styles it in
   BTC orange. A merchant restyles it from their own stylesheet, as this page
   does: here it is the site's gold primary action (.rail-button). The red
   error state is pay.js's own and stays. */
.bottle-pay .satsrail-pay-btn { min-height:52px; min-width:0; padding:14px 26px; border:1px solid var(--bitcoin-orange); border-radius:6px; background:var(--bitcoin-orange); color:var(--ink); font-size:15px; font-weight:600; box-shadow:0 0 0 0 rgba(232,181,60,.4); transition:background var(--t-base),transform var(--t-base) var(--ease-out),box-shadow var(--t-base); }
.bottle-pay .satsrail-pay-btn:hover { background:#f0c14d; transform:translateY(-2px); box-shadow:0 10px 30px rgba(232,181,60,.25); }
.bottle-pay .satsrail-pay-btn:disabled { transform:none; box-shadow:none; }
.bottle-pay .satsrail-pay-btn:focus-visible { outline:2px solid var(--bitcoin-orange); outline-offset:5px; }

.bottle-status { display:flex; gap:10px; align-items:flex-start; max-width:520px; margin:22px 0 0; font-size:14px; line-height:1.6; color:#8f9185; }
.bottle-status i { flex:none; line-height:1.6; color:var(--bitcoin-orange); }
.bottle-status.is-paid { color:var(--text); }

.bottle-checks { margin-top:30px; }

/* ── The bottle ───────────────────────────────────────────────────────── */
/* The image is a cut-out on transparency, so the glass sits on the page's
   own dark. A pool of gold light sits behind it and under its base. */
.bottle-stage { position:relative; display:flex; justify-content:center; align-items:center; }
.bottle-stage::before { content:""; position:absolute; left:50%; top:50%; width:120%; aspect-ratio:1; transform:translate(-50%,-50%); border-radius:50%; background:radial-gradient(circle,rgba(232,181,60,.16),rgba(247,147,26,.06) 42%,transparent 68%); pointer-events:none; }
.bottle { position:relative; width:100%; max-width:380px; cursor:pointer; -webkit-tap-highlight-color:transparent; animation:bottleFloat 6s ease-in-out infinite; }
.bottle::after { content:""; position:absolute; left:50%; bottom:11%; width:62%; height:36px; transform:translateX(-50%); background:radial-gradient(ellipse,rgba(232,181,60,.32),transparent 70%); filter:blur(12px); pointer-events:none; }
.bottle img { position:relative; display:block; width:100%; height:auto; filter:drop-shadow(0 0 26px rgba(232,181,60,.35)) drop-shadow(0 0 80px rgba(247,147,26,.14)); animation:bottleGlow 4s ease-in-out infinite; }
@keyframes bottleFloat { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-12px); } }
@keyframes bottleGlow {
  0%,100% { filter:drop-shadow(0 0 26px rgba(232,181,60,.35)) drop-shadow(0 0 80px rgba(247,147,26,.14)); }
  50% { filter:drop-shadow(0 0 40px rgba(232,181,60,.5)) drop-shadow(0 0 110px rgba(247,147,26,.22)); }
}

/* The lightning in the bottle. After a payment (pay.js's satsrail:payment
   event) it strikes: bolts are drawn inside the glass, the glow surges,
   sparks fly, and the bottle stays charged. A tap on the bottle makes one
   small crackle. All of it is decoration, and none of it moves for a visitor
   who asked for less motion: they get the charged glow alone. */
.bottle-bolts { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; mix-blend-mode:screen; overflow:visible; }
.bottle-bolts polyline { fill:none; stroke-linecap:round; stroke-linejoin:round; }
.bottle-bolts .bolt-glow { stroke:rgba(232,181,60,.8); filter:blur(7px); }
.bottle-bolts .bolt-core { stroke:#fffdf4; }
.bottle-bolts .bolt-landing { fill:rgba(255,250,232,.85); filter:blur(22px); }
/* A flash is the image for a tenth of a second; the script never makes more
   than two in a second. */
.bottle.is-flash img { filter:drop-shadow(0 0 46px rgba(232,181,60,.95)) drop-shadow(0 0 120px rgba(247,147,26,.55)) brightness(1.22) saturate(1.08)!important; }
.bottle.is-struck { animation-name:bottleFloat,bottleRattle; animation-duration:6s,.5s; animation-timing-function:ease-in-out,linear; animation-iteration-count:infinite,3; }
.bottle.is-charged img { animation:bottleCharged 2.6s ease-in-out infinite; }
@keyframes bottleRattle { 0%,100% { rotate:0deg; } 20% { rotate:-1.5deg; } 45% { rotate:1.3deg; } 70% { rotate:-.8deg; } }
@keyframes bottleCharged {
  0%,100% { filter:drop-shadow(0 0 34px rgba(232,181,60,.6)) drop-shadow(0 0 90px rgba(247,147,26,.28)); }
  50% { filter:drop-shadow(0 0 56px rgba(232,181,60,.85)) drop-shadow(0 0 140px rgba(247,147,26,.42)); }
}

/* Sparks: a few rise from the glass while it is on screen, and a burst flies
   out with each strike. */
.bottle-spark { position:absolute; width:4px; height:4px; border-radius:50%; background:#fff7dc; box-shadow:0 0 10px 2px rgba(232,181,60,.9); pointer-events:none; }
.bottle-spark.is-burst { left:50%; top:62%; animation:bottleSparkFly .9s cubic-bezier(.2,.7,.3,1) forwards; }
.bottle-spark.is-drift { width:var(--size); height:var(--size); background:radial-gradient(circle,rgba(232,181,60,.9),transparent); box-shadow:none; animation:bottleSparkDrift var(--life) ease-out forwards; }
@keyframes bottleSparkFly { 0% { transform:translate(0,0) scale(1); opacity:1; } 100% { transform:translate(var(--dx),var(--dy)) scale(.2); opacity:0; } }
@keyframes bottleSparkDrift { 0% { transform:translateY(0) scale(1); opacity:.7; } 100% { transform:translateY(-120px) scale(0); opacity:0; } }

@media(max-width:991px) {
  .bottle { max-width:280px; }
}
@media(max-width:700px) {
  .bottle { max-width:220px; }
  .bottle-pay .satsrail-pay-btn { flex:1 1 100%; }
}
@media(prefers-reduced-motion:reduce) {
  .bottle, .bottle img, .bottle.is-struck { animation:none; }
  .bottle.is-charged img { animation:none; filter:drop-shadow(0 0 46px rgba(232,181,60,.75)) drop-shadow(0 0 110px rgba(247,147,26,.35))!important; }
}
