/* ==========================================================================
   CasinoDrop Social — /social/live/ (Live now). Layered on crash-tracker.css
   (.crx) and social.css (.scx); everything here is scoped to the page class
   `.scx-p-live` (prefix `slx-`). Markup: template-parts/social/live.php and
   assets/js/social-live.js.

   Pieces: the toolbar card (casino-streams switch, sort, casino chips,
   search, language, Following, count), the stream title line on the shared
   live card, the stale / loading / empty states and the method grid.

   Type floor 12px. Tap targets 44px under 760px. No SVG text.
   ========================================================================== */

/* ---------- KPI strip: room before the first section ---------- */
.scx-p-live .scx-kpis{margin-bottom:22px}

/* ---------- toolbar ---------- */
.scx-p-live .slx-tools{display:flex;flex-direction:column;gap:12px;margin:0 0 14px;padding:14px 16px;border-color:rgba(46,212,127,.2);background:linear-gradient(90deg,rgba(46,212,127,.06),transparent 55%),var(--card)}
.scx-p-live .slx-tools.is-all{border-color:var(--hair);background:var(--card)}
.scx-p-live .slx-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;min-width:0}
.scx-p-live .slx-row+.slx-row{padding-top:12px;border-top:1px solid var(--hair)}
.scx-p-live .slx-lbl{flex:0 0 auto;font:700 12px/1 var(--font-body,"Inter",sans-serif);letter-spacing:.08em;text-transform:uppercase;color:var(--ink-4)}

