/* Wuxian Capital Webinar (webinar.html). Builds on css/styles.css (same look as the VIP page);
   only the parts that page doesn't have: event facts, countdown, Clean Carry, color picker,
   status page, ticket bar. */

/* ---------- Event card (left of the offer) ---------- */
.wb-event { padding: 28px; gap: 22px; align-self: stretch; justify-content: space-between; }
.wb-event .intro-head { display: flex; justify-content: space-between; gap: 12px; }
.wb-facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.wb-facts div { padding: 14px 16px; border-radius: var(--radius-md); background: var(--bg); border: 1px solid var(--line); min-width: 0; }
.wb-facts dt { font: 500 12px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.wb-facts dd { margin: 4px 0 0; font: 700 19px/1.25 var(--head); color: var(--text); overflow-wrap: anywhere; }
.wb-facts-sm { grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
.wb-facts-sm dd { font-size: 16px; }

.wb-countdown { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: var(--radius-md); border: 1px solid var(--accent-dim); background: linear-gradient(160deg, rgba(76, 141, 255, 0.12), rgba(76, 141, 255, 0.02) 70%); }
.wb-cd-units { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.wb-cd-units div { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); }
.wb-cd-units b { font: 800 clamp(26px, 4vw, 36px)/1 var(--head); color: var(--text); font-variant-numeric: tabular-nums; }
.wb-cd-units span { font: 500 11px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.wb-countdown.is-closed .wb-cd-units { display: none; }
.wb-countdown.is-closed [data-cd-label] { color: var(--text-soft); font-size: 15px; }

/* Buttons once registration has closed */
.btn.is-closed { background: var(--surface-2); color: var(--muted); pointer-events: none; box-shadow: none; }
.final .btn.is-closed { background: rgba(5, 7, 13, 0.55); color: #C6CAD2; }

/* ---------- Clean Carry ---------- */
.wb-sub { color: var(--text-body); max-width: 40em; font-size: 18px; }
.wb-product { margin: 0; padding: 10px 10px 16px; display: flex; flex-direction: column; gap: 12px; }
.wb-product-img { display: block; width: 100%; padding: 0; border: 0; background: #0A1022; border-radius: 10px; overflow: hidden; cursor: zoom-in; transition: transform 0.15s ease; }
.wb-product-img:hover { transform: translateY(-2px); }
.wb-product-img:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wb-product-img img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; }
.wb-product figcaption { display: flex; flex-direction: column; gap: 2px; padding: 0 6px; }
.wb-product figcaption strong { font: 700 18px var(--head); color: var(--text); }
.wb-product figcaption span { font-size: 14px; color: var(--muted); }
.wb-eta { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: var(--radius-md); border: 1px solid var(--accent-dim); background: var(--accent-soft); color: var(--text-body); font-size: 15px; }
.wb-eta svg { flex: none; color: var(--accent-lt); margin-top: 2px; }
.wb-eta strong { color: var(--text); font-weight: 600; }
.wb-eta-sm { font-size: 14px; padding: 12px 14px; }

/* ---------- Registration pop-up ---------- */
.wb-progress { list-style: none; margin: -8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.wb-progress li { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--muted); }
.wb-progress li::before { content: ""; height: 4px; border-radius: 4px; background: var(--line-strong); }
.wb-progress li.is-on { color: var(--text); }
.wb-progress li.is-on::before { background: var(--accent); }
.wb-progress li.is-done::before { background: var(--accent-dim); }
.waitlist .hint { line-height: 1.5; }
.wb-hint-tight { margin: -4px 0 12px; }
.wb-address { gap: 16px; }
.waitlist fieldset[aria-invalid="true"] .wb-sw, .waitlist fieldset[aria-invalid="true"] .wb-pick { border-color: #FF8A7A; }

.wb-swatches { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.wb-sw {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 12px 4px 10px;
  border: 1px solid var(--line-strong); border-radius: 12px; background: var(--bg); color: var(--text-soft);
  font: 500 13px var(--font); cursor: pointer; transition: border-color 0.15s, transform 0.1s;
}
.wb-sw:hover:not(:disabled) { border-color: var(--accent); }
.wb-sw:active:not(:disabled) { transform: scale(0.97); }
.wb-sw:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wb-sw:disabled { opacity: 0.45; cursor: not-allowed; }
.wb-sw i, .wb-pick i { width: 30px; height: 30px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2); }
.wb-sw b { position: absolute; top: 5px; right: 5px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--bg); font: 700 11.5px/20px var(--head); }
.wb-sw b:empty { display: none; }
.wb-picks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.wb-pick { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 48px; padding: 8px 10px; border: 1px dashed var(--line-strong); border-radius: 12px; color: var(--muted); font-size: 14px; }
.wb-pick i { width: 22px; height: 22px; flex: none; background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.wb-pick span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-pick.is-set { border-style: solid; border-color: var(--accent-dim); background: var(--surface-2); color: var(--text); }
.wb-pick.is-set i { background: var(--c); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2); }
.wb-pick button { flex: none; width: 26px; height: 26px; border: 0; border-radius: 50%; background: var(--line-strong); color: var(--text); font-size: 16px; line-height: 1; cursor: pointer; }
.wb-pick button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wb-ref input { font-family: var(--mono); letter-spacing: 0.02em; }
.wb-ref label { font-size: 15px; }
.qr-frame img[src=""], .qr-frame img:not([src]) { visibility: hidden; }

/* ---------- Status page (?t=) ---------- */
.wb-status { max-width: 760px; padding-top: 40px; padding-bottom: 96px; display: flex; flex-direction: column; gap: 20px; }
.wb-status-card { padding: clamp(26px, 5vw, 44px); border-radius: var(--radius-lg); display: flex; flex-direction: column; gap: 20px; }
.wb-status-card .gate-title { margin-bottom: 12px; }
.wb-status-card [data-st-error] { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.wb-st { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; }
.wb-st h1 { font-size: clamp(30px, 5vw, 44px); line-height: 1.1; letter-spacing: -0.03em; }
.wb-st-sub { color: var(--text-body); max-width: 34em; }
.wb-st-icon { width: 72px; height: 72px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.wb-st-icon.is-wait { color: #F5B544; background: rgba(245, 181, 68, 0.12); border: 1px solid rgba(245, 181, 68, 0.5); animation: wb-pulse 1.8s ease-in-out infinite; }
.wb-st-icon.is-ok { color: #3DD68C; background: rgba(61, 214, 140, 0.12); border: 1px solid rgba(61, 214, 140, 0.5); }
@keyframes wb-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(245, 181, 68, 0.3); } 50% { box-shadow: 0 0 0 12px rgba(245, 181, 68, 0); } }
.wb-st .eyebrow.is-wait { color: #F5B544; }
.wb-st .eyebrow.is-ok { color: #3DD68C; }
.wb-st-pay { width: 100%; text-align: left; padding: 22px; border-radius: var(--radius-lg); border: 1px solid var(--accent-dim); background: var(--bg); }
.wb-discord { width: 100%; display: flex; align-items: center; gap: 18px; text-align: left; padding: 20px; border-radius: var(--radius-lg); border: 1px solid; }
.wb-discord.is-locked { background: rgba(245, 181, 68, 0.06); border-color: rgba(245, 181, 68, 0.4); }
.wb-discord.is-open { background: rgba(88, 101, 242, 0.12); border-color: rgba(88, 101, 242, 0.6); }
.wb-discord > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.wb-discord h2 { font-size: 19px; letter-spacing: -0.01em; line-height: 1.25; }
.wb-discord p { font-size: 15px; color: var(--text-body); }
.wb-discord-ico { flex: none; width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; }
.wb-discord.is-locked .wb-discord-ico { background: rgba(245, 181, 68, 0.15); color: #F5B544; }
.wb-discord.is-open .wb-discord-ico { background: #5865F2; color: #fff; }
.wb-discord-btn { flex: none; white-space: nowrap; }
.wb-discord.is-open .wb-discord-btn { background: #5865F2; color: #fff; }
.wb-discord.is-locked .wb-discord-btn { border: 1px dashed var(--dash); color: var(--muted); cursor: not-allowed; pointer-events: none; }
.wb-next { width: 100%; text-align: left; padding: 22px; border-radius: var(--radius-lg); background: var(--surface-2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.wb-next ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; counter-reset: n; }
.wb-next li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 14px; counter-increment: n; }
.wb-next li::before { content: counter(n); width: 30px; height: 30px; border-radius: 50%; background: var(--accent-dim); color: var(--text); display: flex; align-items: center; justify-content: center; font: 700 13px var(--head); }
.wb-next li.is-done::before { content: "✓"; background: rgba(61, 214, 140, 0.18); color: #3DD68C; }
.wb-next li > div { display: flex; flex-direction: column; gap: 2px; }
.wb-next strong { color: var(--text); font-weight: 600; font-size: 16px; }
.wb-next span { color: var(--text-body); font-size: 15px; }
.wb-seeyou { font: 700 22px var(--head); color: var(--accent-lt); }
.wb-cal { gap: 8px; }
.wb-mentorship { padding: clamp(26px, 5vw, 40px); border-radius: var(--radius-lg); display: flex; flex-direction: column; gap: 14px; align-items: flex-start; border-color: var(--accent-dim); background: linear-gradient(160deg, rgba(26, 59, 120, 0.55), rgba(11, 17, 30, 0.72) 70%); }
.wb-mentorship h2 { font-size: clamp(24px, 3.4vw, 32px); }
.wb-mentorship p { color: var(--text-body); max-width: 36em; }

/* ---------- Phone ticket bar ---------- */
.wb-ticket-bar { display: none; }
@media (max-width: 760px) {
  .wb-ticket-bar {
    position: fixed; z-index: 20; left: 0; right: 0; bottom: 0;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px max(16px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    background: rgba(5, 7, 13, 0.94); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line-strong); transform: translateY(110%); visibility: hidden; transition: transform 0.2s ease, visibility 0.2s;
  }
  .wb-ticket-bar.is-shown { transform: none; visibility: visible; }
  .wb-ticket-bar div { display: flex; flex-direction: column; line-height: 1.2; }
  .wb-ticket-bar strong { font: 800 20px var(--head); }
  .wb-ticket-bar small { font-size: 12.5px; color: var(--muted); }
  body.wb footer { padding-bottom: 76px; }
}

@media (max-width: 800px) {
  .wb-products { grid-template-columns: minmax(0, 1fr); }
  .wb-product-img img { aspect-ratio: 4 / 3; object-position: center 40%; }
}
@media (max-width: 560px) {
  .wb-event { padding: 20px; }
  .wb-facts dd { font-size: 16px; }
  .wb-facts-sm { grid-template-columns: minmax(0, 1fr); }
  .wb-facts-sm div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
  .wb-facts-sm dd { margin: 0; }
  .wb-swatches { gap: 6px; }
  .wb-sw { padding: 10px 2px 8px; font-size: 11.5px; }
  .wb-sw i { width: 26px; height: 26px; }
  .wb-picks { grid-template-columns: minmax(0, 1fr); }
  .wb-progress li { font-size: 11.5px; }
  .wb-discord { flex-direction: column; align-items: flex-start; }
  .wb-discord-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .wb-st-icon.is-wait { animation: none; } .wb-ticket-bar { transition: none; } }
