/* ==========================================================================
   jaduplay-skeleton.css — ONE shared skeleton-loading system (Round 3 WS3)
   --------------------------------------------------------------------------
   Every data-loading area on the site uses these classes — no per-page
   one-off spinners. A skeleton block is shaped like the content it stands
   in for (game cards, odds rows, gateway cards, table rows, form fields),
   so there is no layout shift when real data replaces it.

   Usage (see assets/js/jaduplay-skeleton.js):
     <div class="jp-sk-root" aria-hidden="true">...jp-sk blocks...</div>
   or via JS: JPSkeleton.show(el, 'odds', 3) / JPSkeleton.clear(el).

   Colours are neutral greys that read on both the dark player theme and
   the light admin pages. The shimmer is a background-position animation
   on the block itself (no pseudo-elements, no extra DOM).
   ========================================================================== */

.jp-sk-root { display: block; width: 100%; }
/* width:100% matters: inside flex parents (.sl-track slider tracks,
   .game-row / .promo-scroll rows) the root is a flex item, and without an
   explicit width it shrink-wraps to ~10px, collapsing the skeleton. */
.jp-sk-root[aria-hidden="true"] { pointer-events: none; }

/* --- shimmer block ------------------------------------------------------ */
.jp-sk {
  display: block;
  border-radius: 6px;
  background: linear-gradient(90deg,
    rgba(148, 163, 184, .22) 25%,
    rgba(148, 163, 184, .48) 50%,
    rgba(148, 163, 184, .22) 75%);
  background-size: 200% 100%;
  animation: jp-sk-shimmer 1.4s linear infinite;
}
@keyframes jp-sk-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .jp-sk { animation: none; }
}

.jp-sk-line { height: 12px; }
.jp-sk-line-sm { height: 10px; }
.jp-sk-bar { height: 14px; width: 100%; }
.jp-sk-circle { border-radius: 50%; }

/* --- game cards: horizontal scroll row, matches .game-row / .g-card ------ */
.jp-sk-cards {
  display: flex; gap: 8px; overflow: hidden;
  padding: 0 12px 14px; scrollbar-width: none;
}
.jp-sk-cards::-webkit-scrollbar { display: none; }
.jp-sk-gcard { flex-shrink: 0; width: 136px; }
@media (min-width: 768px) { .jp-sk-gcard { width: 168px; } }
.jp-sk-gimg { height: 96px; border-radius: 8px; }
@media (min-width: 768px) { .jp-sk-gimg { height: 118px; } }
.jp-sk-gname { height: 12px; margin-top: 6px; width: 72%; }

/* --- game cards: grid, matches .gm-page / .game-grid / .gw-free grids ---- */
.jp-sk-catgrid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
@media (min-width: 768px) { .jp-sk-catgrid { grid-template-columns: repeat(4, 1fr); } }
.jp-sk-catgrid .jp-sk-gimg { height: auto; aspect-ratio: 3 / 2; width: 100%; }
/* Inside a slider track (.sl-track) the skeleton is one .gm-page slide, so
   it sizes exactly like a real slide. */
.jp-sk-page {
  min-width: 100%; display: grid;
  grid-template-columns: 1fr 1fr; gap: 10px;
}
@media (min-width: 768px) { .jp-sk-page { grid-template-columns: repeat(4, 1fr); } }
.jp-sk-page .jp-sk-gimg { height: auto; aspect-ratio: 3 / 2; width: 100%; }

/* --- odds rows: matches the event cards in .events-wrap / #sections ----- */
.jp-sk-odds { display: flex; flex-direction: column; gap: 8px; padding: 4px 0; }
.jp-sk-ev {
  border-radius: 8px; padding: 10px 12px;
  background: rgba(148, 163, 184, .08);
}
.jp-sk-ev .jp-sk-league { width: 42%; margin-bottom: 10px; }
.jp-sk-ev .jp-sk-team { width: 74%; margin-bottom: 6px; }
.jp-sk-ev .jp-sk-team2 { width: 58%; margin-bottom: 10px; }
.jp-sk-oddrow { display: flex; gap: 6px; }
.jp-sk-oddrow .jp-sk { flex: 1; height: 30px; border-radius: 6px; }

/* --- list rows: avatar + two lines (recent withdrawals, trees, menus) --- */
.jp-sk-list { display: flex; flex-direction: column; gap: 12px; padding: 8px 0; }
.jp-sk-lirow { display: flex; align-items: center; gap: 10px; }
.jp-sk-lirow .jp-sk-ava { width: 36px; height: 36px; flex-shrink: 0; }
.jp-sk-lirow .jp-sk-lines { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.jp-sk-lirow .jp-sk-l1 { width: 62%; }
.jp-sk-lirow .jp-sk-l2 { width: 38%; }

/* --- gateway cards: matches .gw-grid / .gw-card (75px logo + name bar) -- */
.jp-sk-gateway {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
}
@media (min-width: 768px) { .jp-sk-gateway { grid-template-columns: repeat(4, 1fr); } }
.jp-sk-gwcard { border-radius: 4px; overflow: hidden; }
.jp-sk-gwcard .jp-sk-logo { height: 75px; border-radius: 0; }
.jp-sk-gwcard .jp-sk-gwname { height: 30px; border-radius: 0; }

/* --- form fields: label + input-height block ---------------------------- */
.jp-sk-fields { display: flex; flex-direction: column; gap: 14px; }
.jp-sk-field .jp-sk-flabel { width: 34%; margin-bottom: 6px; }
.jp-sk-field .jp-sk-finput { height: 40px; border-radius: 8px; }

/* --- table rows: works inside <tbody> as <tr class="jp-sk-root"> -------- */
tr.jp-sk-root td { padding: 10px 12px; border: none; }
.jp-sk-tr { display: flex; gap: 12px; align-items: center; }
.jp-sk-tr .jp-sk { height: 12px; }
.jp-sk-tr .jp-sk-c1 { flex: 2; }
.jp-sk-tr .jp-sk-c2 { flex: 3; }
.jp-sk-tr .jp-sk-c3 { flex: 2; }
.jp-sk-tr .jp-sk-c4 { flex: 1; }

/* --- stat value bars (admin dashboard numbers) -------------------------- */
.jp-sk-stat { height: 28px; width: 62%; border-radius: 6px; }

/* --- tab pills (sports tabs) -------------------------------------------- */
.jp-sk-pills { display: flex; gap: 8px; overflow: hidden; padding: 4px 2px; }
.jp-sk-pills .jp-sk { height: 32px; width: 84px; flex-shrink: 0; border-radius: 16px; }

/* --- inline value (profile pv-* spans): small shimmer line ------------- */
.jp-sk-inline { display: inline-block; vertical-align: middle; height: 12px; width: 84px; }
