/* Minerals wallet — cash-out-only prize-winnings UI.
   Crystalline-blue accent (distinct from vespene's green) so the two currencies
   read as different. Namespaced --min-* + mw-* to avoid bleeding into other UI. */

/* Inline SC2 resource icons (mineral crystal / vespene orb) — align with text. */
.res-ico { display: inline-block; vertical-align: -0.18em; flex: 0 0 auto; }

:root {
  --min-accent: #4cc9ff;
  --min-accent-hover: #6fd6ff;
  --min-accent-ink: #04131c;
  --min-accent-soft: rgba(76, 201, 255, 0.12);
  --min-accent-line: rgba(76, 201, 255, 0.42);
}

/* Header button + balance pill (mirrors the vespene donate button). */
.minerals-wallet-btn { position: relative; }
.minerals-wallet-btn[hidden],
.minerals-balance-badge[hidden] { display: none !important; }
.minerals-wallet-btn svg { color: var(--min-accent); }
.minerals-wallet-btn:hover svg { color: var(--min-accent-hover); }
.minerals-balance-badge {
  position: absolute; bottom: -2px; right: -4px;
  min-width: 16px; padding: 0 5px; height: 15px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; line-height: 1; border-radius: 8px;
  background: var(--min-accent); color: var(--min-accent-ink);
  box-shadow: 0 0 0 2px var(--color-bg, #0b1220); pointer-events: none;
}

/* ── Wallet modal (self-contained; works outside the tournament artboard) ── */
.mw-backdrop {
  position: fixed; inset: 0; z-index: 1200;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.mw-scrim { position: absolute; inset: 0; background: rgba(3, 6, 11, 0.66); backdrop-filter: blur(2px); }
.mw-card {
  position: relative; width: 100%; max-width: 440px; max-height: 90vh; overflow: auto;
  background: var(--color-bg-elevated, #11161f); color: var(--color-text, #e6e9ef);
  border: 1px solid var(--min-accent-line); border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--min-accent-soft);
}
.mw-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.mw-head h3 { margin: 0; font-size: 16px; font-weight: 700; }
.mw-close {
  background: none; border: none; color: var(--color-text-muted, #93a1b5);
  font-size: 26px; line-height: 1; cursor: pointer; padding: 0 4px;
}
.mw-close:hover { color: var(--color-text, #e6e9ef); }
.mw-body { padding: 18px; }
.mw-loading, .mw-err { text-align: center; color: var(--color-text-muted, #93a1b5); padding: 24px 4px; }

.mw-bal { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-bottom: 8px; }
.mw-bal-amt { font-size: 34px; font-weight: 800; color: var(--min-accent); text-shadow: 0 0 18px var(--min-accent-soft); }
.mw-bal-usd { font-size: 12px; font-weight: 700; color: var(--color-text-muted, #93a1b5); }
.mw-note { font-size: 12.5px; color: var(--color-text-muted, #93a1b5); text-align: center; line-height: 1.5; margin: 0 0 16px; }
.mw-note strong { color: var(--min-accent); }
.mw-sub { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-text-muted, #93a1b5); margin-bottom: 8px; }

.mw-acct {
  background: var(--min-accent-soft); border: 1px solid var(--min-accent-line);
  border-radius: 10px; padding: 12px; margin-bottom: 16px; font-size: 13px;
}
.mw-acct-ok { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mw-acct-ok strong { color: var(--min-accent); }
.mw-acct-title { font-weight: 600; margin-bottom: 10px; }
.mw-acct-actions { display: flex; flex-direction: column; gap: 8px; }
.mw-or { text-align: center; font-size: 11px; color: var(--color-text-muted, #93a1b5); }
.mw-paypal { display: flex; gap: 6px; }
.mw-paypal .mw-input { flex: 1; }
.mw-acct-note { font-size: 11.5px; color: var(--color-text-muted, #93a1b5); margin-top: 8px; }

.mw-input {
  background: var(--color-bg, #0b1220); color: var(--color-text, #e6e9ef);
  border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 8px;
  padding: 9px 11px; font-size: 14px; width: 100%;
}
.mw-input:focus { outline: none; border-color: var(--min-accent); }
.mw-input:disabled { opacity: 0.5; }

.mw-btn {
  border: 1px solid rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.05);
  color: var(--color-text, #e6e9ef); border-radius: 8px; padding: 9px 14px;
  font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.mw-btn:hover:not(:disabled) { border-color: var(--min-accent); }
.mw-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.mw-btn-primary, .mw-btn-stripe {
  background: var(--min-accent); color: var(--min-accent-ink); border-color: var(--min-accent);
}
.mw-btn-primary:hover:not(:disabled), .mw-btn-stripe:hover:not(:disabled) { background: var(--min-accent-hover); }
.mw-link { background: none; border: none; color: var(--min-accent); cursor: pointer; font-size: 12px; padding: 0; }
.mw-link:hover { text-decoration: underline; }

.mw-withdraw { margin-bottom: 16px; }
.mw-wd-row { display: flex; gap: 8px; }
.mw-wd-row .mw-input { flex: 1; }
.mw-wd-hint { font-size: 11.5px; color: var(--color-text-muted, #93a1b5); margin-top: 6px; }
.mw-err { color: #ef6a6a; font-size: 12.5px; margin-top: 8px; }
.mw-err:empty { display: none; }

.mw-hist { border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 14px; }
.mw-hist-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 13px; }
.mw-hist-amt { font-weight: 700; min-width: 64px; }
.mw-hist-prov { color: var(--color-text-muted, #93a1b5); text-transform: capitalize; flex: 1; }
.mw-pill {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 2px 7px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); color: var(--color-text-muted, #93a1b5);
}
.mw-pill-paid { background: rgba(74, 222, 128, 0.14); color: #4ade80; }
.mw-pill-requested, .mw-pill-approved, .mw-pill-processing { background: rgba(76, 201, 255, 0.14); color: var(--min-accent); }
.mw-pill-rejected, .mw-pill-failed, .mw-pill-cancelled { background: rgba(239, 68, 68, 0.14); color: #ef6a6a; }

@media (max-width: 767px) {
  .mw-card { max-width: none; max-height: 100vh; height: 100%; border-radius: 0; }
  .mw-paypal { flex-direction: column; }
}

/* ── Admin cash-out review (admin-minerals.js) ── */
.admin-minerals-list { display: flex; flex-direction: column; gap: 8px; }
.admin-minerals-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 8px;
  flex-wrap: wrap;
}
.admin-minerals-who strong { font-size: 13.5px; }
.admin-minerals-meta { display: block; font-size: 11.5px; color: var(--color-text-muted, #93a1b5); text-transform: capitalize; }
.admin-minerals-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-minerals-reject { color: #ef6a6a; }
