/* /assets/css/pages/winners.css */
/* Tab nav scrolls horizontally on narrow screens; hide the scrollbar itself
   (matches the .scrollbar-none convention used elsewhere in this codebase,
   e.g. plugins/auction's gallery — but that copy is only enqueued on gallery
   pages, so it never reaches winners.php's own tab bar without this). */
.scrollbar-none::-webkit-scrollbar { display: none; }
.scrollbar-none { -ms-overflow-style: none; scrollbar-width: none; }

/* ── Grid / list layout shell ──────────────────────────────────────────────
   Grid and list share the same card markup; the parent's modifier class
   decides layout, so AJAX-appended cards (no JS re-render) pick up whichever
   view is currently active automatically. */
.wn-grid { display: grid; gap: 1.1rem; }
.wn-grid.wn-view-grid { grid-template-columns: repeat(1, minmax(0, 1fr)); }
@media (min-width: 640px)  { .wn-grid.wn-view-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; } }
@media (min-width: 1024px) { .wn-grid.wn-view-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .wn-grid.wn-view-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.wn-grid.wn-view-list { display: flex; flex-direction: column; gap: 0.65rem; }

/* ── Card shell — editorial flat, bolder depth on hover ───────────────────── */
.wn-card {
  display: flex; flex-direction: column; text-decoration: none; position: relative;
  border-radius: 6px; overflow: hidden;
  background: var(--paper); border: 1px solid var(--rule);
  box-shadow: 0 1px 4px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.04);
  transition: transform .25s ease, box-shadow .25s ease, border-color .2s ease;
}
/* Source-type accent stripe (design-system top-accent signature) */
.wn-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--src-grad, var(--src-color, var(--theme-500))); z-index: 10;
}
.wn-card:hover {
  transform: translateY(-4px);
  border-color: var(--src-color, var(--ink));
  box-shadow: 0 16px 44px -10px var(--src-color, rgba(0,0,0,0.2)), 0 2px 8px rgba(0,0,0,0.06);
}
.dark .wn-card:hover {
  box-shadow: 0 18px 52px -10px color-mix(in srgb, var(--src-color, #000) 45%, transparent), 0 2px 8px rgba(0,0,0,0.5);
}

/* ── Image area ─────────────────────────────────────────────────────────── */
@keyframes wn-shimmer { 0%{transform:translateX(-100%)} 100%{transform:translateX(100%)} }
.wn-img-wrap {
  position: relative; aspect-ratio: 1/1; overflow: hidden;
  background: var(--paper-2); flex-shrink: 0;
}
.wn-coin-ico { width: 17px; height: 17px; vertical-align: middle; display: inline-block; margin-right: 1px; }
.wn-img-wrap::before {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
  animation: wn-shimmer 1.6s ease-in-out infinite; transition: opacity .3s;
}
.wn-img-wrap.wn-img-done::before { opacity: 0; animation: none; }
.wn-img-bg   { position: absolute; inset: 0; z-index: 2; }
.wn-img-photo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  opacity: 0; transition: opacity .4s ease, transform .5s ease; z-index: 3;
}
.wn-img-photo.wn-loaded { opacity: 1; }
.wn-card:hover .wn-img-photo.wn-loaded { transform: scale(1.05); }

/* Bottom fade so badges read on any image */
.wn-img-fade {
  position: absolute; inset-x: 0; bottom: 0; height: 52%;
  background: linear-gradient(to top, rgba(0,0,0,0.68) 0%, transparent 100%);
  z-index: 4; pointer-events: none;
}

/* Source badge — flat pill, bottom-left */
.wn-src-pill {
  position: absolute; bottom: 10px; left: 10px; z-index: 5;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px 3px 7px; border-radius: 3px;
  font-size: 10px; font-weight: 800; letter-spacing: .04em; color: #fff;
  background: rgba(0,0,0,0.55); border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-family: 'Inter', system-ui, sans-serif;
  max-width: calc(100% - 20px); overflow-wrap: break-word;
}
.wn-src-dot {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
  background: var(--src-color, var(--theme-500));
  box-shadow: 0 0 5px var(--src-color, var(--theme-500));
}
/* Timestamp — mono, top-right */
.wn-time-pill {
  position: absolute; top: 10px; right: 10px; z-index: 5;
  font-size: 9.5px; color: rgba(255,255,255,0.72);
  background: rgba(0,0,0,0.42); padding: 2px 7px;
  border-radius: 3px; backdrop-filter: blur(4px);
  font-family: 'JetBrains Mono', monospace;
}

/* ── Body ───────────────────────────────────────────────────────────────── */
.wn-body { padding: 14px 15px 15px; display: flex; flex-direction: column; gap: 11px; flex: 1; min-width: 0; }
.wn-body-main { min-width: 0; }

/* Prize label — small-caps eyebrow. Wraps instead of truncating so a long
   prize name stays fully legible on narrow cards (see CLAUDE.md's
   responsive rule against ellipsis-hiding content). */
.wn-item-name {
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--ink-soft);
  overflow-wrap: break-word; margin-bottom: 4px;
  font-family: 'Inter', system-ui, sans-serif;
}

