@font-face{font-family:"Tangerine";font-weight:700;font-display:swap;src:url("fonts/tangerine-latin-700-normal.woff2") format("woff2")}
/* =====================================================================
   POS loader: the bottle cap.
   1) Full-screen overlay: a big cap pops, hits both edges, bounces, settles.
   2) Button busy state: a small silver cap travels left <-> right inside the
      button you clicked while the server works.
   Loaded with posloader.js. Uses the fonts already in theme.css.
   ===================================================================== */
:root {
    --pl-red: #a81c1c;
    --pl-text: #efe9df;
    --pl-cap: 76px;                          /* cap diameter */
    --pl-reach: min(40vw, 380px);            /* how far the cap travels to each edge */
    --pl-floor: 60px;                        /* space under the cap */
    --pl-h: 290px;                           /* stage height */
    --pl-time: 3.8s;                         /* one full pop + 2 bounces cycle */
}

/* ---------- 1) Full-screen overlay (flat black, no gradients) ---------- */
.pl-overlay {
    position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; background: #000;
    opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility 0s linear .3s;
}
.pl-overlay.is-on { opacity: 1; visibility: visible; transition: opacity .3s ease; }
.pl-overlay:focus { outline: none; }
.pl-box { text-align: center; padding: 24px; max-width: 100vw; }

.pl-stage { position: relative; height: var(--pl-h); width: calc((var(--pl-reach) + var(--pl-cap) / 2 + 8px) * 2); margin: 0 auto; max-width: 100vw; overflow: hidden; }
.pl-floorline { display: none; position: absolute; left: 0; right: 0; bottom: var(--pl-floor); height: 1px; background: rgba(168,28,28,.5); }
.pl-wall { position: absolute; top: 14%; bottom: var(--pl-floor); width: 3px; opacity: 0; background: #d83a34; }
.pl-wall.l { left: 0; animation: pl-wall-l var(--pl-time) infinite; }
.pl-wall.r { right: 0; animation: pl-wall-r var(--pl-time) infinite; }

.pl-cap-x, .pl-shadow-x { position: absolute; left: 50%; width: var(--pl-cap); margin-left: calc(var(--pl-cap) / -2); animation: pl-x var(--pl-time) infinite; }
.pl-cap-x { bottom: var(--pl-floor); height: var(--pl-cap); }
.pl-cap-y { width: 100%; height: 100%; animation: pl-y var(--pl-time) infinite; }
.pl-cap-sq { width: 100%; height: 100%; perspective: 520px; transform-origin: 50% 100%; animation: pl-squash var(--pl-time) infinite;
    filter: drop-shadow(0 5px 7px rgba(0,0,0,.7)); }
.pl-cap-spin { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; animation: pl-spin var(--pl-time) infinite; }
.pl-lay { position: absolute; inset: 0; }
.pl-lay svg { display: block; width: 100%; height: 100%; overflow: visible; }
.pl-front { backface-visibility: hidden; transform: translateZ(5px); }
.pl-back  { backface-visibility: hidden; transform: rotateY(180deg) translateZ(5px); }

.pl-shadow-x { bottom: calc(var(--pl-floor) - 8px); height: 16px; }
.pl-shadow { width: 100%; height: 100%; border-radius: 50%; background: rgba(255,255,255,.09); animation: pl-shadow var(--pl-time) infinite; }

@keyframes pl-x {
    0%, 9%  { transform: translateX(0); animation-timing-function: linear; }
    30%     { transform: translateX(var(--pl-reach)); animation-timing-function: linear; }
    58%     { transform: translateX(calc(var(--pl-reach) * -1)); animation-timing-function: cubic-bezier(.2,.7,.3,1); }
    84%, 100% { transform: translateX(0); }
}
@keyframes pl-y {
    0%, 9%  { transform: translateY(0); animation-timing-function: cubic-bezier(.2,.65,.4,1); }
    19%     { transform: translateY(-135px); animation-timing-function: cubic-bezier(.5,0,.9,.5); }
    30%     { transform: translateY(-62px);  animation-timing-function: cubic-bezier(.3,.2,.9,.7); }
    40%     { transform: translateY(0);      animation-timing-function: cubic-bezier(.2,.65,.4,1); }
    49%     { transform: translateY(-52px);  animation-timing-function: cubic-bezier(.5,0,.9,.5); }
    58%     { transform: translateY(-18px);  animation-timing-function: cubic-bezier(.3,.2,.9,.7); }
    64%     { transform: translateY(0);      animation-timing-function: cubic-bezier(.2,.65,.4,1); }
    69%     { transform: translateY(-20px);  animation-timing-function: cubic-bezier(.5,0,.9,.5); }
    74%     { transform: translateY(0);      animation-timing-function: cubic-bezier(.2,.65,.4,1); }
    77%     { transform: translateY(-7px);   animation-timing-function: cubic-bezier(.5,0,.9,.5); }
    80%, 100% { transform: translateY(0); }
}
@keyframes pl-spin {
    0%, 9%  { transform: rotateX(30deg) rotateZ(0) rotateY(-12deg); animation-timing-function: linear; }
    19%     { transform: rotateX(-20deg) rotateZ(110deg) rotateY(368deg); animation-timing-function: linear; }
    30%     { transform: rotateX(35deg)  rotateZ(220deg) rotateY(708deg); animation-timing-function: linear; }
    49%     { transform: rotateX(-15deg) rotateZ(40deg)  rotateY(1088deg); animation-timing-function: linear; }
    58%     { transform: rotateX(40deg)  rotateZ(-140deg) rotateY(1428deg); animation-timing-function: cubic-bezier(.2,.7,.3,1); }
    84%, 100% { transform: rotateX(30deg) rotateZ(0) rotateY(1788deg); }
}
@keyframes pl-squash {
    0%, 5%   { transform: scale(1,1); }
    8.5%     { transform: scale(1.1,.88); }
    10%      { transform: scale(.94,1.08); }
    13%, 29% { transform: scale(1,1); }
    30%      { transform: scale(.86,1.05); }
    33%      { transform: scale(1,1); }
    39%      { transform: scale(1,1); }
    40.6%    { transform: scale(1.08,.9); }
    43%      { transform: scale(1,1); }
    57%      { transform: scale(1,1); }
    58%      { transform: scale(.86,1.05); }
    61%      { transform: scale(1,1); }
    63%      { transform: scale(1,1); }
    64.6%    { transform: scale(1.05,.94); }
    67%, 73% { transform: scale(1,1); }
    74.6%    { transform: scale(1.03,.97); }
    77%, 100%{ transform: scale(1,1); }
}
@keyframes pl-shadow {
    0%, 9%  { transform: scale(1); opacity: .6; animation-timing-function: cubic-bezier(.2,.65,.4,1); }
    19%     { transform: scale(.4);  opacity: .12; animation-timing-function: cubic-bezier(.5,0,.9,.5); }
    30%     { transform: scale(.7);  opacity: .26; animation-timing-function: cubic-bezier(.3,.2,.9,.7); }
    40%     { transform: scale(1);   opacity: .6;  animation-timing-function: cubic-bezier(.2,.65,.4,1); }
    49%     { transform: scale(.55); opacity: .2;  animation-timing-function: cubic-bezier(.5,0,.9,.5); }
    58%     { transform: scale(.88); opacity: .42; animation-timing-function: cubic-bezier(.3,.2,.9,.7); }
    64%     { transform: scale(1);   opacity: .55; animation-timing-function: cubic-bezier(.2,.65,.4,1); }
    69%     { transform: scale(.82); opacity: .36; animation-timing-function: cubic-bezier(.5,0,.9,.5); }
    74%     { transform: scale(1);   opacity: .55; }
    80%, 100% { transform: scale(1); opacity: .6; }
}
@keyframes pl-wall-r { 0%, 29% { opacity: 0; } 30.2% { opacity: 1; } 38% { opacity: 0; } 100% { opacity: 0; } }
@keyframes pl-wall-l { 0%, 57% { opacity: 0; } 58.2% { opacity: 1; } 66% { opacity: 0; } 100% { opacity: 0; } }

.pl-msg { margin: 8px 0 0; font-family: 'Tangerine', 'Brush Script MT', cursive; font-weight: 700; font-size: 2.6rem; line-height: 1.1; letter-spacing: 0; color: var(--pl-text); }
.pl-msg::after { content: ''; display: inline-block; width: 1.2em; text-align: left; animation: pl-dots 1.4s steps(4) infinite; }
@keyframes pl-dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75%, 100% { content: '...'; } }
.pl-sub { margin: 8px 0 0; font: 500 .72rem/1 'Inter', system-ui, sans-serif; letter-spacing: .24em; text-transform: uppercase; color: var(--pl-red); }
.pl-bar { position: relative; width: 160px; height: 2px; margin: 22px auto 0; overflow: hidden; background: rgba(255,255,255,.1); }
.pl-bar::after { content: ''; position: absolute; top: 0; left: 0; height: 100%; width: 40%; background: var(--pl-red); animation: pl-slide 1.3s cubic-bezier(.6,0,.4,1) infinite; }
@keyframes pl-slide { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
@media (max-width: 560px) { :root { --pl-cap: 60px; --pl-reach: 36vw; --pl-h: 260px; --pl-floor: 52px; } .pl-msg { font-size: 2.2rem; } }

/* ---------- 2) Button busy state: little cap running across the button ---------- */
.pc-busy { cursor: progress; }
.pc-track { position: absolute; inset: 0; overflow: hidden; pointer-events: none; border-radius: inherit; }
.pc-track::before { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,.16); }
.pc-bx { position: absolute; left: 6px; bottom: 3px; width: var(--pc-s, 18px); height: var(--pc-s, 18px);
    animation: pc-bx var(--pc-t, 1.4s) linear infinite alternate; }
