/* Mobile / small-screen layout fixes (loaded after xmas-theme.css) */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

@media (max-width: 767px) {
  .container {
    width: 100%;
    max-width: 100%;
  }

  /* ---- top bar: tools on the first row, login/register below ---- */
  .topbar-container .container > .row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }
  .topbar-container .topbar-left-container,
  .topbar-container .topbar-right-container {
    float: none;
    width: 100%;
  }
  .topbar-container .topbar-left-container { display: flex; justify-content: center; flex-wrap: wrap; }
  .topbar-container .topbar-right-container { margin: 6px 0 8px; }
  .topbar-container .login-panel { display: flex; justify-content: center; gap: 10px; width: 100%; }
  .topbar-container .login-panel-item { flex: 1 1 0; max-width: 180px; width: auto; }
  .topbar-container .login-panel-item a { display: block; width: 100%; text-align: center; }

  /* ---- header: smaller logo, swipeable menu with readable items ---- */
  .site-header .logo:not(#_) {
    display: table;
    width: auto;
    margin: 0 auto;
    padding: 8px 0 2px;
  }
  .site-header .logo > img,
  .site-header .logo > picture {
    position: static;
    transform: none;
    margin: 0 auto;
    width: 240px !important;
    height: auto !important;
    max-width: 70vw !important;
    max-height: none !important;
  }
  .site-header .logo > picture img { width: 100% !important; height: auto !important; max-height: none !important; }
  .site-header .logo:not(#_) { padding-bottom: 8px; }
  .site-header .col-sm-3,
  .site-header .col-sm-9 { padding-left: 8px; padding-right: 8px; }
  .menu-slide > i { margin-left: 0; margin-right: 0; }
  .menu-slide > i.glyphicon-chevron-left { margin-right: 4px; }
  .menu-slide > i.glyphicon-chevron-right { margin-left: 4px; }
  .top-menu > li { flex: 0 0 calc(100% / 5.5); min-width: 62px; }
  .top-menu > li > a { padding: 10px 0 12px; font-size: 11px; line-height: 1.25; }
  .top-menu > li > a > img { height: 28px; width: 28px; margin-bottom: 4px; }

  /* ---- announcement bar: title + date on one line, ticker below ---- */
  .announcement-container {
    flex-wrap: wrap;
    gap: 6px 10px;
    padding: 10px 12px;
    margin: 10px 0;
  }
  .announcement-container > [data-section="title"] { order: 1; }
  .announcement-container > [data-section="date"] {
    order: 2;
    margin-left: auto;
    font-size: 12px;
    text-align: right;
  }
  .announcement-container > [data-section="announcements"] {
    order: 3;
    width: 100%;
    flex: 0 0 100%;
  }

  /* ---- progressive jackpot + Nex4D: stacked, fitted to the screen ---- */
  .home-inner-container {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 20px;
  }
  .home-inner-container [data-section="jackpot"],
  .home-inner-container [data-section="lottery"] {
    width: 100%;
    min-width: 0;
  }
  .home-progressive-jackpot { padding: 6px; border-radius: 22px; }
  .home-progressive-jackpot .outer-container,
  .home-progressive-jackpot .inner-container,
  .home-progressive-jackpot .border-container { padding: 5px; }
  .home-progressive-jackpot .outer-container,
  .home-progressive-jackpot .inner-container,
  .home-progressive-jackpot .border-container { border-radius: 60px; }
  .home-progressive-jackpot .border-container { gap: 6px; min-width: 0; }
  .home-progressive-jackpot .jackpot-play-section { margin-left: 8px; flex: 0 0 auto; }
  .home-progressive-jackpot .jackpot-play-section img { width: 40px; }
  .home-progressive-jackpot .jackpot-play-section .jackpot-play-text { font-size: 13px; }
  .home-progressive-jackpot .jackpot-container {
    min-width: 0;
    flex: 1 1 auto;
    font-size: clamp(15px, 5.4vw, 26px);
    letter-spacing: 1px;
    padding: 4px;
    border-radius: 40px;
  }
  .home-progressive-jackpot .jackpot-inner-container { padding: 4px; border-radius: 30px; min-width: 0; }
  .home-progressive-jackpot .jackpot-border-container {
    border-radius: 30px;
    line-height: 1.5;
    padding: 2px 8px 4px;
    min-width: 0;
    white-space: nowrap;
  }
  .home-progressive-jackpot .jackpot-currency { margin-right: 5px; }

  /* ---- popular slots: title/winners on top, provider tabs below ---- */
  .popular-games {
    flex-direction: column;
    position: relative;
    overflow: hidden;
    margin-bottom: 18px;
  }
  .popular-games [data-section="left"] { margin-right: 0; }
  .popular-games [data-section="left"] .section-title { font-size: 17px; height: 46px; }
  .popular-games [data-section="right"] { width: 100%; }
  .popular-games [data-section="left"] > a { display: block; }
  .popular-games [data-section="left"] > a img { width: 100%; height: auto; }
  .popular-games .scrtabs-tab-container,
  .popular-games .scrtabs-tabs-fixed-container { width: auto !important; }
  .popular-games .scrtabs-tab-container { display: flex; align-items: stretch; }
  .popular-games .scrtabs-tabs-fixed-container { flex: 1 1 auto; min-width: 0; }
  .popular-games .animated-image { display: none; }
  .popular-games .popular-game-list { padding: 0 6px; }

  /* ---- download APK: phone image on top{
    flex-direction: column;
    gap: 16px;
    padding: 18px 0;
  }

  /* ---- footer ---- */
  .footer-sitemap-section {
    flex-wrap: wrap;
    gap: 20px 12px;
    padding-right: 0;
  }
  .footer-sitemap-section > div { flex: 1 1 42%; min-width: 130px; }
  .footer-featured-product-section > div { width: 100%; margin-bottom: 10px; }
  .footer-banking-section .banking-footer-section .bank-service-container {
    grid-template-columns: 1fr;
    margin: 14px;
    gap: 10px;
  }
  .footer-banking-section .bank-list-container { margin: 14px; padding: 14px; }
  .footer-banking-section .bank-list { justify-content: center; }
  .footer-copyright-section .col-md-12 {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
  }
  .footer-copyright-section .col-md-12 .copyright { margin-left: 0; }
  .supported-browser-container { justify-content: center; }
  .footer-links { text-align: center; }
  .footer-sitemap-section .footer-links { text-align: left; }
  .hover-list { justify-content: center; }
  .hover-list img { max-width: 100%; height: auto; }
}