/* Prize value — Fraunces display, dominant */
.wn-val-currency,
.wn-val-coins,
.wn-val-free {
  font-family: var(--font-display, 'Fraunces', Georgia, serif);
  font-variation-settings: 'opsz' 72, 'SOFT' 0;
  display: block; font-size: 23px; font-weight: 800;
  line-height: 1.1; letter-spacing: -0.02em; overflow-wrap: break-word;
}
/* The value takes the store's accent (a theme sets --wn-val to choose its
   own); a free prize reads in the store's "good" tone. */
.wn-val-currency,
.wn-val-coins    { color: var(--wn-val, var(--theme-700, #6d28d9)); }
.dark .wn-val-currency,
.dark .wn-val-coins { color: var(--wn-val, var(--theme-300, #c4b5fd)); }
.wn-val-free     { color: var(--wn-val, color-mix(in srgb, var(--px-good, #15803d) 78%, var(--ink))); }

/* Hairline divider */
.wn-divider { border: none; border-top: 1px solid var(--rule); margin: 0; }

/* Winner row */
.wn-winner-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.wn-avatar {
  width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  border: 1.5px solid var(--rule);
}
.wn-avatar-init {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 900;
  background: var(--src-grad, linear-gradient(135deg,#fde68a,#d97706)); color: #000;
  font-family: 'Inter', system-ui, sans-serif;
}
.wn-winner-text { min-width: 0; flex: 1; }
.wn-winner-name {
  font-size: 12.5px; font-weight: 700; color: var(--ink);
  overflow-wrap: break-word;
  font-family: 'Inter', system-ui, sans-serif;
}
.wn-winner-sub { font-size: 9.5px; color: var(--ink-soft); margin-top: 1px; }
.wn-view-link {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 2px;
  font-size: 10px; font-weight: 700; color: var(--src-color, var(--theme-500));
  font-family: 'Inter', system-ui, sans-serif;
}

/* ── List view ──────────────────────────────────────────────────────────── */
.wn-view-list .wn-card {
  flex-direction: row; align-items: stretch; border-radius: 8px;
}
.wn-view-list .wn-card::before { top: 0; bottom: 0; left: 0; right: auto; width: 3px; height: auto; }
.wn-view-list .wn-card:hover { transform: translateX(3px); }
.wn-view-list .wn-img-wrap { width: 84px; aspect-ratio: 1/1; }
@media (min-width: 480px) { .wn-view-list .wn-img-wrap { width: 108px; } }
.wn-view-list .wn-time-pill,
.wn-view-list .wn-src-pill { display: none; }
.wn-view-list .wn-body {
  flex: 1; flex-direction: row; align-items: center; flex-wrap: wrap;
  gap: 6px 20px; padding: 10px 16px;
}
.wn-view-list .wn-body-main { flex: 1 1 160px; }
.wn-view-list .wn-divider { display: none; }
.wn-view-list .wn-winner-row { flex: 1 1 200px; }
.wn-view-list .wn-val-currency,
.wn-view-list .wn-val-coins,
.wn-view-list .wn-val-free { font-size: 18px; }

/* ── Tab bar ─────────────────────────────────────────────────────────────── */
.wn-tab-bar {
  background: rgba(251,249,244,0.95);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--rule);
}
.dark .wn-tab-bar { background: rgba(10,10,12,0.95); }

.wn-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .18s ease; white-space: nowrap; flex-shrink: 0;
  border: none; background: transparent;
  font-family: 'Inter', system-ui, sans-serif;
}
.wn-tab-active {
  background: var(--ink); color: var(--paper);
  box-shadow: 0 2px 10px rgba(0,0,0,0.18);
}
/* Beat dynamic-theme.css `.dark button { color: var(--text-primary) }` (0-1-1),
   which otherwise forces the active pill's text light-on-light in dark mode. */
.dark .wn-tab-active { color: var(--paper); }
.wn-tab-inactive {
  color: var(--ink-soft);
}
.wn-tab-inactive:hover {
  color: var(--ink); background: var(--paper-2);
}
.wn-tab-badge {
  font-size: 10px; font-weight: 700; padding: 1px 6px;
  border-radius: 999px; line-height: 1.5;
}
.wn-tab-badge-active  { background: rgba(255,255,255,0.18); color: inherit; }
.wn-tab-badge-inactive { background: var(--paper-2); color: var(--ink-soft); }
.dark .wn-tab-badge-inactive { background: var(--rule-soft); }

/* Grid/list toggle */
.wn-view-toggle {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 3px; border-radius: 999px; border: 1px solid var(--rule);
  background: var(--paper);
}
.wn-view-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 999px; border: none;
  background: transparent; color: var(--ink-soft); cursor: pointer;
  transition: background .18s ease, color .18s ease;
}
.wn-view-btn:hover { color: var(--ink); background: var(--paper-2); }
.wn-view-btn-active { background: var(--ink); color: var(--paper); }
.dark .wn-view-btn-active { color: var(--paper); }

/* Empty state now rendered via theme_component('cards/empty-state.php') */

/* ── Load More — ed-btn-secondary style ──────────────────────────────────── */
.wn-load-more {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; margin-top: 40px; padding: 11px 36px; border-radius: 999px;
  background: transparent; border: 1.5px solid var(--rule);
  font-size: 13px; font-weight: 700; color: var(--ink-2);
  cursor: pointer; transition: background .2s, border-color .2s, color .2s, transform .2s;
  font-family: 'Inter', system-ui, sans-serif;
}
.wn-load-more:hover:not(:disabled) {
  background: var(--paper-2); border-color: var(--ink); color: var(--ink);
  transform: translateY(-1px);
}
.wn-load-more:disabled { opacity: .45; cursor: not-allowed; }

/* ── Winner card (components/winners/card.php) ─────────────────────────────
   Winner first, then the prize, then its value. Colours come from the theme's
   own variables. --wnc-src is the source's colour: the theme's accent leaning
   towards the colour the source registered (--wnc-ring, printed inline), so
   sources stay apart in every theme. A theme sets --wnc-src/--wnc-grad on
   .wnc, or per source on .wnc[data-tone="amber|blue|violet|green|…"]
   (the source's own colour word; data-src names the product, for a
   plugin's own stylesheets). */
.wnc {
  --wnc-src: color-mix(in srgb, var(--theme-600, var(--wnc-ring)) 65%, var(--wnc-ring, #10b981));
  --wnc-grad: linear-gradient(135deg, color-mix(in srgb, var(--theme-500, var(--wnc-ring)) 65%, var(--wnc-ring, #10b981)), var(--wnc-src));
  position: relative; display: flex; flex-direction: column; gap: .9rem;
  padding: 1rem 1.05rem; border-radius: 1rem; text-decoration: none; color: var(--ink);
  background: var(--paper); border: 1px solid var(--rule);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  overflow: hidden; min-width: 0;
}
.wnc::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--wnc-grad);
}
.wnc:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -14px rgba(0, 0, 0, .25); border-color: color-mix(in srgb, var(--wnc-src) 45%, var(--rule)); }

.wnc-head { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.wnc-av-wrap { position: relative; flex-shrink: 0; display: inline-flex; }
.wnc-av {
  width: 2.75rem; height: 2.75rem; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px color-mix(in srgb, var(--wnc-src) 55%, transparent);
}
.wnc-av-init {
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.05rem; color: #fff; background: var(--wnc-grad);
}
.wnc-who { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.wnc-name { font-weight: 700; font-size: .95rem; line-height: 1.25; overflow-wrap: anywhere; }
.wnc-time { font-size: .75rem; color: var(--ink-soft); }
.wnc-src {
  flex-shrink: 0; align-self: flex-start; font-size: .68rem; font-weight: 700; letter-spacing: .02em;
  padding: .2rem .55rem; border-radius: 999px; white-space: nowrap;
  color: var(--wnc-src); background: color-mix(in srgb, var(--wnc-src) 12%, transparent);
}

.wnc-prize {
  display: flex; align-items: center; gap: .75rem; padding: .65rem; border-radius: .75rem;
  background: var(--paper-2); min-width: 0;
}
.wnc-thumb {
  width: 3.25rem; height: 3.25rem; border-radius: .6rem; flex-shrink: 0; overflow: hidden;
  background: var(--wnc-grad); display: flex; align-items: center; justify-content: center;
}
.wnc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wnc-prize-text { display: flex; flex-direction: column; min-width: 0; gap: .1rem; }
.wnc-item { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); overflow-wrap: anywhere; }
.wnc-from { font-size: .88rem; font-weight: 600; color: var(--ink); line-height: 1.3; overflow-wrap: anywhere; }

.wnc-foot { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: auto; }
.wnc-val { font-size: 1.35rem !important; font-weight: 800; line-height: 1.1; overflow-wrap: anywhere; }
.wnc-view { display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; font-weight: 700; color: var(--wnc-src); flex-shrink: 0; }

/* List view: one row per winner on wide screens. */
.wn-view-list .wnc { flex-direction: row; align-items: center; flex-wrap: wrap; gap: .75rem 1.25rem; }
.wn-view-list .wnc::before { inset: 0 auto 0 0; width: 3px; height: auto; }
.wn-view-list .wnc:hover { transform: translateX(3px); }
.wn-view-list .wnc-head { flex: 1 1 14rem; }
.wn-view-list .wnc-prize { flex: 1 1 14rem; background: transparent; padding: 0; }
.wn-view-list .wnc-foot { flex: 0 0 auto; margin-top: 0; gap: 1rem; }
@media (max-width: 639px) {
  .wn-view-list .wnc { flex-direction: column; align-items: stretch; }
  .wn-view-list .wnc-prize { background: var(--paper-2); padding: .65rem; }
}
@media (prefers-reduced-motion: reduce) { .wnc, .wnc:hover { transition: none; transform: none; } }

/* /assets/themes/prism/assets/css/components/winners/hero.css */
/* Prism winners hero (components/winners/hero.php): the title, the line
   and the total at the inline start; beside them a band of refracted
   light, the accent's spectrum fanning across it from a prism at its
   end, with the latest winners set on it as a row of white cards. The
   cards rise in one after another; still under reduced motion. */
.psm-wn {
  position: relative; overflow: hidden;
  padding: clamp(1.8rem, 4vw, 3.2rem) 0 clamp(1.8rem, 3.4vw, 2.8rem);
  background: radial-gradient(60% 90% at 100% 0%, var(--psm-accent-soft), transparent 70%), var(--paper);
  border-bottom: 1px solid var(--rule);
}
[dir="rtl"] .psm-wn { background: radial-gradient(60% 90% at 0% 0%, var(--psm-accent-soft), transparent 70%), var(--paper); }
.psm-wn__inner { position: relative; max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
@media (max-width: 1023px) { .psm-wn__inner { grid-template-columns: minmax(0, 1fr); align-items: start; } }
.psm-wn__eyebrow { display: inline-flex; align-items: center; gap: .55rem; margin: 0 0 1rem; padding: .4rem .85rem; border-radius: 999px; background: var(--psm-accent-soft); color: var(--psm-accent-text); font: 600 12px/1.3 var(--font-ui); letter-spacing: .06em; text-transform: uppercase; }
html:is(:lang(ar), :lang(ur), :lang(bn), :lang(zh), :lang(ru), :lang(el)) .psm-wn__eyebrow { letter-spacing: 0; font-size: 12.5px; }
.psm-wn__title { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(2.2rem, 4.4vw, 3.5rem); letter-spacing: -.04em; line-height: 1; color: var(--ink); overflow-wrap: break-word; text-wrap: balance; }
html:is(:lang(ar), :lang(ur), :lang(bn), :lang(zh), :lang(ru), :lang(el)) .psm-wn__title { letter-spacing: 0; line-height: 1.15; }
.psm-wn__text { margin: .9rem 0 0; max-width: 34rem; font-size: 1.05rem; line-height: 1.6; color: var(--ink-soft); }
.psm-wn__total { display: inline-flex; flex-direction: column; gap: .2rem; margin-top: 1.4rem; padding: .85rem 1.1rem; border-radius: 18px; background: var(--paper-2); border: 1px solid var(--rule); box-shadow: var(--shadow); }
.psm-wn__total-label { font: 600 11.5px/1.3 var(--font-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
html:is(:lang(ar), :lang(ur), :lang(bn), :lang(zh), :lang(ru), :lang(el)) .psm-wn__total-label { letter-spacing: 0; font-size: 12.5px; }
.psm-wn__total-value { font: 600 clamp(1.5rem, 3vw, 2rem)/1.1 var(--font-num); letter-spacing: -.04em; color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: normal; white-space: nowrap; }

/* The band: the spectrum fanning from the prism across a sunk panel */
.psm-wn__band {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 15rem; padding: 2.2rem 1.4rem 1.6rem;
  border-radius: 28px;
  background: var(--paper-3);
  border: 1px solid var(--rule);
}
.psm-wn__light {
  position: absolute; z-index: -1; inset: 0;
  background: conic-gradient(from 72deg at 104% 18%, transparent 0deg, rgba(var(--theme-200-rgb), .55) 6deg, rgba(var(--theme-300-rgb), .5) 12deg, rgba(var(--theme-500-rgb), .32) 18deg, rgba(var(--theme-700-rgb), .22) 24deg, transparent 30deg);
}
html.dark .psm-wn__light { background: conic-gradient(from 72deg at 104% 18%, transparent 0deg, rgba(var(--theme-300-rgb), .22) 6deg, rgba(var(--theme-400-rgb), .24) 12deg, rgba(var(--theme-500-rgb), .2) 18deg, rgba(var(--theme-700-rgb), .2) 24deg, transparent 30deg); }
[dir="rtl"] .psm-wn__light { transform: scaleX(-1); }
.psm-wn__prism { position: absolute; z-index: 0; top: 14px; inset-inline-end: 16px; width: 34px; height: 30px; }
.psm-wn__prism svg { display: block; width: 100%; height: 100%; }
[dir="rtl"] .psm-wn__prism { transform: scaleX(-1); }
.psm-wn__cards { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; margin: 0; padding: 0; list-style: none; }
.psm-wn__card {
  display: flex; flex-direction: column; gap: .2rem; min-width: 0;
  padding: .75rem .75rem .9rem;
  border-radius: 20px; background: var(--paper-2); border: 1px solid var(--rule);
  box-shadow: var(--shadow);
}
.psm-wn__pic { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; margin-bottom: .45rem; border-radius: 14px; background: var(--psm-well); overflow: hidden; }
.psm-wn__pic img { width: 84%; height: 84%; object-fit: contain; }
/* a prize with no picture: the gift drawn in its place */
.psm-wn__pic-art { width: 80%; height: auto; }
.psm-wn__who { font: 600 .92rem/1.25 var(--font-ui); color: var(--ink); overflow-wrap: anywhere; }
.psm-wn__what { font-size: .8rem; line-height: 1.35; color: var(--ink-soft); overflow-wrap: anywhere; }
.psm-wn__empty { display: flex; justify-content: center; }
.psm-wn__empty .psm-art { width: min(240px, 70%); height: auto; }
@media (prefers-reduced-motion: no-preference) {
  .psm-wn__card { animation: psm-wn-rise .6s cubic-bezier(.2, .8, .3, 1) both; animation-delay: calc(var(--i, 0) * 80ms + 80ms); }
}
@keyframes psm-wn-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (max-width: 639px) {
  .psm-wn__cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .psm-wn__band { padding: 1.8rem .9rem 1rem; }
}