/* switch (the streamers board's control, page-scoped) */
.scx-p-live .slx-switch{position:relative;display:inline-flex;align-items:center;gap:10px;min-height:36px;font-size:15px;font-weight:700;color:#fff;cursor:pointer;user-select:none}
.scx-p-live .slx-switch em{font-style:normal;font-weight:500;color:var(--ink-3)}
.scx-p-live .slx-switch input{position:absolute;opacity:0;width:1px;height:1px;margin:0}
.scx-p-live .slx-switch i{flex:0 0 auto;width:42px;height:24px;border-radius:999px;background:var(--surface-3,#293046);border:1px solid var(--hair-2);position:relative;transition:background .16s}
.scx-p-live .slx-switch i::after{content:"";position:absolute;top:3px;left:3px;width:16px;height:16px;border-radius:50%;background:#fff;transition:transform .16s}
.scx-p-live .slx-switch input:checked+i{background:var(--up,#2ED47F);border-color:transparent}
.scx-p-live .slx-switch input:checked+i::after{transform:translateX(18px);background:#0B1A12}
.scx-p-live .slx-switch input:focus-visible+i{outline:2px solid var(--cyan,#4FC7EA);outline-offset:2px}
.scx-p-live .slx-scope-note{flex:1 1 240px;min-width:0;font-size:13px;line-height:1.45;color:var(--ink-3)}
.scx-p-live .slx-scope-off,.scx-p-live .slx-tools.is-all .slx-scope-on{display:none}
.scx-p-live .slx-tools.is-all .slx-scope-off{display:inline}

/* sort */
.scx-p-live .slx-sortwrap{display:inline-flex;align-items:center;gap:10px;margin-left:auto;min-width:0}
.scx-p-live .slx-sort button{min-height:34px}

/* casino chips */
.scx-p-live .slx-cas-row{flex-wrap:nowrap;align-items:center}
.scx-p-live .slx-cas{flex:1 1 auto;min-width:0}
.scx-p-live .slx-cas-chip{min-height:34px;padding:0 12px 0 10px}
.scx-p-live .slx-cas-chip img{width:16px;height:16px;border-radius:5px;object-fit:cover;flex:0 0 16px}
.scx-p-live .slx-cas-chip .scx-mono{width:16px;height:16px}
.scx-p-live .slx-cas-chip .scx-n,.scx-p-live .slx-fol .scx-n{font:600 12px/1 var(--font-mono,ui-monospace,monospace);font-variant-numeric:tabular-nums;color:var(--ink-4);padding:3px 6px;border-radius:999px;background:rgba(255,255,255,.05)}
.scx-p-live .slx-cas-chip[aria-pressed="true"] .scx-n{color:#E4DBFF;background:rgba(167,139,250,.2)}
.scx-p-live .slx-cas-chip[data-slx-casino="__none"]{color:var(--ink-3)}

/* search, language, Following, count */
.scx-p-live .slx-search{position:relative;display:block;flex:1 1 260px;min-width:0;max-width:420px}
.scx-p-live .slx-search input{width:100%;height:38px;padding:0 12px 0 36px;border:1px solid var(--hair-2);border-radius:999px;background:var(--card-2);color:var(--ink);font:inherit;font-size:14px;outline:none;transition:border-color .16s}
.scx-p-live .slx-search input:focus{border-color:var(--cyan,#4FC7EA)}
.scx-p-live .slx-search input::placeholder{color:var(--ink-4)}
.scx-p-live .slx-search>svg{position:absolute;left:12px;top:50%;width:16px;height:16px;transform:translateY(-50%);fill:none;stroke:var(--ink-4);stroke-width:2;stroke-linecap:round;pointer-events:none}
.scx-p-live .slx-pick .crx-select{height:38px;max-width:240px}
.scx-p-live .slx-fol{min-height:38px}
.scx-p-live .slx-fol[aria-pressed="true"]{background:rgba(245,196,81,.12);border-color:rgba(245,196,81,.5);color:#fff}
.scx-p-live .slx-fol[aria-pressed="true"] .scx-g{color:var(--gold,#F5C451);fill:currentColor}
.scx-p-live .slx-fol[aria-pressed="true"] .scx-n{color:var(--gold,#F5C451);background:rgba(245,196,81,.14)}
.scx-p-live .slx-count{margin-left:auto;font-size:13px;font-weight:600;color:var(--ink-3);white-space:nowrap;font-variant-numeric:tabular-nums}
.scx-p-live .slx-count #slxCount{color:#fff}

/* ---------- live cards: the redundant category, stale state (the title line and the caveat's wrap are in social.css) ---------- */
.scx-p-live .slx-grid{margin-bottom:2px}
.scx-p-live .slx-grid.is-casino-only .scx-live-who small,.scx-p-live .slx-grid.is-found .scx-live-who small{display:none}
.scx-p-live .slx-sec.is-behind .scx-live-badge{background:var(--gold,#F5C451);color:#1A1405}
.scx-p-live .slx-sec.is-behind .scx-live-media img{filter:saturate(.55) brightness(.85)}

/* loading skeleton (no feed on the server render) */
.scx-p-live .slx-skel{display:flex;flex-direction:column;gap:9px;padding-bottom:14px;border-radius:12px;background:var(--card-2);border:1px solid var(--hair);overflow:hidden}
.scx-p-live .slx-skel-media{display:block;aspect-ratio:16/9;background:linear-gradient(100deg,rgba(255,255,255,.03) 30%,rgba(255,255,255,.08) 50%,rgba(255,255,255,.03) 70%) 0 0/300% 100%,var(--card);animation:slxShimmer 1.6s linear infinite}
.scx-p-live .slx-skel-line{display:block;height:12px;margin:0 12px;border-radius:6px;background:rgba(255,255,255,.07)}
.scx-p-live .slx-skel-line.is-short{width:45%}
@keyframes slxShimmer{from{background-position:100% 0,0 0}to{background-position:0 0,0 0}}

/* empty states */
.scx-p-live .slx-empty{display:flex;flex-direction:column;align-items:center;gap:12px;padding:30px 18px}
.scx-p-live .slx-empty p{max-width:56ch;font-size:14px;line-height:1.55;color:var(--ink-2)}

/* paging */
.scx-p-live .slx-more{gap:8px;flex-wrap:wrap}
.scx-p-live #slxCount:focus{outline:none}

/* ---------- method grid ---------- */
.scx-p-live .slx-how{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.scx-p-live .slx-how h3{margin:0 0 6px;font-size:15px;font-weight:700;line-height:1.35;color:#fff}
.scx-p-live .slx-how p{margin:0}

/* ---------- breakpoints ---------- */
@media (max-width:1360px){
	/* the switch's own label already says it; the note stays as its accessible description */
	.scx-p-live .slx-scope-note{display:none}
}
@media (max-width:1240px){
	.scx-p-live .slx-how{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:1040px){
	.scx-p-live .slx-sortwrap{margin-left:0}
}
@media (max-width:760px){
	.scx-p-live .slx-tools{padding:12px;gap:10px}
	.scx-p-live .slx-row+.slx-row{padding-top:10px}
	.scx-p-live .slx-switch{min-height:44px;font-size:14px}
	.scx-p-live .slx-switch em{display:block;font-size:12.5px}
	.scx-p-live .slx-scope-note{display:none}
	.scx-p-live .slx-sortwrap{width:100%}
	.scx-p-live .slx-sort{flex:1 1 auto}
	.scx-p-live .slx-sort button{flex:1 1 0;min-height:44px}
	.scx-p-live .slx-cas-row{flex-direction:column;align-items:stretch;gap:8px}
	.scx-p-live .slx-cas{flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-inline:contain;scrollbar-width:none;padding-bottom:2px;-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 24px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 24px),transparent)}
	.scx-p-live .slx-cas::-webkit-scrollbar{display:none}
	.scx-p-live .slx-cas-chip{flex:0 0 auto;min-height:44px}
	.scx-p-live .slx-search{flex-basis:100%;max-width:none}
	.scx-p-live .slx-search input{height:44px;font-size:16px}
	.scx-p-live .slx-pick{flex:1 1 0;min-width:0}
	.scx-p-live .slx-pick .crx-select{width:100%;max-width:none;height:44px;min-height:44px}
	.scx-p-live .slx-fol{flex:0 0 auto;min-height:44px}
	.scx-p-live .slx-reset{flex:1 1 100%}
	.scx-p-live .slx-count{width:100%;margin-left:0;white-space:normal}
	.scx-p-live .slx-more .crx-btn{flex:1 1 auto}
	.scx-p-live .slx-how{grid-template-columns:minmax(0,1fr)}
}
/* phones: the cards become compact rows (thumbnail left; name, casino, title and the Share / follow foot right), so the
   list scans like a directory */
@media (max-width:560px){
	.scx-p-live .slx-grid{grid-template-columns:minmax(0,1fr);gap:8px}
	.scx-p-live .slx-grid>.scx-live{display:grid;grid-template-columns:148px minmax(0,1fr);grid-template-rows:auto 1fr auto;align-items:start}
	.scx-p-live .slx-grid>.scx-live:hover{transform:none}
	.scx-p-live .slx-grid .scx-live-media{grid-column:1;grid-row:1/-1;align-self:stretch;aspect-ratio:auto;min-height:84px}
	.scx-p-live .slx-grid .scx-live-media img{position:absolute;inset:0}
	.scx-p-live .slx-grid .scx-live-badge{top:6px;left:6px;padding:2px 6px}
	.scx-p-live .slx-grid .scx-live-up{top:6px;right:6px;bottom:auto;padding:2px 6px}
	.scx-p-live .slx-grid .scx-live-viewers{left:6px;bottom:6px;padding:2px 6px}
	.scx-p-live .slx-grid.is-found .scx-live-flag{display:none}
	.scx-p-live .slx-grid .scx-live-body,.scx-p-live .slx-grid .scx-live-body:has(+ .scx-live-title){grid-column:2;grid-row:1;grid-template-columns:minmax(0,1fr);gap:6px;padding:6px 6px 2px 12px}
	.scx-p-live .slx-grid .scx-live-body .scx-av{display:none}
	/* no title line (every untracked card, a tracked one with a blank title): the name block centres beside the thumbnail */
	.scx-p-live .slx-grid .scx-live-body:has(+ .scx-live-foot){grid-row:1/span 2;align-self:center;padding:6px 6px 6px 12px}
	.scx-p-live .slx-grid .scx-live-title{grid-column:2;grid-row:2;margin:0 10px 6px 12px}
	.scx-p-live .slx-grid .scx-live-foot{grid-column:2;grid-row:3;padding:0 6px 6px 12px}
}
@media (prefers-reduced-motion:reduce){
	.scx-p-live .slx-skel-media{animation:none}
	.scx-p-live .slx-switch i,.scx-p-live .slx-switch i::after,.scx-p-live .slx-search input{transition:none}
}
