@import url('./games-sidebar.css');
@import url('./mini-player.css');
@import url('./mini-player-content.css');
@import url('./purchase-notifications.css');

/* Header + sidebar v2 (lane G2 with SHELL's OK, 2026-11-20; FRAME-SPEC "the outside"). Everything is scoped
   under body.fx2, so nothing changes until fx2 is on. Colours only through tokens.css names. Markup is SHELL's
   (public/js/shell.js); this file only restyles it. */

/* ---------- header ---------- */
.fx2 .top { background: var(--bg); border-bottom: 0; box-shadow: 0 4px 12px rgba(0, 0, 0, .28), 0 1px 0 rgba(0, 0, 0, .25); }

/* balance + Wallet: one joined group */
.fx2 .top-mid { gap: 0; }
.fx2 .bal {
  height: 44px; padding: 0 16px 0 12px; background: var(--surface-2); border: 2px solid var(--surface-3);
  border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); font: 700 15px var(--font-num);
  font-variant-numeric: tabular-nums; color: var(--text); box-shadow: var(--shadow);
}
.fx2 .bal:hover { border-color: var(--surface-4); }
.fx2 .top-wallet {
  min-height: 44px; height: 44px; padding: 0 18px; border: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--accent); color: var(--accent-ink); font: 700 14px var(--font); box-shadow: var(--shadow);
  display: inline-flex; align-items: center; transition: background-color .1s linear, transform .1s ease-out;
}
.fx2 .top-wallet:hover { background: var(--accent-hover, var(--accent)); }
.fx2 .top-wallet:active, .fx2 .bal:active { transform: scale(.98); }

