/* Loading phrases (loading.js, 29/11/2026): overlay over the sales board (blurred numbers behind the menu),
   or a light strip over another waiting zone.
   Colours from the --pl-* variables of each skin (values tested in docs/pantalla-carga/index.html). No dependencies. */
:root{--pl-bg:#ffffff;--pl-ink:#021238;--pl-mut:#5b5a72;--pl-acc:#f47216;--pl-pur:#6544bb;--pl-ball3:#021238;--pl-track:#ece8f6;--pl-ballink:#ffffff}
html[data-skin="dark"]{--pl-bg:#0d0d0f;--pl-ink:#ececf1;--pl-mut:#9a9aa6;--pl-acc:#f7931a;--pl-pur:#8f74ff;--pl-ball3:#3a3a48;--pl-track:#2a2a31;--pl-ballink:#ffffff}
html[data-theme="matrix"]{--pl-bg:#0d0208;--pl-ink:#00ff41;--pl-mut:#80ce87;--pl-acc:#00ff41;--pl-pur:#00c02e;--pl-ball3:#b8ffc8;--pl-track:#003b00;--pl-ballink:#0d0208}

.pl-loader{position:relative;display:grid;place-items:center;min-height:min(70vh,560px);padding:32px 16px;background:var(--pl-bg);color:var(--pl-ink);
  font:16px/1.45 Inter,Roboto,system-ui,-apple-system,"Segoe UI",sans-serif;text-align:center;opacity:0;transition:opacity .25s ease;box-sizing:border-box}
.pl-loader.pl-on{opacity:1}
.pl-loader.pl-off{opacity:0;pointer-events:none}
.pl-box{display:flex;flex-direction:column;align-items:center;gap:22px;width:min(420px,100%)}
.pl-logo{width:min(300px,78%);height:auto;aspect-ratio:1140/332;display:block}
.pl-balls{display:flex;gap:10px;height:78px;align-items:flex-end}
.pl-ball{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;font:700 18px/1 "IBM Plex Mono",ui-monospace,Menlo,monospace;color:var(--pl-ballink);
  background:var(--c);box-shadow:inset -5px -6px 0 rgba(0,0,0,.18),inset 4px 4px 0 rgba(255,255,255,.22);animation:pl-hop 1.2s cubic-bezier(.3,.6,.4,1) infinite}
.pl-ball:nth-child(1){animation-delay:0s;--c:var(--pl-acc)}
.pl-ball:nth-child(2){animation-delay:.12s;--c:var(--pl-pur)}
.pl-ball:nth-child(3){animation-delay:.24s;--c:var(--pl-ball3)}
.pl-ball:nth-child(4){animation-delay:.36s;--c:var(--pl-acc)}
.pl-ball:nth-child(5){animation-delay:.48s;--c:var(--pl-pur)}
@keyframes pl-hop{0%,100%{transform:translateY(0)}40%{transform:translateY(-30px)}55%{transform:translateY(-30px)}}
.pl-bar{width:100%;height:10px;border-radius:99px;background:var(--pl-track);overflow:hidden}
.pl-fill{height:100%;width:0;border-radius:99px;background:var(--pl-acc);transition:width .6s ease}
.pl-msgs{display:flex;flex-direction:column;align-items:center;gap:4px;width:100%}
.pl-loader .pl-msg{min-height:2.8em;margin:0;color:var(--pl-ink);font-size:18px;font-weight:600;display:flex;align-items:center;justify-content:center;transition:opacity .22s ease,transform .22s ease}
.pl-msg.pl-swap{opacity:0;transform:translateY(6px)}
.pl-msg[hidden]{display:none}
.pl-retry{margin:0;min-height:44px;padding:0 22px;border:0;border-radius:12px;background:var(--pl-acc);color:var(--pl-ballink);font-weight:700;font-size:16px;font-family:inherit;line-height:1;cursor:pointer;width:auto}
.pl-retry:focus-visible{outline:3px solid var(--pl-pur);outline-offset:2px}
.pl-loader .pl-title{margin:0;font-size:20px;font-weight:800;letter-spacing:.01em;color:var(--pl-ink)}
.pl-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
html[data-theme="matrix"] .pl-msg{font-family:"Courier New",Courier,ui-monospace,monospace;text-shadow:0 0 8px rgba(0,255,65,.55)}
html[data-theme="matrix"] .pl-retry{background:var(--pl-acc);color:var(--pl-ballink);border:0;box-shadow:0 0 12px rgba(0,255,65,.45)}
@media (prefers-reduced-motion:reduce){.pl-ball{animation:none}.pl-msg,.pl-fill,.pl-loader{transition:none!important}}

/* Home: POLLA keeps the 00–99 board at full width of the card. The fun menu is an overlay over that board
   (not a side column). LOTTO21 uses .playrow for the gap beside the balls (#playSlot: quick plays and budget
   once ready). An empty slot stays hidden; if ready-state content is in it, the slot stays and the loading chrome
   is dropped. */
.playgrid{display:flex;flex-direction:column;gap:12px}
.playgrid:has(.playrow){display:contents}
.playslot[hidden]{display:none!important}
.playslot.pl-slot,.playslot:has(> .pl-loader){min-height:200px;padding:12px 10px;border:1px dashed var(--pl-track,var(--line,#efc7a4));border-radius:14px;
  background:var(--pl-bg,var(--in,#fff));box-sizing:border-box;display:grid;place-items:center}
@media(min-width:880px){
  .playslot.pl-slot,.playslot:has(> .pl-loader){min-height:240px}
}

/* The compact box in the slot (in the document flow, not an overlay) or as a light strip over a waiting zone.
   The zone's own content stays visible: we never paint a full-page (or full-zone) opaque blocker. */
.pl-zone{position:relative}
.pl-zone.pl-busy>:not(.pl-loader){pointer-events:none}
.pl-zone>.pl-loader:not(.pl-in-slot){position:absolute;left:12px;right:12px;bottom:12px;top:auto;z-index:5;min-height:0;padding:0;background:transparent;pointer-events:none}
.pl-zone>.pl-loader:not(.pl-in-slot) .pl-box{pointer-events:auto;background:var(--pl-bg);border:1px solid var(--pl-track);border-radius:16px;padding:12px 14px;box-shadow:0 8px 28px rgba(0,0,0,.16)}
.pl-in-slot{position:relative;inset:auto;z-index:auto;min-height:0;padding:8px 4px;background:transparent;width:100%}
.pl-compact .pl-box{gap:12px;width:min(360px,100%)}
.pl-compact .pl-balls{height:56px;gap:8px}
.pl-compact .pl-ball{width:34px;height:34px;font-size:14px}
.pl-compact .pl-bar{height:8px}
.pl-loader.pl-compact .pl-msg{min-height:2.4em;font-size:15px}

/* In-card host: a recuadro that shows the fun menu while that box's data arrives, then hides (unless it already
   holds ready-state content such as the LOTTO21 quick plays). The dashed chrome only applies while loading. */
.pl-host[hidden]{display:none!important}
.pl-host.pl-slot,.pl-host:has(.pl-loader){min-height:160px;padding:10px 8px;border:1px dashed var(--pl-track,var(--line,#efc7a4));border-radius:14px;
  background:var(--pl-bg,var(--in,#fff));box-sizing:border-box;display:grid;place-items:center}

/* Sales board overlay: covers the painted numbers (POLLA 00–99, or the whole LOTTO21 play area: balls,
   «Tu jugada» and the quick-plays gap, on the phone and on a wide screen). The numbers stay in the
   background, blurred; the menu sits on top with a light veil so the phrase can be read. When the loader
   is gone, the numbers are sharp again. Never a side column that squeezes the board. */
.pl-cover{position:relative;overflow:hidden;border-radius:14px}
.pl-cover>:not(.pl-loader){filter:blur(8px);pointer-events:none;user-select:none}
.pl-zone.pl-cover>.pl-loader:not(.pl-in-slot){position:absolute;inset:0;z-index:5;min-height:0;margin:0;padding:16px 12px;
  display:grid;place-items:start center;background:color-mix(in srgb,var(--pl-bg) 58%,transparent);border:0;border-radius:14px;
  pointer-events:auto;box-sizing:border-box;width:auto;left:0;right:0;top:0;bottom:0}
/* 03/12/2026: at the top of the zone, not in its middle (on a phone the play area is taller than the screen), and
   it stays in view while the page scrolls over the zone. */
.pl-zone.pl-cover>.pl-loader:not(.pl-in-slot) .pl-box{pointer-events:auto;background:var(--pl-bg);border:1px solid var(--pl-track);
  border-radius:16px;padding:14px 16px;box-shadow:0 10px 32px rgba(0,0,0,.22)}

@media(max-width:700px){.pl-zone.pl-cover>.pl-loader:not(.pl-in-slot) .pl-box{position:sticky;top:12px}}

/* «Generating invoice» (30/11/2026): while the invoice and its QR are prepared, a card over the page with the title,
   the bouncing balls and the phrases. It leaves as soon as the invoice is shown (or on an error). */
.invload{position:fixed;inset:0;z-index:90;display:grid;place-items:center;padding:16px;background:rgba(2,17,56,.55)}
.invload[hidden]{display:none}
.invload>.pl-loader{min-height:0;width:min(400px,100%);padding:22px 18px;border-radius:18px;box-shadow:0 16px 44px rgba(0,0,0,.3)}
