/* /airdrop/claim.css — claim portal styles. desktop + mobile. */
:root {
  --ad-bg: #0d0e14;
  --ad-card: #16181f;
  --ad-card-2: #1f2229;
  --ad-text: #ececf1;
  --ad-muted: #9aa0ab;
  --ad-gold: #ffc83d;
  --ad-gold-deep: #b8860b;
  --ad-red: #d22020;
  --ad-ok: #36c46e;
  --ad-warn: #f5b14a;
  --ad-err: #ef4f4f;
}
* { box-sizing: border-box; }
body[data-page="airdrop"] {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--ad-bg);
  color: var(--ad-text);
  min-height: 100vh;
  line-height: 1.5;
}
.test-banner {
  background: #2a1f00;
  color: var(--ad-warn);
  text-align: center;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid #3a2a00;
  font-size: 13px;
}
.test-banner code { background: #00000044; padding: 1px 6px; border-radius: 3px; }
.ad-header {
  text-align: center;
  padding: 2rem 1rem 1rem;
}
.ad-back {
  display: inline-block;
  color: var(--ad-muted);
  text-decoration: none;
  font-size: 13px;
  margin-bottom: 1rem;
}
.ad-back:hover { color: var(--ad-gold); }
.ad-header h1 {
  margin: 0 0 0.3rem;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: var(--ad-gold);
}
.ad-sub { margin: 0; color: var(--ad-muted); font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; }

.ad-main { max-width: 720px; margin: 0 auto; padding: 1rem; }
.ad-steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.ad-step {
  background: var(--ad-card);
  border: 1px solid #2a2c34;
  border-radius: 10px;
  padding: 1.2rem 1.2rem;
  opacity: 0.55;
  transition: opacity 0.2s ease;
}
.ad-step.active { opacity: 1; border-color: var(--ad-gold-deep); }
.ad-step.done { opacity: 1; border-color: var(--ad-ok); }
.ad-step h2 { margin: 0 0 0.4rem; font-size: 1.1rem; display: flex; align-items: center; gap: 0.6rem; }
.ad-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--ad-card-2);
  color: var(--ad-gold);
  font-size: 13px;
  font-weight: 700;
}
.ad-step.done .ad-num { background: var(--ad-ok); color: #fff; }
.ad-step p { margin: 0.4rem 0 0.8rem; color: var(--ad-muted); font-size: 14px; }
.ad-step p a, .ad-step a:not(.ad-btn) {
  color: var(--ad-gold);
  text-decoration: underline;
  text-decoration-color: rgba(255, 200, 61, 0.4);
  text-underline-offset: 2px;
}
.ad-step p a:hover, .ad-step a:not(.ad-btn):hover {
  color: #fff;
  text-decoration-color: var(--ad-gold);
}

.ad-btn {
  appearance: none;
  border: none;
  border-radius: 6px;
  padding: 0.7rem 1.2rem;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
}
.ad-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.ad-btn-primary { background: var(--ad-gold); color: #1a1206; }
.ad-btn-primary:hover:not(:disabled) { background: #ffd66a; }
/* 2026-05-26 cycle-15: visual de-emphasis for the optional "skip TG"
   escape hatch. Outline rather than fill so the gold primary buttons
   keep their action priority. Jay UX rule-17 sign-off HIGH-1 fix. */
.ad-btn-ghost {
  background: transparent;
  color: var(--ad-gold);
  border: 1px solid var(--ad-gold-deep);
}
.ad-btn-ghost:hover:not(:disabled) {
  background: rgba(255, 200, 61, 0.10);
  color: #fff;
}
.ad-btn-ghost:disabled {
  border-color: #2a2c34;
  color: var(--ad-muted);
}

/* Spacing for the optional "skip Telegram verification" path (Step 2).
   The caveat callout sits above the button (better reading order — user
   reads the consequence before clicking), with breathing room from the
   verify-code row above. Jay UX rule-17 MED-3/MED-4 fix. */
.ad-skip-callout { margin-top: 1rem; }
.ad-skip-row { margin-top: 0.4rem; }

/* Row layout for input + button on the same line (TG handle + send code,
   TG code + verify). Wraps to a column on narrow screens. */
.ad-row {
  display: flex;
  gap: 0.6rem;
  align-items: stretch;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.ad-row > .ad-input { flex: 1 1 220px; min-width: 0; }
.ad-row > .ad-btn { flex: 0 0 auto; }

.ad-input {
  appearance: none;
  background: var(--ad-card-2);
  color: var(--ad-text);
  border: 1px solid #2a2c34;
  border-radius: 6px;
  padding: 0.7rem 0.9rem;
  font-size: 15px;
  font-family: inherit;
  width: 100%;
}
.ad-input:focus {
  outline: none;
  border-color: var(--ad-gold-deep);
  box-shadow: 0 0 0 2px rgba(255, 200, 61, 0.25);
}
.ad-input:disabled { opacity: 0.45; cursor: not-allowed; }
.ad-input::placeholder { color: var(--ad-muted); opacity: 0.6; }
#tg-code { letter-spacing: 0.4em; text-align: center; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }

.ad-result {
  margin-top: 0.8rem;
  font-size: 13px;
  background: var(--ad-card-2);
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  border-left: 3px solid var(--ad-muted);
  word-break: break-all;
  /* preserve newlines from server messages + renderClaimReady so the
     multi-line Streamflow handoff renders as a readable list, not a
     run-on paragraph. Combined with word-break:break-all above, long
     base58 strings still wrap on 320px viewports. (Jay UX 2026-05-14) */
  white-space: pre-wrap;
}
.ad-result.ok { border-left-color: var(--ad-ok); }
.ad-result.warn { border-left-color: var(--ad-warn); }
.ad-result.err {
  border-left-color: var(--ad-err);
  /* Lighter red passes WCAG AA 4.5:1 on the panel background (#1f2229).
     The saturated --ad-err still leads via the left border + emphasis tokens. */
  color: #ff8a8a;
}
.ad-result.err strong,
.ad-result.err code { color: var(--ad-err); }

/* 2026-05-14 Jay UX (B1 + N4): interactive state-C render inside .ad-result.
   The state-C panel switches to structured HTML with copy-buttons + a
   clickable Streamflow link. Address rows are monospaced; the headline +
   prose stay in the body sans-serif so the panel doesn't read like a
   console dump. State A/B still use textContent + pre-wrap above. */
.ad-result .ad-claim-headline {
  margin: 0 0 0.4rem;
  font-size: 14px;
  font-weight: 600;
  color: var(--ad-text);
}
.ad-result .ad-claim-amount { margin: 0 0 0.6rem; font-size: 13px; }
.ad-result .ad-claim-amount strong { color: var(--ad-gold); }
.ad-result .ad-claim-addrs {
  margin: 0 0 0.8rem;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.2rem 0.6rem;
  font-size: 12.5px;
}
.ad-result .ad-claim-addrs dt {
  color: var(--ad-muted);
  align-self: center;
}
.ad-result .ad-claim-addrs dd {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.ad-result .ad-addr {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  word-break: break-all;
  color: var(--ad-text);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 12px;
}
.ad-result .ad-copy {
  flex-shrink: 0;
  font-size: 11px;
  padding: 0.15rem 0.5rem;
  background: rgba(255, 200, 61, 0.12);
  color: var(--ad-gold);
  border: 1px solid rgba(255, 200, 61, 0.3);
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
}
.ad-result .ad-copy:hover { background: rgba(255, 200, 61, 0.22); }
.ad-result .ad-claim-next { margin: 0.4rem 0 0.3rem; font-weight: 600; color: var(--ad-text); }
.ad-result .ad-claim-steps {
  margin: 0 0 0.6rem;
  padding-left: 1.3rem;
  font-size: 13px;
  color: var(--ad-text);
}
.ad-result .ad-claim-steps li { margin: 0.15rem 0; }
.ad-result .ad-claim-steps a {
  color: var(--ad-gold);
  text-decoration: underline;
  text-decoration-color: rgba(255, 200, 61, 0.5);
  text-underline-offset: 2px;
}
.ad-result .ad-claim-steps a:hover { color: #fff; text-decoration-color: var(--ad-gold); }
/* LB-6: in-page Claim controls. The wallet-row holds 1-N Connect
   buttons (Phantom / Solflare / Backpack), each styled as a primary
   action. The ad-claim-status div lives below and changes copy / kind
   as the user moves through connect → sign → confirm. */
.ad-result .ad-claim-wallet-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.4rem 0 0.6rem;
}
.ad-result .ad-claim-connect {
  flex: 0 0 auto;
}
.ad-result .ad-claim-status {
  /* LB-6 Jay UX HIGH-4: reserve vertical space so the status div going
     from "idle placeholder" → "opening Phantom…" → success doesn't
     reflow the layout and steal the user's tap target (CLS guard). */
  min-height: 2.4rem;
  margin: 0.4rem 0 0.6rem;
  padding: 0.5rem 0.7rem;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.5;
}
.ad-result .ad-claim-status[hidden] { display: none; }
/* LB-6 Jay UX HIGH-4: idle / placeholder copy uses the muted token so
   it visually recedes vs. the gold primary button above it. */
.ad-result .ad-claim-status.ad-claim-status-idle {
  background: rgba(255, 255, 255, 0.02);
  color: var(--ad-muted);
  font-style: italic;
}
/* LB-6 Jay UX HIGH-5: while we're waiting on the wallet popup / chain
   confirmation, pulse the border so the user has a clear "still
   working" signal. Falls back to a static border for users who set
   prefers-reduced-motion. */
.ad-result .ad-claim-status.ad-claim-status-busy {
  border: 1px solid rgba(255, 200, 61, 0.5);
  animation: ad-claim-status-pulse 1.6s ease-in-out infinite;
}
@keyframes ad-claim-status-pulse {
  0%, 100% { border-color: rgba(255, 200, 61, 0.2); }
  50%      { border-color: rgba(255, 200, 61, 0.8); }
}
@media (prefers-reduced-motion: reduce) {
  .ad-result .ad-claim-status.ad-claim-status-busy {
    animation: none;
    border-color: rgba(255, 200, 61, 0.6);
  }
}
/* LB-6 Jay UX MED-11: when claim panel renders into the quickcheck
   slot, lead with a short reassurance line so the user knows the
   numbered steps below no longer apply to them. */
.ad-result .ad-claim-skip-steps {
  margin: 0.2rem 0 0.6rem;
  padding: 0.4rem 0.7rem;
  background: rgba(80, 200, 120, 0.08);
  border-left: 3px solid #5cc88b;
  border-radius: 4px;
  font-size: 13px;
  color: var(--ad-text);
}
/* LB-6 Jay UX MED-10 / NIT-15: text-style secondary button used for
   "or use Solflare / Backpack" when multiple wallets are detected.
   Keeps the visual hierarchy clear (one primary gold CTA + secondaries). */
.ad-result .ad-btn-link {
  background: transparent;
  color: var(--ad-muted);
  border: none;
  padding: 0.45rem 0.4rem;
  font-size: 13px;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.25);
  text-underline-offset: 2px;
  cursor: pointer;
}
.ad-result .ad-btn-link:hover {
  color: var(--ad-text);
  text-decoration-color: var(--ad-gold);
}
.ad-result .ad-btn-link:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
/* LB-6 Jay UX MED-12: mobile-browser hint that sits inline under the
   no-wallet copy so phantom-on-phone users know they need the wallet's
   in-app browser (regular Safari / Chrome on mobile cannot inject the
   window.solana provider that desktop extensions provide). */
.ad-result .ad-claim-no-wallet-mobile {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 12.5px;
  color: var(--ad-muted);
}
.ad-result .ad-claim-no-wallet {
  margin: 0.3rem 0 0.6rem;
  padding: 0.5rem 0.7rem;
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid var(--ad-gold);
  border-radius: 4px;
  font-size: 13px;
  color: var(--ad-text);
}
.ad-result .ad-claim-no-wallet a {
  color: var(--ad-gold);
  text-decoration: underline;
  text-decoration-color: rgba(255, 200, 61, 0.5);
  text-underline-offset: 2px;
}
.ad-result .ad-claim-no-wallet a:hover { color: #fff; text-decoration-color: var(--ad-gold); }
.ad-result .ad-claim-fee,
.ad-result .ad-claim-help {
  margin: 0.3rem 0;
  font-size: 12.5px;
  color: var(--ad-muted);
}
.ad-result .ad-proof-meta {
  margin-top: 0.6rem;
  padding: 0.4rem 0.6rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 4px;
  font-size: 12px;
}
.ad-result .ad-proof-meta summary {
  cursor: pointer;
  color: var(--ad-muted);
  font-size: 12px;
}
.ad-result .ad-proof-meta dl {
  margin: 0.4rem 0 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.15rem 0.6rem;
}
.ad-result .ad-proof-meta dt { color: var(--ad-muted); }
.ad-result .ad-proof-meta dd { margin: 0; color: var(--ad-text); word-break: break-all; }

.ad-callout {
  margin-top: 0.6rem !important;
  padding: 0.6rem 0.8rem;
  background: rgba(255, 200, 61, 0.08);
  border-left: 3px solid var(--ad-gold-deep);
  border-radius: 6px;
  font-size: 13px !important;
  color: var(--ad-text) !important;
}
.ad-callout strong { color: var(--ad-gold); }
.ad-callout a {
  color: var(--ad-gold);
  text-decoration: underline;
  text-decoration-color: rgba(255, 200, 61, 0.5);
  text-underline-offset: 2px;
}
.ad-callout a:hover { color: #fff; text-decoration-color: var(--ad-gold); }

/* Quick-path / cohort-B entry point. Visually distinct from the numbered
   steps below so wallet-only claimants know they can skip ahead.
   Dimmer/dashed border (Jay UX 2026-05-14 N6) so it reads as a prelude
   rather than competing with the gold-solid `.ad-step.active`. */
.ad-quickcheck {
  background: var(--ad-card);
  border: 1px dashed rgba(255, 200, 61, 0.35);
  border-radius: 10px;
  padding: 1.2rem;
  margin-bottom: 1.6rem;
}
.ad-quickcheck h2 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  color: var(--ad-gold);
  letter-spacing: 0.02em;
}
.ad-quickcheck p { margin: 0.4rem 0 0.8rem; color: var(--ad-muted); font-size: 14px; }
.ad-quickcheck .ad-callout { font-size: 12.5px !important; }

.ad-faq { margin-top: 2.4rem; }
.ad-faq h3 { color: var(--ad-gold); border-bottom: 1px solid #2a2c34; padding-bottom: 0.4rem; }
.ad-faq details { margin: 0.6rem 0; padding: 0.6rem 0.8rem; background: var(--ad-card); border-radius: 6px; }
.ad-faq summary { cursor: pointer; font-weight: 600; color: var(--ad-text); }
.ad-faq summary::-webkit-details-marker { color: var(--ad-gold); }
.ad-faq p { margin: 0.5rem 0 0; color: var(--ad-muted); font-size: 14px; }

.ad-footer { text-align: center; padding: 2rem 1rem 3rem; color: var(--ad-muted); font-size: 13px; }
.ad-footer a { color: var(--ad-muted); text-decoration: none; }
.ad-footer a:hover { color: var(--ad-gold); }

@media (max-width: 480px) {
  .ad-step { padding: 1rem; }
  .ad-step h2 { font-size: 1rem; }
  .ad-btn { width: 100%; }
  /* Slight callout font bump on mobile for readability at 320px (Jay UX 2026-05-14). */
  .ad-quickcheck .ad-callout { font-size: 13px !important; }
}
