/* HB Battle player app - theme contrast + layout fixes (loaded last).
   Fixes: invisible headings/text on the green theme, white quick-action cards,
   navy profile buttons, AI assistant neon theme overload, wrapped labels, badges. */

/* ---------- Headings: never navy-on-dark ---------- */
html[data-theme="green"] body #app .screen .sec-title,
html[data-theme="dark"] body #app .screen .sec-title{color:#f2f7f4!important}
html[data-theme="green"] body #app .screen .sec-title a{color:#ffb089!important}
html[data-theme="dark"] body #app .screen .sec-title a{color:#9ac9ff!important}

/* ---------- Dashboard quick actions (green): dark glass, readable text ---------- */
html[data-theme="green"] body #app #dashboardScreen .qa-grid .qa-card,
html[data-theme="green"] body #app #dashboardScreen #qaExtraCards .qa-card{
  background:linear-gradient(145deg,#10271d,#0d1d16)!important;
  border:1px solid rgba(194,222,207,.2)!important;box-shadow:0 10px 22px -16px rgba(0,0,0,.8)!important}
html[data-theme="green"] body #app #dashboardScreen .qa-card-title{color:#f2f7f4!important}
html[data-theme="green"] body #app #dashboardScreen .qa-card-sub{color:#9fb5aa!important}
html[data-theme="green"] body #app #dashboardScreen .qa-card-icon{background:rgba(255,143,94,.14)!important;border:1px solid rgba(255,143,94,.32)!important}

/* ---------- Wallet ---------- */
html body #app .txn-item{background:transparent}
html[data-theme="green"] body #app .txn-title,html[data-theme="dark"] body #app .txn-title{color:#f2f7f4!important}
html[data-theme="green"] body #app .txn-date,html[data-theme="dark"] body #app .txn-date{color:#9fb5aa!important}
html body #app .txn-amount.credit{color:#35e39d!important}
html body #app .txn-amount.debit{color:#ff7b86!important}
html body #app .badge.badge-approved{background:rgba(53,227,157,.16)!important;color:#35e39d!important;border:1px solid rgba(53,227,157,.45)!important}
html body #app .badge.badge-pending{background:rgba(255,201,74,.16)!important;color:#ffc94a!important;border:1px solid rgba(255,201,74,.45)!important}
html body #app .badge.badge-rejected{background:rgba(255,107,107,.16)!important;color:#ff8d8d!important;border:1px solid rgba(255,107,107,.5)!important}
html body #app .wallet-stats-grid{gap:8px}
html body #app .wallet-stat-card{padding-inline:6px}
html body #app .wallet-stat-card div:last-child{white-space:nowrap!important;word-break:normal!important;overflow-wrap:normal!important;font-size:9.5px!important;letter-spacing:.2px!important}
html body #app .wallet-btn{white-space:nowrap;font-size:12px;padding-inline:8px;min-width:0}
html[data-theme="green"] body #app .wallet-stat-card,html[data-theme="dark"] body #app .wallet-stat-card{background:rgba(255,255,255,.04)!important;border:1px solid rgba(194,222,207,.18)!important}
/* Bonus wallet card (inline-styled): keep it readable in every theme */
html body #app [onclick="showScreen('bonusWalletScreen')"]{background:linear-gradient(135deg,rgba(255,201,74,.18),rgba(255,143,94,.10))!important;border:1.5px solid rgba(255,201,74,.6)!important}
html body #app [onclick="showScreen('bonusWalletScreen')"] > div:first-child{background:linear-gradient(135deg,#ffd76a,#f59e0b)!important;color:#2b1700!important}
html body #app [onclick="showScreen('bonusWalletScreen')"] > div:first-child i{color:#2b1700!important;display:inline-block}
html body #app [onclick="showScreen('bonusWalletScreen')"] > div:nth-child(2) > div:first-child{color:#fff3cf!important}
html body #app [onclick="showScreen('bonusWalletScreen')"] > div:nth-child(2) > div:last-child{color:#ffd37a!important}
html body #app [onclick="showScreen('bonusWalletScreen')"] > i{color:#ffd37a!important}
html[data-theme="light"] body #app [onclick="showScreen('bonusWalletScreen')"]{background:linear-gradient(135deg,#fef3c7,#fde68a)!important}
html[data-theme="light"] body #app [onclick="showScreen('bonusWalletScreen')"] > div:nth-child(2) > div:first-child{color:#92400e!important}
html[data-theme="light"] body #app [onclick="showScreen('bonusWalletScreen')"] > div:nth-child(2) > div:last-child{color:#b45309!important}

