
/* MAXNOW v22 final stability patch */

/* Use the browser-native language selector.
   This avoids conflicts between the old custom picker and repeated JS handlers. */
.footer-language #languageSelect{
  display:block!important;
  width:100%!important;
  max-width:220px!important;
  height:44px!important;
  padding:0 38px 0 13px!important;
  border:1px solid rgba(255,255,255,.10)!important;
  border-radius:11px!important;
  background:#111b2b!important;
  color:#eef5ff!important;
  font-weight:850!important;
  cursor:pointer!important;
  pointer-events:auto!important;
  position:relative!important;
  z-index:9999!important;
}
.footer-language #languageSelect:focus{
  outline:2px solid rgba(0,236,119,.35)!important;
  outline-offset:1px!important;
}
.footer-language .language-picker{
  display:none!important;
}

/* Footer must remain visible/clickable above decorative layers. */
.site-footer,
.footer-main,
.footer-language{
  overflow:visible!important;
}
.site-footer{
  position:relative!important;
  z-index:20!important;
}
.footer-language{
  position:relative!important;
  z-index:100!important;
  pointer-events:auto!important;
}

/* Keep the page top clean after refresh/navigation. */
html,body{
  scroll-margin-top:0!important;
}

/* Preserve sidebar/hero/footer crown-logo alignment. */
.maxnow-brand,
.footer-maxnow-brand,
.hero-brand{
  display:flex!important;
  align-items:center!important;
}
.maxnow-brand .brand-word,
.footer-maxnow-brand .brand-word,
.hero-brand strong{
  line-height:1!important;
}
.sidebar{
  overflow-x:hidden!important;
}
.sidebar .maxnow-brand{
  width:100%!important;
  padding-left:16px!important;
  padding-right:10px!important;
}
.sidebar .maxnow-brand-mark{
  width:46px!important;
  height:46px!important;
  object-fit:contain!important;
  flex:0 0 46px!important;
}
.footer-maxnow-brand .maxnow-brand-mark{
  width:46px!important;
  height:46px!important;
  object-fit:contain!important;
}

/* Mobile: compact top bar and no clipped notification panel. */
@media(max-width:820px){
  .topbar{
    min-height:60px!important;
    height:auto!important;
    padding:6px 8px!important;
    gap:6px!important;
    overflow:visible!important;
  }
  .notify-panel{
    position:fixed!important;
    top:70px!important;
    left:10px!important;
    right:10px!important;
    width:auto!important;
    max-width:none!important;
    max-height:calc(100vh - 86px)!important;
    overflow:auto!important;
    z-index:99999!important;
  }
  .footer-language #languageSelect{
    max-width:100%!important;
  }
  .site-footer{
    padding-bottom:90px!important;
  }
}

