.wes-landing-lucky { background: var(--wes-bg); }

/* State pill row */
.wes-lucky-state {
  display: flex; justify-content: center; align-items: center; gap: 16px;
  flex-wrap: wrap; margin-bottom: 28px;
}
.wes-lucky-state-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 999px;
  background: linear-gradient(135deg, var(--wes-red), var(--wes-red-2));
  color: #fff; font-size: 12px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  box-shadow: 0 4px 16px rgba(220,28,28,0.25);
}
.wes-lucky-meta-inline {
  font-size: 13px; color: var(--wes-fg-muted);
}
.wes-lucky-meta-inline strong { color: var(--wes-fg); font-weight: 800; }

/* Prize cards grid — 3 tiers */
.wes-lucky-prizes {
  display: grid; grid-template-columns: 1.15fr 0.95fr 0.95fr; gap: 20px;
   margin: 0 auto 36px;
}
@media (max-width: 980px) { .wes-lucky-prizes { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .wes-lucky-prizes { grid-template-columns: 1fr; } }

.wes-lucky-prize {
  position: relative; overflow: hidden;
  background: var(--wes-card); border: 1px solid var(--wes-border);
  border-radius: 24px; padding: 32px 24px 24px;
  text-align: center; box-shadow: var(--wes-shadow-md);
  transition: transform 240ms cubic-bezier(.4,0,.2,1), box-shadow 240ms;
}
.wes-lucky-prize:hover { transform: translateY(-6px); box-shadow: var(--wes-shadow-lg); }

/* Rank badge (top-right corner) */
.wes-lucky-prize-rank-badge {
  position: absolute; top: 16px; right: 16px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
  background: var(--wes-bg); color: var(--wes-fg-soft);
}
.wes-lucky-prize-rank-badge span { font-size: 9px; }
.wes-lucky-rank-mark {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.28);
  color: currentColor;
  font-size: 9px !important;
  font-weight: 900;
  line-height: 1;
}