/* Amount, coin and chevron share one currency button beside the cashier link. */
body .top .bal.wallet-bar-balance { display:flex; flex-direction:row; align-items:stretch; padding:0; margin:0; gap:0; width:100%; appearance:none; cursor:pointer; }
body .top .wallet-bar-balance::after { content:none; }
.wallet-balance-value {
  display:flex; align-items:center; gap:6px; padding-inline-start:12px;
  color:var(--text);
}
.wallet-in-play { display:inline-flex; align-items:center; justify-content:center; gap:4px; padding-inline-start:12px; white-space:nowrap; font:600 16px/24px var(--font); }
.wallet-in-play span { color:var(--label); }
.wallet-in-play img { flex:none; }
.wallet-balance-coin[src="/img/wallet/gold-coin.svg"], .wallet-currency-menu [data-currency="GC"] img {
  width:var(--gc-icon-size); height:var(--gc-icon-size);
}
.wallet-in-play b { font-weight:600; }
.wallet-in-play[hidden], .wallet-balance-value[hidden] { display:none; }
body.classic-slot-page .top .bal.wallet-currency-toggle { width:179px; max-width:100%; height:48px; justify-content:space-between; }
body.classic-slot-page .top .top-wallet { min-height:48px; height:48px; }
.wallet-button-icon { display:none; }
.classic-slot-page .wallet-currency-menu button { grid-template-columns:22px 1fr 14px; }
@media (max-width:760px) {
  .signed-in.classic-slot-page :is(.top-in,.top-mid) { height:60px; }
  body.classic-slot-page .top .bal.wallet-currency-toggle { width:163px; }
  body.classic-slot-page .top .top-wallet { width:48px; flex:0 0 48px; padding:0; justify-content:center; }
  .classic-slot-page .top-wallet .wallet-button-label { display:none; }
  .classic-slot-page .top-wallet .wallet-button-icon { display:grid; place-items:center; }
  .wallet-button-icon svg { width:20px; height:20px; }
  .wallet-in-play { padding-inline-start:8px; }
}
@media (min-width:1100px) { .wallet-in-play { padding-inline-start:20px; } }
.wallet-currency-chevron {
  display:grid; place-items:center; align-self:stretch; width:32px; color:var(--label);
}
.top .wallet-currency-toggle:is(:hover,[aria-expanded="true"]) { background:var(--surface-3); }
.wallet-currency-toggle:is(:hover,[aria-expanded="true"]) .wallet-currency-chevron { color:var(--text); }
.wallet-currency-toggle svg, .wallet-currency-menu svg { fill:none; stroke:currentColor; stroke-width:2; stroke-linejoin:round; stroke-linecap:round; }
.wallet-currency-toggle svg { width:16px; height:16px; }
.wallet-currency-toggle[aria-expanded="true"] svg { transform:rotate(180deg); }
.wallet-currency-menu {
  position:absolute; top:calc(100% - 2px); left:50%; transform:translateX(-50%); z-index:30;
  width:max-content; min-width:min(264px,calc(100vw - 16px)); max-width:calc(100vw - 16px);
  padding:5px; border:1px solid var(--edge); border-radius:10px;
  background:var(--surface-2); box-shadow:0 8px 24px rgba(0,0,0,.32);
}
.wallet-currency-menu[hidden] { display:none; }
.wallet-currency-menu button {
  display:grid; grid-template-columns:22px 1fr auto 14px; gap:10px; align-items:center;
  width:100%; min-height:46px; padding:8px 10px; border:0; border-radius:6px;
  background:transparent; color:var(--text); text-align:left; font:600 14px var(--font); cursor:pointer;
}
.wallet-currency-menu button:hover, .wallet-currency-menu button:focus-visible { background:var(--surface-3); }
.wallet-currency-menu button[aria-checked="true"] { background:var(--well, var(--bg)); }
.wallet-currency-menu strong { font-variant-numeric:tabular-nums; color:var(--text-2); }
.wallet-currency-menu svg { width:14px; height:14px; color:var(--text); visibility:hidden; }
.wallet-currency-menu [aria-checked="true"] svg { visibility:visible; }
.wallet-currency-menu button:focus-visible, .wallet-currency-toggle:focus-visible { outline:2px solid var(--focus); outline-offset:-2px; }
.top .brand.has-word .brand-mark { display:none; }
@media (min-width:1100px) {
  .fx2 .wallet-balance-value { flex-direction:row-reverse; gap:4px; padding-inline-start:20px; }
  .fx2 .wallet-currency-chevron { width:48px; padding-inline-end:10px; }
  .fx2 .wallet-currency-toggle svg { width:20px; height:20px; }
}
@media (max-width:760px) {
  .signed-in .top-in { gap:4px; padding-inline:8px; }
  .signed-in .top-mid { position:static; transform:none; min-width:0; flex:1; justify-content:center; }
  .signed-in .top-right { flex:none; margin:0; gap:4px; }
  .signed-in .top-mid .top-wallet, .wallet-currency-chevron, .wallet-balance-coin { flex:none; }
  .wallet-currency-picker, .wallet-balance-value { min-width:0; }
  .wallet-balance-value .num { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .wallet-currency-menu { top:calc(100% + 2px); }
  .wallet-balance-value { gap:4px; padding-inline-start:8px; }
  .wallet-currency-chevron { width:28px; }
}
@media (max-width:370px) {
  body.signed-in .top-in .brand.has-word .brand-word { display:none; }
  .signed-in .top .brand.has-word .brand-mark { display:block; }
  body.signed-in .top-in .brand.has-word > .brand-word-game { --game-logo-height:18px; --suffix-kern:-.1em; }
}
@media (min-width:371px) and (max-width:435px) {
  .signed-in.classic-slot-page .top-in .brand-word-game { --game-logo-height:clamp(10.5px,4vw - 4px,14px); }
}
@media (max-width:360px) {
  .signed-in.classic-slot-page .top-in { gap:3px; padding-inline:4px; }
  .signed-in.classic-slot-page .top-right { gap:0; }
  .signed-in.classic-slot-page .top-right :is(.notifications-toggle,.acct-btn) { width:34px; min-width:34px; padding:0; }
}

/* Search in the box style */
.fx2 .top-search {
  min-height: 40px; height: 40px; padding: 0 12px; background: var(--surface-2); border: 2px solid var(--surface-3);
  border-radius: var(--radius-sm); color: var(--muted); font: 600 14px var(--font); box-shadow: var(--shadow);
  transition: border-color .1s linear;
}
.fx2 .top-search:hover, .fx2 .top-search:focus-visible { border-color: var(--surface-4); color: var(--text); }
.fx2 .top-search kbd { background: var(--surface-3); color: var(--muted); font-weight: 600; }

/* profile as an icon button (name stays for screen readers through the menu; the icon shows the state) */
.fx2 .acct-btn {
  width: 40px; min-height: 40px; height: 40px; padding: 0; justify-content: center; gap: 0;
  border-radius: var(--radius-sm); color: var(--muted); background: transparent; transition: background-color .1s linear, transform .1s ease-out;
}
.fx2 .acct-btn span {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;   /* visually hidden */
}
.fx2 .acct-btn svg { width: 18px; height: 18px; }
.fx2 .acct-btn:hover, .fx2 .acct-btn[aria-expanded="true"] { color: var(--text); background: var(--surface-3); }
.fx2 .acct-btn:active { transform: scale(.96); }
/* the profile menu itself is SHELL's (.fx2 .top .acct-menu in frame-v2.css) */

/* signed-out buttons */
.fx2 .top .btn.is-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.top .top-in .guest-actions { gap: 8px; }
.top .guest-actions > .btn {
  min-height: 44px; padding: 0 20px; border: 0; border-radius: 8px;
  background: var(--edge); color: white; font: 600 16px/24px var(--font); box-shadow: var(--lift-sm);
}
.top .guest-actions > .btn.is-primary { background: var(--info); color: white; }
.top .guest-actions > .btn:hover { filter: brightness(1.12); }
.side .guest-nav-icon, .tabbar .guest-nav-icon { fill: currentColor; stroke: none; }
body:not(.signed-in) .side .side-group:first-child > a:first-child { background: var(--surface); color: var(--text-2); }
body:not(.signed-in) .side .side-group:first-child > a:first-child:hover { background: var(--surface-3); }
@media (max-width: 430px) {
  .top .guest-actions > .btn { padding-inline: 14px; }
}
@media (max-width: 359px) {
  body:not(.signed-in) .top-in { --game-logo-height: 15px; padding-inline: 8px; }
  .top .top-in .guest-actions { gap: 4px; }
  .top .guest-actions > .btn { padding-inline: 10px; }
}

/* ---------- sidebar (wide screens) ---------- */
@media (min-width: 761px) {   /* the sidebar shows from 761px (SHELL, 2026-11-20) */
  .fx2 .side { background: var(--surface-2); border-right: 0; box-shadow: 2px 0 10px rgba(0, 0, 0, .18); padding: 12px 10px; }
  .fx2 .side nav { gap: 2px; }
  .fx2 .side-group + .side-group { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--surface-3); }
  .fx2 .side-nav :is(a, button), .fx2 .side-fold {
    min-height: 40px; height: 40px; padding: 0 12px; gap: 12px; border-radius: var(--radius-sm);
    color: var(--muted); font: 600 14px var(--font); transition: background-color .1s linear, color .1s linear;
  }
  .fx2 .side-nav :is(a, button):hover, .fx2 .side-fold:hover { background: var(--surface-3); color: var(--text); }
  .fx2 .side a[aria-current="page"] { background: var(--surface-3); color: var(--text); }
  .fx2 .side-nav :is(a, button):active, .fx2 .side-fold:active { transform: scale(.98); }
  .fx2 .side svg { width: 16px; height: 16px; }
  .fx2 .side .side-pic { width: 16px; height: 16px; flex: none; border-radius: 3px; object-fit: cover; }
  /* group heading (Originals): 600, muted, no row hover look of its own beyond the normal one */
  .fx2 .side a.side-head { color: var(--muted); font-weight: 600; }
  .fx2 .side a.side-head:hover { color: var(--text); }

  /* collapsed: a tidy icon-only rail; every link already carries a title, so the name shows as a tooltip */
  .fx2.side-folded .side { padding: 12px 8px; }
  .fx2.side-folded .side-nav :is(a, button), .fx2.side-folded .side-fold { width: 44px; padding: 0; justify-content: center; gap: 0; }
  .fx2.side-folded .side-group + .side-group { margin-top: 8px; padding-top: 8px; }
}
@media (min-width: 761px) and (max-width: 1099px) and (max-height: 600px) {
  .side { justify-content: flex-start; scroll-padding-top: 48px; }
  .side .side-fold { order: -1; position: sticky; top: 0; z-index: 1; margin: 0 0 4px; background: var(--surface-2); }
}

/* ---------- phone: header and bottom bar in the same tokens ---------- */
@media (max-width: 760px) {
  /* the joined balance + Wallet group stays on phones, a little smaller */
  .fx2 .bal { height: 40px; font-size: 14px; padding: 0 10px 0 8px; }
  .fx2 .top-wallet { min-height: 40px; height: 40px; padding: 0 14px; }
  .fx2 .top-search { border: 0; background: none; box-shadow: none; }
  .fx2 .tabbar { background: var(--surface-2); border-top: 0; box-shadow: 0 -4px 12px rgba(0, 0, 0, .28); }
  .fx2 .tabbar a { font-weight: 600; color: var(--muted); transition: color .1s linear; }
  .fx2 .tabbar a[aria-current="page"] { color: var(--text); }
  .fx2 .tabbar a[aria-current="page"] svg { color: var(--accent); }
  .fx2 .tabbar a:active { transform: scale(.96); }
}