/* MAXNOW v26 desktop visual / carousels / community chat */
@media (min-width: 1000px){
  .hero{position:relative;overflow:hidden;background:linear-gradient(90deg,#071321 0%,#071321 29%,#06101b 55%,#06101b 100%)!important}
  .hero-content{position:relative;z-index:2;width:34%;min-width:390px}
  .hero-reference-visual{position:absolute!important;z-index:1;left:29%!important;right:0!important;top:0!important;bottom:0!important;width:auto!important;height:auto!important;overflow:hidden}
  .hero-reference-visual:before{content:"";position:absolute;z-index:2;inset:0;background:linear-gradient(90deg,#071321 0%,rgba(7,19,33,.78) 7%,rgba(7,19,33,.08) 28%,transparent 50%)}
  .hero-reference-visual img{width:100%!important;height:100%!important;object-fit:cover!important;object-position:center!important;filter:saturate(1.08) contrast(1.05)}
  body.chat-open .main{padding-right:360px;transition:padding-right .22s ease}
}
.section-head{align-items:flex-end!important}
.row-actions{display:flex;align-items:center;gap:8px}
.row-arrow{width:36px;height:36px;border:1px solid #243348;border-radius:50%;background:#111d2c;color:#fff;font-size:25px;cursor:pointer}
.publisher-shelf,.poster-shelf{scroll-behavior:smooth;overflow-x:auto!important;scrollbar-width:none}
.publisher-shelf::-webkit-scrollbar,.poster-shelf::-webkit-scrollbar{display:none}
.publisher-card{flex:0 0 178px}
.poster-card{flex:0 0 176px}
.chat-toggle{font-size:17px!important}
.community-chat{position:fixed;z-index:9997;right:0;top:0;bottom:0;width:360px;background:#111b27;border-left:1px solid #263547;box-shadow:-18px 0 45px rgba(0,0,0,.38);transform:translateX(102%);transition:transform .22s ease;display:flex;flex-direction:column;color:#fff}
.community-chat.open{transform:translateX(0)}
.chat-head{height:64px;display:flex;align-items:center;justify-content:space-between;padding:0 18px;border-bottom:1px solid #263547;font-size:18px}
.chat-head button{border:0;background:none;color:#fff;font-size:30px;cursor:pointer}
.chat-channels{padding:8px;border-bottom:1px solid #263547;max-height:310px;overflow:auto}
.chat-channels button{width:100%;display:grid;grid-template-columns:28px 1fr auto;gap:8px;align-items:center;border:0;background:transparent;color:#fff;padding:10px;border-radius:9px;text-align:left;cursor:pointer}
.chat-channels button.active,.chat-channels button:hover{background:#1c2b3d}
.chat-channels b{font-size:12px;color:#c6d1df}
.chat-messages{flex:1;overflow:auto;padding:14px}
.chat-messages>div{margin-bottom:15px}
.chat-messages b{font-size:13px}.chat-messages small{margin-left:8px;color:#8393a8}
.chat-messages p{display:inline-block;margin:6px 0 0;padding:9px 11px;background:#1c2a39;border-radius:8px;font-size:13px;color:#e8eef6}
.chat-compose{margin:12px;border:1px solid #2b3b4f;border-radius:12px;padding:8px;display:flex;gap:8px}
.chat-compose input{flex:1;border:0;outline:0;background:transparent;color:#fff;padding:8px}
.chat-compose button{width:38px;border:0;border-radius:9px;background:#00e98a;color:#03130d;font-size:18px}
@media(max-width:999px){
 .community-chat{width:min(92vw,360px)}
 .row-actions .more{display:inline-flex!important}
 .row-arrow{display:inline-flex;align-items:center;justify-content:center}
}
/* MAXNOW v27 layout correction: chat overlays, hero is one seamless banner */
@media (min-width:1000px){
  body.chat-open .main{padding-right:0!important;transition:none!important}
  .hero{min-height:470px!important;height:470px!important;padding:0!important;border-radius:22px!important;overflow:hidden!important;background:#06111d!important;display:block!important}
  .hero-reference-visual{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;left:0!important;right:0!important;top:0!important;bottom:0!important;z-index:0!important}
  .hero-reference-visual:before{content:""!important;position:absolute!important;z-index:1!important;inset:0!important;background:linear-gradient(90deg,#071321 0%,rgba(7,19,33,.97) 18%,rgba(7,19,33,.78) 31%,rgba(7,19,33,.20) 49%,rgba(7,19,33,.03) 68%,rgba(7,19,33,.12) 100%)!important;pointer-events:none}
  .hero-reference-visual img{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;object-fit:cover!important;object-position:64% 50%!important;display:block!important}
  .hero-content{position:relative!important;z-index:3!important;width:42%!important;min-width:470px!important;height:100%!important;padding:58px 0 40px 62px!important;box-sizing:border-box!important;display:flex!important;flex-direction:column!important;justify-content:center!important}
  .hero-brand{display:none!important}
  .hero h1{font-size:48px!important;line-height:1.16!important;margin:14px 0 14px!important}
  .hero p{max-width:470px!important;line-height:1.55!important;margin-bottom:24px!important}
  .community-chat{width:360px!important;z-index:10000!important}
}


/* MAXNOW v28 */
@media (min-width:1000px){
  .main{min-width:0!important}
  .hero{
    height:480px!important;min-height:480px!important;margin:22px 34px 0!important;padding:0!important;
    position:relative!important;overflow:hidden!important;display:block!important;
    background-image:
      linear-gradient(90deg,rgba(5,15,27,.97) 0%,rgba(5,15,27,.91) 20%,rgba(5,15,27,.60) 38%,rgba(5,15,27,.14) 58%,rgba(5,15,27,.04) 100%),
      url('../img/maxnow-hero-roulette-v26.jpg')!important;
    background-size:cover!important;background-position:center center!important;background-repeat:no-repeat!important
  }
  .hero:before{display:none!important}
  .hero-reference-visual{display:none!important}
  .hero-content{
    position:relative!important;z-index:3!important;width:43%!important;min-width:520px!important;height:100%!important;
    padding:54px 0 40px 58px!important;box-sizing:border-box!important;display:flex!important;flex-direction:column!important;
    justify-content:center!important;align-items:flex-start!important;text-align:left!important
  }
  .hero-brand{display:none!important}
  .hero h1{font-size:48px!important;line-height:1.12!important;margin:14px 0!important;text-align:left!important}
  .hero p{max-width:500px!important;margin:0 0 24px!important;text-align:left!important}
  .hero-actions{justify-content:flex-start!important}

  .section{width:auto!important;max-width:none!important}
  .publisher-shelf,.poster-shelf{
    width:100%!important;max-width:100%!important;display:flex!important;gap:12px!important;overflow-x:auto!important;padding-right:4px!important
  }
  .publisher-card{flex:0 0 calc((100% - 7*12px)/8)!important;min-width:150px!important}
  #liveShelf .poster-card,#slotShelf .poster-card{flex:0 0 calc((100% - 7*12px)/8)!important;min-width:155px!important}
  .row-actions{margin-left:auto!important}
  .row-actions .more,.row-arrow{display:inline-flex!important;align-items:center!important;justify-content:center!important}
}
.side-live-panel{margin:22px 15px 12px;padding:4px;color:#fff}
.side-live-title{color:#00ec77;font-size:12px;font-weight:950}
.side-live-sub{margin:5px 0 13px;color:#c7d3e4;font-size:11px;font-weight:800}
.winner-mini{display:flex;gap:9px;align-items:center;margin:10px 0}
.winner-mini>span{width:34px;height:34px;display:grid;place-items:center;border-radius:8px;background:#162338;font-size:18px}
.winner-mini div{min-width:0;display:grid;line-height:1.1}.winner-mini b{font-size:11px}.winner-mini small{font-size:9px;color:#9cadc1;margin:2px 0}.winner-mini strong{font-size:10px;color:#ffd748}
.telegram-mini{margin-top:18px;padding:12px;border:1px solid #223248;border-radius:12px;background:#0d1827;display:flex;align-items:center;justify-content:space-between;text-decoration:none!important}
.telegram-mini span{display:grid}.telegram-mini b{font-size:10px;color:#dce7f6}.telegram-mini strong{font-size:11px;color:#00ec77}.telegram-mini small{font-size:9px;color:#9cadc1}.telegram-mini i{width:36px;height:36px;display:grid;place-items:center;border-radius:50%;background:#159fe8;color:#fff;font-style:normal}
@media(min-width:1000px){.side-foot{display:none!important}}
.chat-language-current{margin:10px 10px 6px;width:calc(100% - 20px);height:46px;padding:0 12px;border:1px solid #29394d;border-radius:10px;background:#192638;color:#fff;display:flex;align-items:center;justify-content:space-between;cursor:pointer}
.chat-language-current span{display:flex;align-items:center;gap:9px}.chat-language-current i{font-style:normal}.chat-language-current b{font-size:13px}.chat-language-current em{font-style:normal;color:#8fa2b9}
.chat-channels[hidden]{display:none!important}
.chat-channels{position:absolute!important;top:116px!important;left:10px!important;right:10px!important;z-index:3!important;max-height:330px!important;padding:6px!important;border:1px solid #2a394b!important;border-radius:10px!important;background:#141f2c!important;box-shadow:0 16px 35px rgba(0,0,0,.42)!important}
.bet-history-panel{position:fixed;z-index:10020;inset:0;background:rgba(2,8,16,.72);display:none;align-items:center;justify-content:center;padding:24px}
.bet-history-panel.open{display:flex}.bet-history-card{width:min(860px,94vw);max-height:86vh;overflow:auto;border:1px solid #26374c;border-radius:18px;background:#101b2a;box-shadow:0 24px 70px rgba(0,0,0,.55);padding:22px}
.bet-history-head{display:flex;align-items:center;justify-content:space-between}.bet-history-head h2{margin:4px 0 0;color:#fff}.bet-history-head button{border:0;background:none;color:#fff;font-size:30px;cursor:pointer}
.bet-history-tabs{display:flex;gap:8px;margin:20px 0}.bet-history-tabs button{height:38px;padding:0 18px;border:1px solid #26374c;border-radius:9px;background:#142235;color:#9fb0c6;font-weight:800}.bet-history-tabs button.active{background:#00ec77;color:#07140e;border-color:#00ec77}
.bet-table{border:1px solid #233448;border-radius:12px;overflow:hidden}.bet-row{display:grid;grid-template-columns:1.1fr 2fr 1fr 1fr;padding:12px 16px;gap:12px}.bet-row-head{background:#162538;color:#94a8c2;font-size:12px;font-weight:900}
.bet-empty{min-height:180px;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#fff;gap:7px}.bet-empty small{color:#8295ad}
@media(max-width:999px){.side-live-panel{display:none}.hero-reference-visual{display:block}}


/* v45: precise MAXNOW alignment + desktop collapsible sidebar + roomier live panel */
.sidebar .maxnow-brand{gap:7px!important;align-items:center!important;}
.sidebar .maxnow-brand-mark{transform:translateY(-4px)!important;}
.sidebar .maxnow-brand .brand-word{display:inline-flex!important;align-items:center!important;line-height:1!important;transform:translateY(0)!important;white-space:nowrap!important;}
.footer-maxnow-brand{gap:8px!important;align-items:center!important;}
.footer-maxnow-brand .maxnow-brand-mark{transform:translateY(-4px)!important;}
.footer-maxnow-brand .brand-word{display:inline-flex!important;align-items:center!important;line-height:1!important;}
.hero-brand{gap:8px!important;align-items:center!important;}
.hero-brand img{transform:translateY(-4px)!important;}
.side-live-panel .telegram-mini{margin-top:30px!important;}

@media (min-width:821px){
  .mobile-menu{display:grid!important;place-items:center!important;width:42px!important;height:42px!important;border-radius:12px!important;border:1px solid #27384d!important;background:#182536!important;color:#dce7f5!important;font-size:22px!important;cursor:pointer!important;flex:0 0 42px!important;}
  body.sidebar-collapsed .sidebar{transform:translateX(-100%)!important;}
  body.sidebar-collapsed .main{margin-left:0!important;width:100%!important;}
  .sidebar,.main{transition:transform .24s ease,margin-left .24s ease,width .24s ease!important;}
}

/* BC-style betting history proportions */
#betHistory .bet-history-card{width:100%!important;max-width:none!important;background:#161d1d!important;border-color:#2b3535!important;}
#betHistory .bet-row{grid-template-columns:1.35fr 1.15fr 1fr 1fr!important;min-height:48px!important;}
#betHistory .bet-row-head{background:#202929!important;border-radius:10px!important;color:#9eafb0!important;}
#betHistory .bet-empty{min-height:190px!important;display:grid!important;place-items:center!important;text-align:center!important;}


/* v226 live chat / legal / vault */
.chat-channels button{grid-template-columns:28px 1fr!important}
.chat-channels button>b{display:none!important}
.live-chat-float{position:fixed;right:22px;bottom:22px;z-index:9990;border:1px solid rgba(0,236,119,.35);border-radius:999px;background:#00ec77;color:#03130d;height:48px;padding:0 18px;display:flex;align-items:center;gap:8px;font-weight:950;box-shadow:0 12px 34px rgba(0,0,0,.38);cursor:pointer}
.legal-panel{position:relative;width:min(720px,calc(100vw - 28px));max-height:min(78vh,720px);overflow:auto;background:#111c2d;border:1px solid #2a394b;border-radius:18px;padding:28px;color:#eef4ff;box-shadow:0 24px 70px rgba(0,0,0,.55)}
.legal-panel h2{margin:0 44px 18px 0;font-size:25px}.legal-body{white-space:pre-line;line-height:1.9;color:#b9c7d9;font-size:14px}.legal-panel .modal-close{position:absolute;right:18px;top:14px}
@media(max-width:640px){.live-chat-float{right:14px;bottom:14px;width:48px;padding:0;justify-content:center}.live-chat-float span{display:none}}
/* v230: keep official LiveChat entry visible */
#maxnowLiveChatRestore{position:fixed;right:20px;bottom:20px;z-index:10050;width:54px;height:54px;border:0;border-radius:50%;background:#ff6b00;color:#fff;font-size:24px;display:grid;place-items:center;box-shadow:0 10px 28px rgba(0,0,0,.35);cursor:pointer}
@media(max-width:820px){#maxnowLiveChatRestore{right:12px;bottom:12px;width:50px;height:50px}}

/* v-final: deposit warning wrapping + hide external LiveChat launcher while community chat is open */
.deposit-warning,.deposit-notice,#depositWarning{display:block!important;width:100%!important;max-width:100%!important;white-space:normal!important;word-break:normal!important;overflow-wrap:anywhere!important;line-height:1.55!important;}
body.chat-open #chat-widget-container,body.chat-open #chat-widget,body.chat-open [data-id="chat-widget-container"],body.chat-open iframe[title*="chat" i]{visibility:hidden!important;opacity:0!important;pointer-events:none!important;}

/* v-final2: keep deposit warning icon/text on one row + hide orange LiveChat restore while chat drawer is open */
.deposit-warning{
  display:grid!important;
  grid-template-columns:18px minmax(0,1fr)!important;
  align-items:center!important;
  column-gap:10px!important;
  width:100%!important;
  max-width:100%!important;
  white-space:normal!important;
  word-break:normal!important;
  overflow-wrap:break-word!important;
  line-height:1.45!important;
}
.deposit-warning>span{align-self:center!important;margin:0!important;}
.deposit-warning p{margin:0!important;min-width:0!important;}
body.chat-open #maxnowLiveChatRestore{display:none!important;}

/* v233: one LiveChat entry button only; prevent launcher/bubble overlap. */
#maxnowLiveChatRestore{isolation:isolate!important}
body.chat-open #maxnowLiveChatRestore{display:none!important}
@media(max-width:820px){#maxnowLiveChatRestore{right:14px!important;bottom:14px!important}}


/* v121 — notification drawer behaves like chat: fixed viewport drawer, internal scroll only */
body.notify-open{overflow-y:auto!important;overscroll-behavior:auto!important;}
#notifyPanel.notify-panel{position:fixed!important;top:0!important;right:0!important;bottom:0!important;left:auto!important;width:360px!important;max-width:min(92vw,360px)!important;height:100dvh!important;max-height:100dvh!important;overflow:hidden!important;overscroll-behavior:contain!important;}
#notifyPanel .notify-scroll{overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain!important;scrollbar-width:none!important;-ms-overflow-style:none!important;}
#notifyPanel .notify-scroll::-webkit-scrollbar{width:0!important;height:0!important;display:none!important;}
@media(max-width:820px){#notifyPanel.notify-panel{top:0!important;right:0!important;bottom:0!important;left:auto!important;width:min(92vw,360px)!important;max-width:min(92vw,360px)!important;height:100dvh!important;max-height:100dvh!important;overflow:hidden!important;}}
