/* The player's bonus pages (docs/BONUS-ARCHITECTURE.md §9). Uses the site's
   theme tokens so Dark, Grey and Light follow the player's appearance. */
.bonus-page { --bonus-accent: var(--accent); display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; padding-bottom: 48px; }
.bonus-page > * { min-width: 0; }
.bonus-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; position: relative; overflow: hidden; padding: clamp(20px, 4vw, 40px); border: 1px solid color-mix(in srgb, var(--bonus-accent) 28%, var(--line)); border-radius: 24px; background: radial-gradient(circle at 86% 30%, color-mix(in srgb, var(--bonus-accent) 24%, transparent), transparent 46%), linear-gradient(135deg, var(--panel) 0%, var(--panel2) 100%); box-shadow: 0 24px 60px rgb(0 0 0 / .16); }
.bonus-hero h1 { margin: 8px 0 10px; font-size: clamp(1.9rem, 4.6vw, 3.2rem); line-height: 1; letter-spacing: -.04em; color: var(--text); }
.bonus-hero p:not(.eyebrow) { max-width: 62ch; margin: 0; color: var(--muted-light); line-height: 1.6; }
.bonus-hero > .bonus-icon { flex: none; width: clamp(72px, 12vw, 120px); height: auto; color: var(--bonus-accent); opacity: .9; }
.bonus-icon { width: 22px; height: 22px; flex: none; }

.bonus-section { display: grid; gap: 12px; }
.bonus-section > h2 { margin: 6px 0 0; color: var(--text); font-size: 1.1rem; }
.bonus-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; align-items: stretch; }
.bonus-grid-wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }

.bonus-card { --kind: var(--bonus-accent); display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 18px; border: 1px solid var(--line-soft); border-top: 3px solid var(--kind); border-radius: 18px; background: var(--panel); }
.bonus-card.has-media { padding-top: 0; overflow: hidden; }
.bonus-card-media { margin: 0 -18px 4px; aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(135deg, color-mix(in srgb, var(--kind) 30%, var(--panel2)), var(--panel2)); }
.bonus-card-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bonus-card.has-media:not(:has(.bonus-card-media img[hidden])) .bonus-card-icon { display: none; }
.bonus-card.has-media:not(:has(.bonus-card-media img[hidden])) > header { grid-template-columns: minmax(0, 1fr) auto; }
.bonus-card-media:has(img[hidden]) { display: none; }
.bonus-art { background: center / cover no-repeat; }
.bonus-art-deposit { background-image: url("art/deposit.webp?v=sha256-0998f3c06759ee696d456567ed9aefa0"); }
.bonus-art-cashback { background-image: url("art/cashback.webp?v=sha256-09597d31a3d8c079b3ea89f718fac5d2"); }
.bonus-art-wager_milestone { background-image: url("art/wager_milestone.webp?v=sha256-3db834a89d306239870920034dd09f83"); }
.bonus-art-kyc_approved { background-image: url("art/kyc_approved.webp?v=sha256-3b88adcad6e775ec30479cc15ebf8211"); }
.bonus-art-vip_level { background-image: url("art/vip_level.webp?v=sha256-8dfa97442e91ad8fb35ccf034da0dec8"); }
.bonus-art-referral { background-image: url("art/referral.webp?v=sha256-3ecbbe8752ee6479f3d5eba9396da906"); }
.bonus-art-gift { background-image: url("art/gift.webp?v=sha256-758559e98865107b03dd2fa0a1d3cd7a"); }
.bonus-card > header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.bonus-card h3 { margin: 0; color: var(--text); font-size: 1.02rem; line-height: 1.3; overflow-wrap: anywhere; }
.bonus-card header p { margin: 3px 0 0; color: var(--muted-light); font-size: .82rem; line-height: 1.45; }
.bonus-card-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: color-mix(in srgb, var(--kind) 16%, transparent); color: var(--kind); }
.bonus-kind-deposit { --kind: #22c55e; }
.bonus-kind-cashback { --kind: #38bdf8; }
.bonus-kind-wager_milestone { --kind: #f59e0b; }
.bonus-kind-kyc_approved, .bonus-kind-email_confirmed, .bonus-kind-registration { --kind: #a78bfa; }
.bonus-kind-vip_level { --kind: #eab308; }
.bonus-kind-referral { --kind: #f472b6; }
.bonus-reward { margin: 2px 0 0; color: var(--text); font-size: clamp(1.25rem, 2.6vw, 1.55rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.bonus-condition { margin: 0; color: var(--muted-light); font-size: .85rem; line-height: 1.5; }
.bonus-standing { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bonus-standing:empty { display: none; }
.bonus-standing > .bonus-progress, .bonus-standing > .bonus-estimate, .bonus-standing > .bonus-note { flex: 1 1 100%; }
.bonus-note { margin: 0; color: var(--muted-light); font-size: .8rem; line-height: 1.5; }
.bonus-locked { display: flex; gap: 8px; align-items: center; margin: 0; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, #f59e0b 14%, transparent); color: var(--warning-text, #fbbf24); font-size: .82rem; }
.bonus-chip { display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px; border-radius: 99px; background: color-mix(in srgb, var(--muted) 16%, transparent); color: var(--muted-light); font-size: .72rem; font-weight: 800; white-space: nowrap; }
.bonus-chip-ok, .bonus-chip-active, .bonus-chip-completed { background: color-mix(in srgb, #10b981 18%, transparent); color: var(--positive-text, #34d399); }
.bonus-chip-warn, .bonus-chip-pending, .bonus-chip-queued { background: color-mix(in srgb, #f59e0b 18%, transparent); color: var(--warning-text, #fbbf24); }
.bonus-chip-offered { background: color-mix(in srgb, var(--bonus-accent) 18%, transparent); color: var(--bonus-accent); }
.bonus-label { display: block; color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

.bonus-progress { display: grid; gap: 6px; }
.bonus-progress > span, .bonus-progress small { color: var(--muted-light); font-size: .8rem; }
.bonus-progress-head { display: flex; justify-content: space-between; align-items: baseline; color: var(--muted-light); font-size: .8rem; }
.bonus-progress-head strong { color: var(--text); font-size: 1rem; }
.bonus-bar { height: 10px; overflow: hidden; border-radius: 99px; background: color-mix(in srgb, var(--muted) 20%, transparent); }
.bonus-bar i { display: block; width: var(--bonus-progress); height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--kind, var(--bonus-accent)), color-mix(in srgb, var(--kind, var(--bonus-accent)) 55%, #f472b6)); transition: width .3s ease; }
.bonus-estimate { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--panel2); }
.bonus-estimate span { color: var(--muted); font-size: .75rem; }
.bonus-estimate strong { color: var(--text); font-size: 1.35rem; letter-spacing: -.02em; }
.bonus-estimate small { color: var(--muted-light); font-size: .75rem; }

.bonus-rules { border-top: 1px solid var(--line-soft); padding-top: 8px; }
.bonus-rules summary { cursor: pointer; color: var(--text); font-size: .85rem; font-weight: 700; min-height: 32px; display: flex; align-items: center; gap: 8px; list-style: none; }
.bonus-rules summary::-webkit-details-marker { display: none; }
.bonus-rules summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s ease; }
.bonus-rules[open] summary::before { transform: rotate(45deg); }
.bonus-rules ul { display: grid; gap: 6px; margin: 6px 0 0; padding-left: 18px; color: var(--muted-light); font-size: .82rem; line-height: 1.5; }
.bonus-weights { margin-top: 10px; display: grid; gap: 6px; }
.bonus-weights strong { color: var(--text); font-size: .8rem; }
.bonus-weights ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.bonus-weights li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 10px; border-radius: 8px; background: var(--panel2); }
.bonus-weights em { font-style: normal; font-weight: 800; color: var(--text); }

.bonus-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bonus-actions .button { min-height: 44px; }
.bonus-card > footer { margin-top: auto; }
.bonus-card > footer:empty { display: none; }

.bonus-signin { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border: 1px solid color-mix(in srgb, var(--bonus-accent) 35%, var(--line)); border-radius: 16px; background: color-mix(in srgb, var(--bonus-accent) 8%, var(--panel)); }
.bonus-signin div:first-child { display: grid; gap: 2px; }
.bonus-signin strong { color: var(--text); }
.bonus-signin span { color: var(--muted-light); font-size: .85rem; }
.bonus-notice { padding: 12px 14px; border-radius: 12px; border: 1px solid color-mix(in srgb, #f59e0b 40%, var(--line)); background: color-mix(in srgb, #f59e0b 10%, var(--panel)); color: var(--text); font-size: .88rem; line-height: 1.5; }
.bonus-notice-info { border-color: color-mix(in srgb, var(--bonus-accent) 35%, var(--line)); background: color-mix(in srgb, var(--bonus-accent) 8%, var(--panel)); }
.bonus-strip { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 18px; border: 1px solid var(--line-soft); border-radius: 16px; background: var(--panel); color: inherit; text-decoration: none; }
.bonus-strip > .bonus-icon { width: 28px; height: 28px; color: var(--bonus-accent); }
.bonus-strip div { display: grid; gap: 4px; }
.bonus-strip strong { color: var(--text); }
.bonus-strip span { color: var(--muted-light); font-size: .82rem; }
.bonus-strip-link { color: var(--bonus-accent) !important; font-weight: 800; white-space: nowrap; }
.bonus-strip:hover { border-color: var(--bonus-accent); }

.bonus-choose { grid-column: 1 / -1; display: grid; gap: 10px; padding: 12px; border: 1px dashed color-mix(in srgb, var(--bonus-accent) 45%, var(--line)); border-radius: 18px; }
.bonus-choose-title { margin: 0; color: var(--text); font-weight: 700; font-size: .88rem; }

.bonus-code { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: 16px; padding: 18px; border: 1px solid var(--line-soft); border-radius: 18px; background: var(--panel); }
.bonus-code-copy { display: flex; gap: 12px; align-items: center; }
.bonus-code-copy > .bonus-icon { width: 34px; height: 34px; color: var(--bonus-accent); }
.bonus-code h2 { margin: 0; color: var(--text); font-size: 1.05rem; }
.bonus-code p { margin: 2px 0 0; color: var(--muted-light); font-size: .85rem; }
.bonus-code-form { display: flex; gap: 8px; }
.bonus-code-form input { flex: 1; min-width: 0; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-deep); color: var(--text); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; text-transform: uppercase; }
.bonus-code-result { grid-column: 1 / -1; margin: 0; font-size: .85rem; font-weight: 700; }
.bonus-code-result.is-ok { color: var(--positive-text, #34d399); }
.bonus-code-result.is-error { color: var(--negative-text, #f87171); }
.bonus-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px; border: 1px dashed var(--line); border-radius: 18px; color: var(--muted-light); text-align: center; }
.bonus-empty .bonus-icon { width: 40px; height: 40px; color: var(--muted); }
.bonus-empty p { margin: 0; }
.bonus-footnote { margin: 4px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.5; }

.bonus-balance { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.bonus-balance > div { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--line-soft); border-radius: 16px; background: var(--panel); }
.bonus-balance span { color: var(--muted); font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.bonus-balance strong { color: var(--text); font-size: clamp(1.1rem, 2.4vw, 1.5rem); letter-spacing: -.02em; overflow-wrap: anywhere; }
.bonus-balance small { color: var(--muted-light); font-size: .75rem; }
.bonus-balance .is-total { border-color: color-mix(in srgb, var(--bonus-accent) 40%, var(--line)); background: color-mix(in srgb, var(--bonus-accent) 8%, var(--panel)); }
.bonus-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.bonus-facts div { padding: 10px 12px; border-radius: 12px; background: var(--panel2); }
.bonus-facts dt { color: var(--muted); font-size: .72rem; }
.bonus-facts dd { margin: 2px 0 0; color: var(--text); font-weight: 700; font-size: .92rem; overflow-wrap: anywhere; }
.bonus-next { margin: 0; padding: 10px 12px; border-left: 3px solid var(--kind); border-radius: 0 10px 10px 0; background: color-mix(in srgb, var(--kind) 8%, transparent); color: var(--text); font-size: .86rem; line-height: 1.5; }
.bonus-state-pending, .bonus-state-queued { --kind: #f59e0b; }
.bonus-confirm { display: grid; gap: 10px; width: 100%; padding: 12px; border: 1px solid color-mix(in srgb, #ef4444 45%, var(--line)); border-radius: 12px; background: color-mix(in srgb, #ef4444 8%, var(--panel)); }
.bonus-confirm h3 { margin: 0; color: var(--text); font-size: .98rem; }
.bonus-confirm p { margin: 0; color: var(--text); font-size: .86rem; line-height: 1.5; }

.bonus-table-wrap { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: 16px; background: var(--panel); }
.bonus-history { width: 100%; border-collapse: collapse; font-size: .86rem; }
.bonus-history th { text-align: left; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.bonus-history td { padding: 10px 14px; border-bottom: 1px solid var(--line-soft); color: var(--text); }
.bonus-history tr:last-child td { border-bottom: 0; }

/* The deposit form's bonus choice. */
.bonus-deposit-choice { display: grid; gap: 8px; margin: 0; padding: 12px; border: 1px solid var(--line-soft); border-radius: 14px; background: var(--panel2); min-width: 0; }
.bonus-deposit-choice legend { padding: 0 4px; color: var(--text); font-weight: 700; font-size: .88rem; }
.bonus-choice { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--panel); cursor: pointer; }
.bonus-choice:has(input:checked) { border-color: var(--bonus-accent, var(--accent)); box-shadow: 0 0 0 1px var(--bonus-accent, var(--accent)) inset; }
.bonus-choice input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); }
.bonus-choice span { display: grid; gap: 2px; }
.bonus-choice strong { color: var(--text); font-size: .88rem; }
.bonus-choice small, .bonus-deposit-choice > small { color: var(--muted-light); font-size: .78rem; line-height: 1.45; }
.bonus-deposit-choice > small a { color: var(--accent); font-weight: 700; }

/* Header: cash plus bonus; the wallet menu shows the split under the balances. */
.balance-pill.has-bonus { position: relative; }
.balance-pill.has-bonus::after { content: ""; position: absolute; top: 5px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 2px var(--bar2, #111); }
.account-balance-split a { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 8px 10px; border: 1px solid var(--line-soft); border-radius: 8px; background: var(--bg-deep); color: inherit; text-decoration: none; }
.account-balance-split span { display: grid; gap: 1px; }
.account-balance-split small { color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; }
.account-balance-split strong { color: var(--text); font-size: .9rem; }

@media (max-width: 720px) {
  .bonus-code { grid-template-columns: minmax(0, 1fr); }
  .bonus-balance { grid-template-columns: minmax(0, 1fr); }
  .bonus-balance > div { grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; }
  .bonus-balance small { grid-column: 1 / -1; }
  .bonus-hero > .bonus-icon { display: none; }
  .bonus-strip { grid-template-columns: auto minmax(0, 1fr); }
  .bonus-strip-link { grid-column: 2; }
  .bonus-history thead { display: none; }
  .bonus-history tr { display: grid; gap: 4px; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); }
  .bonus-history td { display: flex; justify-content: space-between; gap: 12px; padding: 0; border: 0; }
  .bonus-history td::before { content: attr(data-label); color: var(--muted); font-size: .75rem; }
}
@media (max-width: 420px) {
  .bonus-facts { grid-template-columns: minmax(0, 1fr); }
  .bonus-code-form { flex-direction: column; }
}

/* Wallet statements: the bonus part of a movement, under its cash amount. */
.wallet-statement-bonus { display: block; margin-top: 2px; color: var(--muted-light); font-size: .75rem; font-weight: 600; }