.pc-by { width: 100%; height: 100%; animation: pc-by .46s infinite; }
.pc-bs { width: 100%; height: 100%; perspective: 80px; filter: drop-shadow(0 1px 1.5px rgba(0,0,0,.65)); }
.pc-bs svg { display: block; width: 100%; height: 100%; animation: pc-flip .62s linear infinite; }
@keyframes pc-bx { from { transform: translateX(0); } to { transform: translateX(var(--pc-run, 100px)); } }
@keyframes pc-by {
    0%, 100% { transform: translateY(0); animation-timing-function: cubic-bezier(.2,.65,.4,1); }
    50%      { transform: translateY(calc(var(--pc-hop, 10px) * -1)); animation-timing-function: cubic-bezier(.5,0,.9,.5); }
}
@keyframes pc-flip { from { transform: rotateY(0) rotateZ(0); } to { transform: rotateY(360deg) rotateZ(40deg); } }

/* Reduced motion: overlay cap rests in the centre; the button cap rests at the left */
@media (prefers-reduced-motion: reduce) {
    .pl-cap-x, .pl-shadow-x, .pl-cap-y, .pl-cap-sq, .pl-cap-spin, .pl-shadow, .pl-wall, .pl-bar::after,
    .pc-bx, .pc-by, .pc-bs svg { animation: none; }
    .pl-bar::after { width: 100%; opacity: .6; }
}