/* Rank-1 (Grand) — gold gradient hero */
.wes-lucky-prize-rank-1 {
  background: linear-gradient(160deg, #fff5e0 0%, #fff 60%);
  border-color: #f5b700;
  box-shadow: 0 12px 40px rgba(245,183,0,0.18);
}
.wes-lucky-prize-rank-1 .wes-lucky-prize-rank-badge {
  background: linear-gradient(135deg, #f5b700, #d99800); color: #fff;
}

/* Rank-2 (Silver) — voucher */
.wes-lucky-prize-rank-2 {
  background: linear-gradient(160deg, #f0f4f8 0%, #fff 60%);
  border-color: #9aa5b1;
}
.wes-lucky-prize-rank-2 .wes-lucky-prize-rank-badge {
  background: linear-gradient(135deg, #9aa5b1, #6c7a89); color: #fff;
}

/* Rank-3 (Bronze) — physical */
.wes-lucky-prize-rank-3 {
  background: linear-gradient(160deg, #fbece0 0%, #fff 60%);
  border-color: #cd7f32;
}
.wes-lucky-prize-rank-3 .wes-lucky-prize-rank-badge {
  background: linear-gradient(135deg, #cd7f32, #a86423); color: #fff;
}

/* Prize icon */
.wes-lucky-prize-icon {
  width: 96px; height: 96px; margin: 0 auto 16px;
  border-radius: 50%; background: rgba(255,255,255,0.7);
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; line-height: 1;
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
  border: 2px solid rgba(255,255,255,0.9);
}
.wes-lucky-prize-rank-1 .wes-lucky-prize-icon {
  background: linear-gradient(135deg, #fff8dc, #ffe89c);
  border-color: #f5b700;
}
.wes-lucky-prize-rank-2 .wes-lucky-prize-icon {
  background: linear-gradient(135deg, #f4f8fb, #cfd8dc);
}
.wes-lucky-prize-rank-3 .wes-lucky-prize-icon {
  background: linear-gradient(135deg, #fbede0, #e8c4a0);
  border-color: #cd7f32;
}
.wes-lucky-prize-icon img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}
.wes-lucky-prize-shape {
  position: relative;
  display: block;
  width: 54px;
  height: 54px;
}
.wes-lucky-prize-shape-wes {
  width: 42px;
  height: 42px;
  transform: rotate(45deg);
  border-radius: 10px;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  box-shadow: inset -8px -8px 0 rgba(255,255,255,0.18);
}
.wes-lucky-prize-shape-wes::before,
.wes-lucky-prize-shape-wes::after {
  content: "";
  position: absolute;
  background: rgba(255,255,255,0.82);
}
.wes-lucky-prize-shape-wes::before {
  width: 26px;
  height: 4px;
  left: 8px;
  top: 19px;
}
.wes-lucky-prize-shape-wes::after {
  width: 4px;
  height: 26px;
  left: 19px;
  top: 8px;
}
.wes-lucky-prize-shape-voucher {
  width: 56px;
  height: 38px;
  margin-top: 8px;
  border: 3px solid #6c7a89;
  border-radius: 9px;
  background: linear-gradient(135deg, #fff, #dbe4ec);
}
.wes-lucky-prize-shape-voucher::before,
.wes-lucky-prize-shape-voucher::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  height: 3px;
  border-radius: 999px;
  background: #6c7a89;
}
.wes-lucky-prize-shape-voucher::before { top: 11px; }
.wes-lucky-prize-shape-voucher::after { top: 22px; }
.wes-lucky-prize-shape-physical {
  width: 48px;
  height: 42px;
  margin-top: 10px;
  border: 3px solid #a86423;
  border-radius: 7px 7px 10px 10px;
  background: linear-gradient(135deg, #fff6ed, #e8c4a0);
}
.wes-lucky-prize-shape-physical::before {
  content: "";
  position: absolute;
  width: 22px;
  height: 16px;
  left: 10px;
  top: -15px;
  border: 3px solid #a86423;
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
}
.wes-lucky-prize-shape-physical::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: rgba(168,100,35,0.45);
}

/* Prize text */
.wes-lucky-prize-name {
  font-size: 13px; font-weight: 800; color: var(--wes-fg-soft);
  letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 8px;
}
.wes-lucky-prize-value {
  font-size: 28px; font-weight: 800; line-height: 1.1;
  color: var(--wes-fg); margin-bottom: 10px;
}
.wes-lucky-prize-rank-1 .wes-lucky-prize-value { font-size: 32px; color: var(--wes-red); }
.wes-lucky-prize-desc {
  font-size: 12px; color: var(--wes-fg-muted); line-height: 1.55;
  min-height: 36px;
}

/* CTA + How-to bar */
.wes-lucky-cta-bar {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px;
   margin: 0 auto;
  background: var(--wes-card); border: 1px solid var(--wes-border);
  border-radius: 24px; padding: 32px;
}
@media (max-width: 880px) { .wes-lucky-cta-bar { grid-template-columns: 1fr; } }

.wes-lucky-cta-info h3 { font-size: 18px; font-weight: 700; margin: 0 0 16px; }
.wes-lucky-cta-info ul { list-style: none; padding: 0; margin: 0; }
.wes-lucky-cta-info li {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 13px; padding: 8px 0;
  border-bottom: 1px dashed var(--wes-border);
}
.wes-lucky-cta-info li:last-child { border-bottom: 0; }
.wes-lucky-cta-info .num {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%;
  background: var(--wes-red-soft); color: var(--wes-red);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
}

.wes-lucky-cta-action {
  display: flex; flex-direction: column; justify-content: center; gap: 14px;
}
.wes-lucky-cta-action .wes-tokenomics-btn-primary { width: 100%; padding: 16px 28px; font-size: 16px; }
.wes-lucky-note {
  background: var(--wes-red-soft); color: var(--wes-red);
  padding: 12px 16px; border-radius: 12px;
  font-size: 12px; line-height: 1.5; text-align: center;
}
.wes-lucky-note-icon {
  position: relative;
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-right: 7px;
  vertical-align: -2px;
  border: 2px solid currentColor;
  border-radius: 50% 50% 44% 44%;
}
.wes-lucky-note-icon::after {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: -5px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
}

/* ════════════════════════════════════════════════════════════════
 * Phase C — Latest Winners outer slider + cards (2026-05-06)
 * ════════════════════════════════════════════════════════════════ */

/* Outer Swiper — make sure it sizes with content */
.wes-lucky-outer.swiper {
  width: 100%;
  position: relative;
  padding-bottom: 36px; /* room for outer dots */
}
.wes-lucky-outer .swiper-slide {
  height: auto;
}

/* Outer dots — 2 dots (Lucky vs Winners) */
.wes-lucky-outer-dots {
  position: absolute !important;
  bottom: 8px !important;
  left: 50% !important;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  justify-content: center;
  z-index: 6;
}
.wes-lucky-outer-dots .swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  background: rgba(220, 28, 12, 0.25);
  opacity: 1;
  transition: all 0.3s ease;
}
.wes-lucky-outer-dots .swiper-pagination-bullet-active {
  background: var(--wes-red, #DC1C1C);
  width: 26px;
  border-radius: 5px;
}

/* 2 chấm đỏ pulse — visible during 3s teaser */
.wes-lucky-pulse {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 16px auto 0;
  height: 0; /* takes no space when hidden */
  transition: opacity 0.3s ease, height 0.3s ease;
  opacity: 0;
}
.wes-lucky-pulse.is-active {
  opacity: 1;
  height: 18px;
}
.wes-lucky-pulse > span {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--wes-red, #DC1C1C);
  animation: wes-lucky-pulse-anim 0.9s ease-in-out infinite;
}
.wes-lucky-pulse > span:nth-child(2) {
  animation-delay: 0.45s;
}
@keyframes wes-lucky-pulse-anim {
  0%, 100% { transform: scale(1);   opacity: 0.55; box-shadow: 0 0 0 0 rgba(220,28,12,0.50); }
  50%      { transform: scale(1.4); opacity: 1;    box-shadow: 0 0 0 8px rgba(220,28,12,0); }
}

/* ─── Latest Winners section (outer slide 2) ─── */
.latest-winners {
  padding: 24px 16px;
}
.wes-winners-inner.swiper {
  position: relative;
  margin-top: 16px;
  padding: 4px 0 32px; /* room for dots */
}
.wes-winners-inner .swiper-slide {
  height: auto;
}

/* Empty-state placeholder (no winners yet) */
.wes-winner-card--empty {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 24px;
  border: 1px dashed rgba(220,28,12,0.3);
  border-radius: 12px;
  background: rgba(220,28,12,0.04);
  color: #6b7280;
}
.wes-winner-card--empty .wes-winner-icon {
  position: relative;
  flex: 0 0 auto;
  width: 36px;
  height: 32px;
  opacity: 0.7;
  border: 3px solid currentColor;
  border-radius: 7px;
}
.wes-winner-icon--box::before,
.wes-winner-icon--box::after {
  content: "";
  position: absolute;
  background: currentColor;
}
.wes-winner-icon--box::before {
  left: 50%;
  top: -3px;
  bottom: -3px;
  width: 3px;
  transform: translateX(-50%);
}
.wes-winner-icon--box::after {
  left: -3px;
  right: -3px;
  top: 10px;
  height: 3px;
}
.wes-winner-card--empty strong {
  display: block;
  color: var(--wes-red, #DC1C1C);
  font-size: 15px;
  margin-bottom: 4px;
}
.wes-winner-card--empty small {
  font-size: 13px;
  line-height: 1.4;
}
.wes-flow-sep {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin: 0 6px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  vertical-align: 1px;
}

/* Winner card */
.wes-winner-card {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
  height: 100%;
  align-items: flex-start;
}
.wes-winner-avatar {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(220,28,12,0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--wes-red, #DC1C1C);
  font-size: 18px;
}
.wes-winner-avatar--placeholder {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
}
.wes-winner-body {
  flex: 1;
  min-width: 0;
}
.wes-winner-name {
  font-size: 13px;
  margin-bottom: 4px;
}
.wes-winner-name strong {
  font-weight: 700;
  margin-right: 6px;
}
.wes-winner-wallet {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
  color: #6b7280;
}
.wes-winner-message {
  font-size: 13px;
  color: #374151;
  font-style: italic;
  margin: 6px 0;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.wes-winner-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  gap: 10px;
}
.wes-winner-amount {
  font-weight: 800;
  color: var(--wes-red, #DC1C1C);
  font-size: 15px;
}
.wes-winner-date {
  font-size: 11px;
  color: #9ca3af;
}
.wes-winner-label {
  font-size: 11px;
  color: #6b7280;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px dashed #e5e7eb;
}

/* Inner pagination + nav arrows — match WES brand */
.wes-winners-dots .swiper-pagination-bullet {
  background: var(--wes-red, #DC1C1C);
  opacity: 0.3;
  width: 8px;
  height: 8px;
}
.wes-winners-dots .swiper-pagination-bullet-active {
  opacity: 1;
}
.wes-winners-inner .swiper-button-prev,
.wes-winners-inner .swiper-button-next {
  color: var(--wes-red, #DC1C1C);
  --swiper-navigation-size: 22px;
}
@media (max-width: 767px) {
  .wes-winners-inner .swiper-button-prev,
  .wes-winners-inner .swiper-button-next {
    display: none;
  }
}

/* ───────────────────────────────────────────────────────────
 * Phase C v2 — CSS-only reveal of .latest-winners (no outer Swiper)
 *
 * Default state: latest-winners is COLLAPSED (max-height:0 + 0 opacity,
 * translated 40px right). On [data-lucky-root].is-revealed (added by JS
 * after 3s pulse), the panel expands + slides in from the right.
 *
 * Why max-height instead of display:none:
 *   - display:none breaks Swiper inner-init (slide widths = 0)
 *   - max-height collapse keeps DOM in flow but takes 0 vertical space
 *   - Combined with overflow:hidden + opacity:0 → fully invisible
 * ─────────────────────────────────────────────────────────── */
/* ───────────────────────────────────────────────────────────
 * SLIDE SHOW behavior — 2 panels in same grid cell, swap via transform.
 * Slide 1 (lucky-draw) visible by default at translateX(0).
 * Slide 2 (latest-winners) off-screen RIGHT at translateX(100%).
 *
 * On .is-revealed:
 *   Slide 1 slides LEFT (translateX(-100%)) — exits to the left
 *   Slide 2 slides IN from RIGHT (translateX(0))
 * Net effect: slide 2 REPLACES slide 1 from right-to-left, same as Swiper.
 * ─────────────────────────────────────────────────────────── */
/* PAUSED 2026-05-11: latest-winners panel removed from twig; the slide-stack
   architecture (position:absolute panels + JS-driven --stage-h) collapses
   when no JS measurement runs. Reverted to plain document flow so block 1
   (.lucky-draw) renders at its natural height with zero transform risk.
   Re-introduce the absolute-stack rules below when real winners ship. */
.wes-lucky-stage {
  position: relative;
  width: 100%;
}
.wes-lucky-stage > .lucky-draw {
  position: static;
  transform: none !important;
  opacity: 1 !important;
  pointer-events: auto;
}
/* All [data-lucky-root].is-revealed slide-out rules retired together. */

/* ───────────────────────────────────────────────────────────
 * v1.4 fixes:
 *  (a) Inner cards FALLBACK horizontal layout — even if Swiper hasn't
 *      initialised yet, swiper-wrapper renders as flex row with overflow-x.
 *      Once Swiper inits, it overrides via JS-applied transforms — the
 *      flex layout is harmless and Swiper takes over cleanly.
 *  (b) Pulse — explicit positioning + min-height so 2 dots always show
 *      when .is-active class added. No layout collapse.
 * ─────────────────────────────────────────────────────────── */

/* (a) Cards horizontal — pre-Swiper fallback */
.wes-winners-inner .swiper-wrapper {
  display: flex;
  flex-direction: row;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.wes-winners-inner .swiper-slide {
  flex: 0 0 auto;
  scroll-snap-align: start;
  width: calc(33.333% - 12px);  /* laptop: 3 visible */
}
@media (max-width: 767px) {
  .wes-winners-inner .swiper-slide {
    width: 88%;                 /* mobile: 1 visible (with peek of next) */
  }
}
/* When Swiper inits, it adds class swiper-initialized — let Swiper drive layout */
.wes-winners-inner.swiper-initialized .swiper-wrapper {
  overflow-x: visible;          /* Swiper handles overflow on container */
  scroll-snap-type: none;
  gap: 0;                       /* Swiper uses spaceBetween instead */
}
.wes-winners-inner.swiper-initialized .swiper-slide {
  width: auto;                  /* Swiper sets via JS */
}

/* (b) Pulse — always visible when .is-active, prominent placement */
.wes-lucky-pulse {
  position: relative;
  display: flex !important;     /* override earlier display behavior */
  justify-content: center;
  gap: 16px;
  margin: 24px auto 0;
  min-height: 24px;             /* always reserve space */
  height: 24px;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.wes-lucky-pulse.is-active {
  opacity: 1;
}
.wes-lucky-pulse > span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--wes-red, #DC1C1C);
  box-shadow: 0 0 0 0 rgba(220,28,12,0.55);
  animation: wes-lucky-pulse-anim 0.9s ease-in-out infinite;
}
.wes-lucky-pulse > span:nth-child(2) { animation-delay: 0.45s; }

/* ───────────────────────────────────────────────────────────
 * v1.5 — 2 chấm đỏ are PERMANENT carousel dots (not vanishing pulse).
 *
 * Initial state: dot 1 active (red), dot 2 inactive (pale red). Both visible.
 * During 3s teaser (.is-active): both dots PULSE animate (attention-grab).
 * After teaser: pulse stops, dots stay clickable to toggle slides.
 * On .is-revealed: dot 1 inactive, dot 2 active (sync with current slide).
 * ─────────────────────────────────────────────────────────── */

/* Override earlier pulse rules — make dots ALWAYS visible */
.wes-lucky-pulse {
  display: flex !important;
  justify-content: center;
  gap: 16px;
  margin: 24px auto 16px;
  height: auto !important;          /* override min-height collapse */
  min-height: 24px;
  opacity: 1 !important;             /* always show */
  transition: none;
  pointer-events: auto;
}

/* Each dot is now a button — reset native styles */
.wes-lucky-pulse > button {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  background: transparent;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  position: relative;
  outline-offset: 4px;
}

/* Dot visual — pseudo element so we can pulse the inner */
.wes-lucky-pulse > button::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(220, 28, 12, 0.25);   /* inactive — pale */
  transition: background 0.3s ease, transform 0.3s ease;
}
.wes-lucky-pulse > button.is-active::after {
  background: var(--wes-red, #DC1C1C);   /* active — full red */
  transform: scale(1.15);
}

/* Pulse animation — only during 3s teaser (.wes-lucky-pulse.is-active) */
.wes-lucky-pulse.is-active > button::after {
  animation: wes-lucky-pulse-anim 0.9s ease-in-out infinite;
}
.wes-lucky-pulse.is-active > button:nth-child(2)::after {
  animation-delay: 0.45s;
}

/* Hover state for clickable dots */
.wes-lucky-pulse > button:hover::after {
  background: var(--wes-red, #DC1C1C);
  opacity: 0.6;
}
.wes-lucky-pulse > button.is-active:hover::after {
  opacity: 1;
}
