/* Wallet header: Beast Coins + Beast Points in the header (pill, hover panel, mobile menu card), new account button and login button.
   Loaded after style.css by renderHeader(), so it overrides the old account trigger / login button rules. */

:root {
  --wl-gold: #ffd78f;
  --wl-gold-grad: linear-gradient(90deg, #f3a65a 0%, #ffd88f 100%);
  --wl-brown: #4a1708;
  --wl-panel: #141a2b;
  --wl-card: #1b2236;
  --wl-muted: #8f9bb8;
  --wl-line: rgba(255, 255, 255, .1);
}

.actions { position: relative; }

/* ── Balance pill ───────────────────────────────────────────────── */
.wallet { position: static; }
.wallet-anchor { position: relative; display: flex; align-items: center; }
.wallet-pill {
  display: inline-flex; align-items: center; gap: 12px;
  height: 41px; padding: 0 18px 0 12px;
  border-radius: 999px; border: 1.5px solid rgba(220, 165, 90, .6);
  background: linear-gradient(180deg, rgba(35, 42, 66, .92) 0%, rgba(21, 27, 45, .92) 100%);
  color: #fff; font: inherit; font-size: 15px; font-weight: 700; line-height: 1;
  font-variant-numeric: tabular-nums; cursor: pointer; white-space: nowrap;
  transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}
.wallet-pill:hover, .wallet.is-open .wallet-pill { border-color: rgba(255, 215, 143, .85); }
.wallet-pill:focus-visible { outline: 2px solid rgba(255, 215, 132, .6); outline-offset: 3px; }
.wallet-seg { display: inline-flex; align-items: center; gap: 8px; }
.wallet-ico { width: 26px; height: 26px; margin: -2px; object-fit: contain; flex: 0 0 auto; }
.wallet-num { min-width: 1ch; transition: color .3s ease; }
.wallet-sep { width: 1px; height: 20px; background: rgba(255, 255, 255, .2); flex: 0 0 auto; }

.wallet-pill.is-gain {
  border-color: #ffd78f;
  box-shadow: 0 0 0 5px rgba(255, 215, 143, .2), 0 0 22px rgba(255, 190, 100, .38);
}
.wallet-seg.is-hot .wallet-num { color: var(--wl-gold); }

.wallet-chip {
  position: absolute; right: 6px; bottom: calc(100% + 6px); z-index: 400;
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 13px 0 5px;
  border-radius: 999px; background: linear-gradient(90deg, #ff9f4a 0%, #ffd08a 100%);
  color: var(--wl-brown); font-size: 14px; font-weight: 800; line-height: 1; white-space: nowrap;
  box-shadow: 0 6px 18px rgba(255, 160, 70, .4);
  opacity: 0; pointer-events: none; transform: translateY(14px) scale(.9);
}
.wallet-chip-ico { width: 22px; height: 22px; margin: -2px 0; object-fit: contain; }
.wallet-chip.is-on { animation: walletChip 1.8s cubic-bezier(.2, .8, .2, 1) forwards; }
/* No room above the pill (on a phone the pill sits 20 px from the top of the screen): the chip hangs directly under the pill and floats down. */
.wallet-chip.is-below { bottom: auto; top: calc(100% + 6px); }
.wallet-chip.is-below.is-on { animation-name: walletChipDown; }
@keyframes walletChipDown {
  0%   { opacity: 0; transform: translateY(-14px) scale(.85); }
  16%  { opacity: 1; transform: translateY(0) scale(1); }
  78%  { opacity: 1; transform: translateY(7px) scale(1); }
  100% { opacity: 0; transform: translateY(13px) scale(.98); }
}
@keyframes walletChip {
  0%   { opacity: 0; transform: translateY(14px) scale(.85); }
  16%  { opacity: 1; transform: translateY(0) scale(1); }
  78%  { opacity: 1; transform: translateY(-3px) scale(1); }
  100% { opacity: 0; transform: translateY(-7px) scale(.98); }
}
.wallet-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Hover panel (desktop) ──────────────────────────────────────── */
.wallet-panel {
  position: absolute; right: 0; top: calc(100% + 15px); z-index: 400;
  width: 388px; max-width: calc(100vw - 24px);
  padding: 18px 20px 14px;
  background: var(--wl-panel); border: 1px solid var(--wl-line); border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.wallet-panel::before { content: ""; position: absolute; left: 0; right: 0; top: -18px; height: 18px; }
.wallet.is-open .wallet-panel { opacity: 1; visibility: visible; transform: none; }

/* ── Wallet body (panel and mobile card share this) ─────────────── */
.wl { color: #e8ecf7; font-size: 13px; line-height: 1.35; }
.wl a { -webkit-tap-highlight-color: transparent; }
.wl-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.wl-title { font-size: 12.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--wl-gold); }
.wl-how { font-size: 12px; font-weight: 600; color: #fff; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.wl-how:hover { color: var(--wl-gold); }

.wl-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wl-card { display: flex; flex-direction: column; padding: 14px 12px 12px; background: var(--wl-card); border: 1px solid rgba(255, 255, 255, .09); border-radius: 12px; min-width: 0; }
.wl-card-top { display: flex; align-items: center; gap: 8px; }
.wl-ico { width: 24px; height: 24px; margin: -3px; object-fit: contain; flex: 0 0 auto; }
.wl-card-label { font-size: 12px; font-weight: 600; color: #e6eaf5; }
.wl-card-val { margin-top: 10px; font-size: 28px; font-weight: 800; line-height: 1.1; color: #fff; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.wl-card-desc { margin: 8px 0 12px; min-height: 2.8em; font-size: 11.5px; line-height: 1.4; color: var(--wl-muted); }
.wl-btn {
  display: flex; align-items: center; justify-content: center; margin-top: auto; height: 36px; padding: 0 8px;
  border-radius: 8px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap; transition: filter .15s ease, background .15s ease, border-color .15s ease;
}
.wl-btn-gold { background: var(--wl-gold-grad); color: var(--wl-brown); }
.wl-btn-gold:hover { filter: brightness(1.07); }
.wl-btn-dark { background: #242c45; color: #fff; border: 1px solid rgba(255, 255, 255, .08); }
.wl-btn-dark:hover { background: #2d3656; border-color: rgba(255, 215, 143, .35); }
.wl-btn:focus-visible, .wl-row:focus-visible, .wl-how:focus-visible { outline: 2px solid rgba(255, 215, 132, .7); outline-offset: 2px; }

.wl-next { margin-top: 14px; }
.wl-next[hidden], .wl-earn[hidden] { display: none; }
.wl-next-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 7px; font-size: 12px; }
.wl-next-label { min-width: 0; color: #dfe5f4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-next-val { color: var(--wl-gold); font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wl-bar { height: 7px; border-radius: 999px; background: #272f48; overflow: hidden; }
.wl-bar-fill { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--wl-gold-grad); transition: width .6s cubic-bezier(.2, .8, .2, 1); }

.wl-earn { margin-top: 16px; }
.wl-earn-title { margin-bottom: 8px; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #a4afca; }
.wl-earn-list { display: flex; flex-direction: column; gap: 8px; }
.wl-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: rgba(255, 255, 255, .02); border: 1px solid var(--wl-line); border-radius: 9px;
  color: #fff; font-size: 13px; font-weight: 600; text-decoration: none;
  transition: border-color .15s ease, background .15s ease;
}
.wl-row.is-featured { border-color: rgba(255, 255, 255, .34); }
a.wl-row:hover { border-color: rgba(255, 215, 143, .55); background: rgba(255, 215, 143, .05); }
.wl-row-label { flex: 1 1 auto; min-width: 0; }
.wl-row-pts { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; color: var(--wl-gold); font-size: 12.5px; font-weight: 800; white-space: nowrap; }
.wl-row-pts img { width: 20px; height: 20px; margin: -3px; object-fit: contain; }

.wl-foot { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 11px; color: var(--wl-muted); }
.wl-foot a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }

.wl-mobile { display: none; }

/* ── Desktop header that stays on one line ──────────────────────── */
/* The header column is min(100vw, 160vh) wide: on a laptop with a low browser window it is narrow, so the menu labels must never break
   onto two lines ("New / Casinos") and the spacing tightens in steps. */
.nav-item > a { white-space: nowrap; }
@media (min-width: 901px) and (max-width: 1260px), (min-width: 901px) and (max-height: 787px) {
  .nav-list { gap: 16px; }
  .age-header { margin: 0 8px; }
  .actions { gap: 8px; }
  .wallet-pill { height: 38px; padding: 0 14px 0 10px; gap: 10px; font-size: 14px; }
  .user-trigger { width: 38px; height: 38px; }
  .notif-bell-toggle { width: 34px; height: 34px; }
}
@media (min-width: 901px) and (max-width: 1152px), (min-width: 901px) and (max-height: 720px) {
  .nav-list { gap: 10px; }
  .nav-item { font-size: .85rem; }
  .logo img { height: 62px; }
  .site-header .container { gap: .6rem; }
  .wallet-pill { padding: 0 12px 0 8px; gap: 8px; font-size: 13.5px; }
}

@media (min-width: 901px) and (max-width: 1000px), (min-width: 901px) and (max-height: 625px) {
  .nav-list { gap: 8px; }
  .nav-item { font-size: .8rem; }
  .logo img { height: 54px; }
  .age-header { margin: 0 4px; }
  .site-header .container { gap: .4rem; }
  .wallet-pill { padding: 0 10px 0 6px; gap: 6px; font-size: 13px; }
  .wallet-seg { gap: 5px; }
  .nav-item.dropdown .dropdown-menu-wrapper { top: 104px; } /* the header is lower here, the menu panel follows it */
}

/* ── Account button (replaces avatar + name + chevron) ──────────── */
.user-trigger {
  width: 42px; height: 42px; padding: 0; max-width: none; gap: 0; justify-content: center;
  border-radius: 12px; border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .06); color: #cdd5e8;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}
.user-trigger:hover, .user-menu.open .user-trigger { color: #fff; border-color: rgba(255, 215, 143, .6); background: rgba(255, 255, 255, .1); }
.user-trigger .user-avatar { width: 32px; height: 32px; }
.user-silhouette { display: block; }

/* ── Login button for visitors ──────────────────────────────────── */
.login.login-cta {
  height: 41px; padding: 0 22px 0 12px; gap: 10px; border-radius: 999px;
  background: var(--wl-gold-grad); color: var(--wl-brown);
  font-family: inherit; /* the old .login rule sets Open Sans, which the site only loads in 400 / 600 */
  font-size: 14px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; white-space: nowrap;
  box-shadow: 0 6px 18px rgba(243, 166, 90, .22);
  transition: filter .15s ease, box-shadow .15s ease;
}
.login.login-cta:hover { filter: brightness(1.06); box-shadow: 0 8px 22px rgba(243, 166, 90, .32); }
.login.login-cta:focus-visible { outline: 2px solid rgba(255, 215, 132, .7); outline-offset: 3px; }
.login-cta-ico { width: 26px; height: 26px; margin: -2px; object-fit: contain; flex: 0 0 auto; }
.login-cta-short { display: none; }

/* ── Mobile / tablet: pill in the header, wallet card in the menu ── */
@media (max-width: 900px) {
  .wallet-panel { display: none; }
  .wallet-pill { height: 40px; padding: 0 13px 0 9px; gap: 9px; font-size: 15px; }
  .wallet-sep { height: 18px; }
  .user-trigger { width: 36px; height: 36px; border: 0; background: transparent; border-radius: 10px; }
  .user-trigger:hover, .user-menu.open .user-trigger { background: rgba(255, 255, 255, .08); }
  .user-trigger .user-avatar { width: 30px; height: 30px; }
  .user-silhouette { width: 26px; height: 26px; }
  .login.login-cta { height: 40px; padding: 0 16px 0 10px; font-size: 13px; }

  /* the menu slides over the header and the burger sits to its right, so it needs no 72px of empty space above Home */
  .age-header { flex: 0 0 auto; width: auto; height: auto; margin: 0 8px; }
  .age-header img { display: block; width: 40px; height: 40px; }
  .mobile-nav { display: flex; flex-direction: column; padding-top: 8px; }
  .mobile-nav > ul { flex: 0 0 auto; }
  .wl-mobile {
    display: block; margin: auto 14px 8px; padding: 16px 15px 14px; flex: 0 0 auto;
    background: #171d2e; border: 1px solid rgba(243, 166, 90, .55); border-radius: 18px;
  }
  .wl-mobile .wl-head { margin-bottom: 12px; }
  .wl-mobile .wl-title { font-size: 12.5px; letter-spacing: .06em; white-space: nowrap; }
  .wl-mobile .wl-how { font-size: 13px; }
  .wl-mobile .wl-cards { gap: 14px; }
  .wl-mobile .wl-card {
    display: grid; grid-template-columns: auto 1fr; grid-template-areas: "ico val" "btn btn";
    align-items: center; column-gap: 10px; row-gap: 12px; padding: 0; background: none; border: 0; border-radius: 0;
  }
  .wl-mobile .wl-card-top { display: contents; }
  .wl-mobile .wl-ico { grid-area: ico; width: 26px; height: 26px; margin: -3px; }
  .wl-mobile .wl-card-label, .wl-mobile .wl-card-desc, .wl-mobile .wl-earn-title { display: none; }
  .wl-mobile .wl-card-val { grid-area: val; margin: 0; font-size: 22px; }
  .wl-mobile .wl-btn { grid-area: btn; height: 40px; margin: 0; font-size: 12.5px; }
  .wl-mobile .wl-next { margin-top: 14px; }
  .wl-mobile .wl-next-row { font-size: 13px; }
  .wl-mobile .wl-bar { height: 8px; }
  .wl-mobile .wl-earn { margin-top: 14px; }
  .wl-mobile .wl-row { padding: 11px 13px; font-size: 14px; line-height: 1.25; border-radius: 12px; border-color: rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .03); }
  .wl-mobile .wl-row ~ .wl-row { display: none; }
  .wl-mobile .wl-row-pts { font-size: 14px; }
  .wl-mobile .wl-foot { margin-top: 12px; padding-top: 0; border-top: 0; font-size: 12px; }
}

@media (max-width: 640px) {
  .login-cta-long { display: none; }
  .login-cta-short { display: inline; }
}

/* Phones: logo + 18+ + bell + pill + account + burger all have to fit in 360px */
@media (max-width: 440px) {
  .site-header .container { gap: 3px; padding-left: 12px; padding-right: 12px; }
  .age-header { margin: 0 0 0 3px; }
  .actions { gap: 4px; }
  .wallet-pill { height: 36px; padding: 0 8px 0 5px; gap: 6px; font-size: 13px; }
  .wallet-seg { gap: 4px; }
  .wallet-ico { width: 22px; height: 22px; margin: -2px; }
  .wallet-sep { height: 16px; }
  .wallet-chip { height: 26px; font-size: 13px; }
  .user-trigger { width: 30px; height: 30px; }
  .user-trigger .user-avatar { width: 26px; height: 26px; }
  .user-silhouette { width: 24px; height: 24px; }
  .notif-bell-toggle { width: 30px; height: 30px; }
  .nav-burger { width: 38px; height: 38px; padding: 7px; }
  .login.login-cta { height: 36px; padding: 0 12px 0 8px; font-size: 12.5px; gap: 6px; }
}
@media (max-width: 380px) {
  .age-header img { width: 36px; height: 36px; }
  .wallet-pill { padding: 0 7px 0 4px; gap: 5px; font-size: 12.5px; }
  .wallet-seg { gap: 3px; }
  .wallet-ico { width: 20px; height: 20px; margin: -2px; }
  .wallet-sep { height: 14px; }
  .notif-bell-toggle, .user-trigger { width: 28px; height: 28px; }
  .user-trigger .user-avatar { width: 24px; height: 24px; }
  .user-silhouette { width: 22px; height: 22px; }
}
@media (max-width: 340px) {
  .notif-bell { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .wallet-chip.is-on, .wallet-chip.is-below.is-on { animation: walletChipStill 1.8s linear forwards; }
  .wl-bar-fill, .wallet-panel { transition: none; }
}
@keyframes walletChipStill {
  0% { opacity: 0; transform: none; }
  10%, 80% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: none; }
}