/* ---------- Profile ---------- */
html[data-theme="green"] body #app .profile-name{color:#fff!important}
html[data-theme="green"] body #app .profile-uid{color:#b9d3c6!important}
html[data-theme="green"] body #app .info-card{background:#0d1d16!important;border:1px solid rgba(194,222,207,.18)!important}
html[data-theme="green"] body #app .info-label{color:#9fb5aa!important}
html[data-theme="green"] body #app .info-val{color:#f2f7f4!important}
html[data-theme="green"] body #app .info-icon{background:rgba(255,143,94,.14)!important;color:#ffb089!important;border:1px solid rgba(255,143,94,.28)}
html[data-theme="green"] body #app .profile-actions-grid .profile-action-btn,
html[data-theme="green"] body #app .profile-actions-grid button{background:linear-gradient(145deg,#10271d,#0d1d16)!important;border:1px solid rgba(194,222,207,.22)!important;color:#f2f7f4!important;box-shadow:none!important}
html[data-theme="green"] body #app .profile-actions-grid button i{color:#ffb089!important}
html[data-theme="dark"] body #app .profile-actions-grid button{color:#f4f6ff!important}

/* ---------- Leaderboard: do not chop player names ---------- */
html body #app .leader-item{gap:10px}
html body #app .leader-name{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere;line-height:1.2;min-width:0;flex:1}

/* ---------- Floating back button: slimmer so it does not cover cards ---------- */
.hb-side-back{width:26px!important;height:58px!important;opacity:.9}
.hb-side-back .hb30-arrow{font-size:22px!important}

/* ---------- AI assistant (all colour themes) ---------- */
#aiAssistantScreen .hbai-pill{padding-left:48px!important;padding-right:26px!important}
#aiAssistantScreen .hbai-pill:before{left:19px!important}
#aiAssistantScreen .hbai-field{color:#111!important}
#aiAssistantScreen .hbai-field::placeholder{color:rgba(17,17,17,.62)!important;opacity:1!important}
#aiAssistantScreen .hbai-voice{background:#111!important;color:var(--pill)!important;border:0!important;box-shadow:none!important}
#aiAssistantScreen .hbai-voice.listening{background:linear-gradient(180deg,#ff6b6b,#dc2626)!important;color:#fff!important}
#aiAssistantScreen .hbai-quick button{background:rgba(255,255,255,.16)!important;border:1px solid rgba(255,255,255,.3)!important;color:var(--text)!important;box-shadow:none!important}
#aiAssistantScreen .hbai-act{background:rgba(255,255,255,.16)!important;color:var(--text)!important;border:1px solid rgba(255,255,255,.22)!important;box-shadow:none!important}
#aiAssistantScreen .hbai-status{color:var(--text)!important}
/* Neon theme: lime is an accent, not the colour of every word */
#aiAssistantScreen .hbai.theme-neon{--text:#eaffd0;--pill:#b6ff2e;--bubble-user:#17331a}
#aiAssistantScreen .hbai.theme-neon .hbai-hb{color:#c6ff4d!important;text-shadow:0 2px 0 rgba(0,0,0,.5),0 10px 26px rgba(163,255,18,.28)!important}
#aiAssistantScreen .hbai.theme-neon .hbai-sub{color:#d9f3c1!important;opacity:1;font-weight:600;font-size:16px}
#aiAssistantScreen .hbai.theme-neon .hbai-quick button{background:rgba(163,255,18,.08)!important;border:1px solid rgba(163,255,18,.38)!important;color:#eaffd0!important}
#aiAssistantScreen .hbai.theme-neon .hbai-msg.user .hbai-bubble{border:1px solid rgba(163,255,18,.35)}
#aiAssistantScreen .hbai-field{-webkit-text-fill-color:#111!important}
#aiAssistantScreen .hbai-field::placeholder{-webkit-text-fill-color:rgba(17,17,17,.62)!important;color:rgba(17,17,17,.62)!important;opacity:1!important}
#aiAssistantScreen .hbai-field::-webkit-input-placeholder{-webkit-text-fill-color:rgba(17,17,17,.62)!important;color:rgba(17,17,17,.62)!important;opacity:1!important}
