/* Progressive mobile expansion; original tables and popup actions remain available. */
@media(max-width:767.98px) {
 html body #branch-betting-history.bm-cards-ready #betting-history-results>tbody>.bm-card { margin-top:0!important;margin-bottom:26px!important;transition:filter .18s ease,box-shadow .18s ease; }
 html body #branch-betting-history.bm-cards-ready #betting-history-results>tbody>.bm-card.bm-is-open { box-shadow:0 8px 24px #17283b18!important; }
 html body #branch-betting-history.bm-cards-ready.bm-has-open #betting-history-results>tbody>.bm-card-part:not(.bm-is-open):not(:focus-within) { filter:brightness(.82) saturate(.88); }
 html body #branch-betting-history.bm-cards-ready #betting-history-results>tbody>.bm-is-win { border-color:#e7a4b5!important;background:#fff5f7!important; }
 html body:is(.dark-mode,.dashboard-dark) #branch-betting-history.bm-cards-ready #betting-history-results>tbody>.bm-is-win { border-color:#975168!important;background:#352631!important; }
 html body #branch-betting-history.bm-cards-ready #betting-history-results>tbody>.bm-card .bm-added-cell { display:block!important;grid-column:1/-1!important;grid-row:auto!important;width:100%!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important;text-align:left!important; }
 html body #branch-betting-history.bm-cards-ready #betting-history-results>tbody>.bm-card .bm-expand-cell { grid-area:expand!important;padding-top:10px!important;border-top:1px solid var(--bh-border)!important; }
 html body #branch-betting-history.bm-cards-ready #betting-history-results .bm-expand-button { display:flex;align-items:center;justify-content:space-between;width:100%;min-height:36px;padding:5px 0;border:0;border-radius:6px;background:transparent;color:var(--bh-accent);font-size:12px;font-weight:700;text-align:left;box-shadow:none; }
 html body #branch-betting-history.bm-cards-ready #betting-history-results .bm-expand-button:focus-visible { outline:2px solid var(--bh-accent);outline-offset:3px; }
 html body #branch-betting-history.bm-cards-ready #betting-history-results .bm-card .bm-preview-cell { grid-area:preview!important;color:var(--bh-ink);font-size:12px;line-height:1.7;overflow-wrap:anywhere; }
 html body #branch-betting-history.bm-cards-ready #betting-history-results .bm-preview-cell small { color:var(--bh-muted);font-size:10px; }
 html body #branch-betting-history.bm-cards-ready #betting-history-results .bm-card.bm-is-open .bm-preview-cell { display:none!important; }
 html body #branch-betting-history.bm-cards-ready #sports-history-workspace #betting-history-results>tbody>.bm-sports { grid-template-areas:'kind time' 'member state' 'preview preview' 'summary summary' 'expand expand'!important; }
 html body #branch-betting-history.bm-cards-ready #sports-history-workspace #betting-history-results>tbody>.bm-sports.bm-is-open { grid-template-areas:'kind time' 'member state' 'matches matches' 'summary summary' 'actions actions' 'expand expand'!important; }
 html body #branch-betting-history.bm-cards-ready #sports-history-workspace #betting-history-results>tbody>.bm-sports>td:first-child { grid-area:kind!important; }
 html body #branch-betting-history.bm-cards-ready #sports-history-workspace #betting-history-results>tbody>.bm-sports>td:nth-child(2) { grid-area:time!important; }
 html body #branch-betting-history.bm-cards-ready #sports-history-workspace #betting-history-results>tbody>.bm-sports>td:nth-child(3) { grid-area:member!important;grid-column:auto!important; }
 html body #branch-betting-history.bm-cards-ready #sports-history-workspace #betting-history-results>tbody>.bm-sports>td:nth-child(4) { display:none!important; }
 html body #branch-betting-history.bm-cards-ready #sports-history-workspace #betting-history-results>tbody>.bm-sports>.bet-info-cell { grid-area:matches!important; }
 html body #branch-betting-history.bm-cards-ready #sports-history-workspace #betting-history-results>tbody>.bm-sports>.history-summary-cell { grid-area:summary!important; }
 html body #branch-betting-history.bm-cards-ready #sports-history-workspace #betting-history-results>tbody>.bm-sports>.history-status-cell { grid-area:state!important;align-self:center; }
 html body #branch-betting-history.bm-cards-ready #sports-history-workspace #betting-history-results>tbody>.bm-sports>.history-actions-cell { grid-area:actions!important;text-align:right!important; }
 html body #branch-betting-history.bm-cards-ready #sports-history-workspace #betting-history-results>tbody>.bm-sports:not(.bm-is-open)>:is(.bet-info-cell,.history-actions-cell) { display:none!important; }
 html body #branch-betting-history.bm-cards-ready #betting-history-results.casino-history-table>tbody>.bm-casino { grid-template-areas:'member state' 'game game' 'time time' 'stake payout' 'expand expand'!important; }
 html body #branch-betting-history.bm-cards-ready #betting-history-results.casino-history-table>tbody>.bm-casino.bm-is-open { grid-template-areas:'member state' 'game game' 'time time' 'stake payout' 'before after' 'final final' 'action action' 'expand expand'!important;margin-bottom:0!important;border-radius:13px 13px 0 0!important; }
 html body #branch-betting-history.bm-cards-ready #betting-history-results.casino-history-table>tbody>.bm-casino>td:first-child { display:none!important; }
 html body #branch-betting-history.bm-cards-ready #betting-history-results.casino-history-table>tbody>.bm-casino:not(.bm-is-open)>td:last-of-type:not(.bm-added-cell) { display:none!important; }
 html body #branch-betting-history.bm-cards-ready #betting-history-results.casino-history-table>tbody>.bm-casino:not(.bm-is-open)>td:nth-child(12) { display:none!important; }
 html body #branch-betting-history.bm-cards-ready #betting-history-results.casino-history-table>tbody>.bm-casino.bm-is-open>td:is(:nth-child(6),:nth-child(8),:nth-child(10)) { display:block!important; }
 html body #branch-betting-history.bm-cards-ready #betting-history-results.casino-history-table>tbody>.hidden-row.bm-card-part { display:none!important; }
 html body #branch-betting-history.bm-cards-ready #betting-history-results.casino-history-table>tbody>.hidden-row.bm-is-open { display:block!important;margin:0 0 26px!important;border-top:0!important;border-radius:0 0 13px 13px!important; }
 html body #branch-betting-history.bm-cards-ready #betting-history-results.mini-exact-table>tbody>.bm-mini { grid-template-areas:'game state' 'member member' 'pick pick' 'time time' 'stake payout' 'expand expand'!important; }
 html body #branch-betting-history.bm-cards-ready #betting-history-results.mini-exact-table>tbody>.bm-mini.bm-is-open { grid-template-areas:'game state' 'member member' 'round time' 'pick pick' 'draw odds' 'stake payout' 'action action' 'expand expand'!important; }
 html body #branch-betting-history.bm-cards-ready #betting-history-results.mini-exact-table>tbody>.bm-mini:not(.bm-is-open)>td:is(:nth-child(4),:nth-child(6),:nth-child(9),:nth-child(12)) { display:none!important; }
 html body #branch-betting-history.bm-cards-ready #betting-history-results.rh-table>tbody>.bm-virtual { grid-template-areas:'time member' 'league league' 'pick pick' 'odds state' 'stake payout' 'expand expand'!important; }
 html body #branch-betting-history.bm-cards-ready #betting-history-results.rh-table>tbody>.bm-virtual.bm-is-open { grid-template-areas:'time member' 'league league' 'pick pick' 'result result' 'odds state' 'stake payout' 'expand expand'!important; }
 html body #branch-betting-history.bm-cards-ready #betting-history-results.rh-table>tbody>.bm-virtual:not(.bm-is-open)>.ev-game-result,
 html body #branch-betting-history.bm-cards-ready #betting-history-results.rh-table>tbody>.ev-coupon-continuation.bm-card-part:not(.bm-is-open) { display:none!important; }
 html body #branch-betting-history.bm-cards-ready #betting-history-results.rh-table>tbody>.bm-virtual.bm-is-open:has(+.ev-coupon-continuation) { margin-bottom:0!important; }
 html body #branch-betting-history.bm-cards-ready #betting-history-results.rh-table>tbody>.ev-coupon-continuation.bm-is-open:not(:has(+.ev-coupon-continuation)) { margin-bottom:26px!important; }
 html body #branch-betting-history.bm-cards-ready #betting-history-results :is(.bm-sports,.bm-mini,.bm-virtual,.ev-coupon-continuation.bm-card-part) :is(.status-success,.mb-state-win,.ev-state-cell .pie-btn4) { border-color:#db8da4!important;background:#ffe9ef!important;color:#b93258!important; }
 html body:is(.dark-mode,.dashboard-dark) #branch-betting-history.bm-cards-ready #betting-history-results :is(.bm-sports,.bm-mini,.bm-virtual,.ev-coupon-continuation.bm-card-part) :is(.status-success,.mb-state-win,.ev-state-cell .pie-btn4) { border-color:#975168!important;background:#512a39!important;color:#ffc3d5!important; }
 html body #branch-betting-history.bm-cards-ready #betting-history-results .bm-is-win :is(.money-win .value-main,.ev-payout-cell,.history-summary-box:last-child .history-summary-value) { color:#c83e66!important; }
 html body:is(.dark-mode,.dashboard-dark) #branch-betting-history.bm-cards-ready #betting-history-results .bm-is-win :is(.money-win .value-main,.ev-payout-cell,.history-summary-box:last-child .history-summary-value) { color:#ffb3cc!important; }
}
@media(prefers-reduced-motion:reduce) { #branch-betting-history .bm-card-part { transition:none!important; } }

/* Distinct outcomes for sports, virtual and mini; casino/slot keep their colours. */
@media(max-width:767.98px) {
 html body #branch-betting-history.bm-cards-ready #betting-history-results>tbody>.bm-state-win { --bm-outcome:#c2607e; }
 html body #branch-betting-history.bm-cards-ready #betting-history-results>tbody>.bm-state-lose { --bm-outcome:#6f8395; }
 html body #branch-betting-history.bm-cards-ready #betting-history-results>tbody>.bm-state-pending { --bm-outcome:#6a9cc7; }
 html body #branch-betting-history.bm-cards-ready #betting-history-results>tbody>.bm-state-refund { --bm-outcome:#c0a16a; }
 html body #branch-betting-history.bm-cards-ready #betting-history-results>tbody>.bm-state-cancel { --bm-outcome:#92889c; }
 html body #branch-betting-history.bm-cards-ready #betting-history-results>tbody>tr.bm-card-part[class*="bm-state-"]:is(.bm-sports,.bm-mini,.bm-virtual,.ev-coupon-continuation.bm-card-part):not(.upper-error-row):not(.hq-bet-row):not(.row-danger) { border-color:color-mix(in srgb,var(--bm-outcome) 60%,var(--bh-border))!important;background:var(--bm-win-bg,color-mix(in srgb,var(--bh-surface) 78%,var(--bm-outcome)))!important; }
}

/* Stronger focus requested for the sports mobile list. */
@media(max-width:767.98px) {
 html body #branch-betting-history.bm-cards-ready.bm-has-open #betting-history-results>tbody>.bm-sports:not(.bm-is-open):not(:focus-within) { filter:brightness(.55) saturate(.70); }
}

@media(max-width:767.98px) {
 html body #branch-betting-history.bm-cards-ready #betting-history-results>tbody>.bm-state-win { --bm-win-bg:#fff2f5; }
 html body:is(.dark-mode,.dashboard-dark) #branch-betting-history.bm-cards-ready #betting-history-results>tbody>.bm-state-win { --bm-win-bg:#34232f; }
}
