/* Heart Player's card previews' stylesheet (cards.js): the moment playing over a card's image while the pointer rests
   on it, YouTube's thin red bar, the speaker in the corner, and the "Autoplay video" switch. Vi.ki's own rules (its
   web/static/app.css, the hub's cards), copied as they were on Nov 7, 2026 for the sites that have none of their own
   (Offplan.tv first). The card's image box is the site's own (Vi.ki's .viki-card-pic): position relative, overflow
   hidden, 16:9. The page sets --muted --ink --line --link --on-link. */

/* "Show upcoming" and "Autoplay video" at the far end of the first shelf's heading (.shelf-pills; George, Oct 22 and 23,
   2026; hubsort.js and cardpreview.js), both drawn as one switch (.switch-pill). The label first, then the switch, with no outline, so it does not compete with the Sort buttons beside it: the label in
   "Sort by"'s gray, brighter on hover; the track lit in the link color when on, the knob dark on it as text is on a
   link-colored button (George chose this over Heart Photos' and YouTube's switches the same day). */
.shelf-pills { margin-left: auto; display: inline-flex; flex-wrap: wrap; align-items: center; gap: .25rem 1.1rem; }
.switch-pill { display: inline-flex; align-items: center; gap: 9px; font: inherit; font-size: .8rem; color: var(--muted); cursor: pointer; padding: 4px 2px; border: 0; background: transparent; }
.switch-pill:hover { color: var(--ink); }
.switch-pill[hidden] { display: none; }
.switch-pill .knob { flex: none; display: flex; width: 32px; height: 18px; padding: 2px; box-sizing: border-box; border-radius: 999px; background: var(--line); transition: background .15s ease; }
.switch-pill .knob::after { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: transform .15s ease, background .15s ease; }
.switch-pill[aria-checked="true"] .knob { background: var(--link); }
.switch-pill[aria-checked="true"] .knob::after { transform: translateX(14px); background: var(--on-link); }
@media (prefers-reduced-motion: reduce) { .switch-pill .knob, .switch-pill .knob::after { transition: none; } }

/* The card's moment playing over its picture while the pointer rests on it (cardpreview.js; George, Oct 21,
   2026). Hidden until it really plays, so the still stays until then; the player takes no pointer, so the card
   still opens; YouTube's thin red bar along the bottom grows on hover and seeks. */
/* Hidden with visibility too, not opacity alone: Chrome can paint a cross-origin YouTube frame under a parent at
   opacity 0, which showed YouTube's title, pause sign and logo over the still before the preview played (George,
   Nov 22, 2026: "why do we see the youtube controls when hovering over thumbnails at https://viki.gg/"). */
.card-preview { position: absolute; inset: 0; z-index: 1; opacity: 0; visibility: hidden; transition: opacity .2s, visibility 0s .2s; }
.card-preview.playing { opacity: 1; visibility: visible; transition: opacity .2s, visibility 0s; }
.card-preview iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; background: #000; }
.card-seek { position: absolute; left: 0; right: 0; bottom: 0; height: 12px; display: flex; align-items: flex-end; cursor: pointer; }
.card-seek::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgb(255 255 255 / .3); transition: height .1s; }
.card-seek-fill { position: relative; display: block; height: 3px; width: 0; background: #f00; transition: height .1s; }
.card-seek:hover::before, .card-seek.dragging::before, .card-seek:hover .card-seek-fill, .card-seek.dragging .card-seek-fill { height: 5px; }
/* The speaker in the corner, as on youtube.com's hover previews (cardpreview.js; George, Oct 22, 2026). */
.card-mute { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: rgb(0 0 0 / .6); color: #fff; cursor: pointer; padding: 0; }
.card-mute:hover, .card-mute:focus-visible { background: rgb(0 0 0 / .8); }
/* Gone a second after the pointer rests, as Heart Photos' video controls (George, Oct 22, 2026; cardpreview.js wake). */
.card-mute { transition: opacity .2s; }
.card-preview.idle .card-mute { opacity: 0; pointer-events: none; }

/* The spinner over a card's still while its preview is slow to start (cards.js, since v0.9.0; George, Nov 22, 2026). */
.card-spin {
  position: absolute; inset: 0; margin: auto; width: 34px; height: 34px; z-index: 2; pointer-events: none;
  border: 3px solid rgb(255 255 255 / .28); border-top-color: #fff; border-radius: 50%;
  box-shadow: 0 0 0 1px rgb(0 0 0 / .25); opacity: 0; transition: opacity .15s;
  animation: card-spin .8s linear infinite;
}
.card-spin.on { opacity: 1; }
@keyframes card-spin { to { transform: rotate(360deg); } }
