/* ============================================================
   Blackmart — koreksi layout (dimuat SETELAH mobile.css / beta.css)
   Nilai diambil dari pengukuran getComputedStyle situs referensi.
   ============================================================ */

/* ---------- Baris game mobile ----------
   Geometri referensi (hasil ukur getComputedStyle):
   .bigger-game-list          : 390px, flex row (chevron + list + chevron)
   .game-list                 : 358px, display flex, overflow-x auto  -> INI scroller-nya
   ul                         : column-flow yang wrap ke kolom baru, tinggi 259px (2 baris)
   li                         : 102px, img 72x72, label 82px
   ------------------------------------------ */
.bigger-game-list {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  width: 100%;
  max-width: 100%;
  position: relative;
  box-sizing: border-box;
}

.bigger-game-list .game-list {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  box-sizing: border-box;
}

.bigger-game-list .game-list::-webkit-scrollbar {
  display: none;
}

.bigger-game-list .game-list ul {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-content: flex-start;
  height: 259px;
  margin: 0;
  padding: 5px;
  list-style: none;
  box-sizing: border-box;
}

.bigger-game-list .game-list ul > li.game_item {
  flex: 0 0 auto;
  width: 92px;
  padding: 5px;
  list-style: none;
  text-align: center;
  box-sizing: border-box;
}

.bigger-game-list .inner-game-item {
  display: block;
  width: 100%;
  cursor: pointer;
}

.bigger-game-list .inner-game-item input[type="radio"] {
  display: none;
}

.bigger-game-list .wrapper-container {
  display: block;
  width: 100%;
  padding-top: 100%;
  position: relative;
  margin-bottom: 5px;
  border-radius: 12px;
  overflow: hidden;
}

.bigger-game-list .wrapper-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bigger-game-list .link-container {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.bigger-game-list .link-container .play-now {
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 8px;
}

.bigger-game-list .game-name {
  display: block;
  width: 100%;
  margin: 8px 0 4px;
  padding: 0 5px;
  font-size: 9px;
  line-height: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Baris menu ikon (hot games, slots, ...) ---------- */
.main-menu-outer-container main {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 6px 12px;
}

.main-menu-outer-container main::-webkit-scrollbar {
  display: none;
}

.main-menu-outer-container main > a {
  flex: 0 0 auto;
  min-width: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  text-transform: uppercase;
  text-decoration: none;
}

.main-menu-outer-container main > a img {
  width: 26px;
  height: 26px;
}

/* ---------- Bottom navigation: 64px, menempel bawah ----------
   HANYA untuk mobile. Di lebar desktop (halaman auth memakai shell mobile)
   referensi menyisakan elemen ini sebagai baris kosong setinggi 20px —
   jadi kita ikuti: jangan sampai muncul sebagai bar fixed di desktop. */
@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 64px;
    z-index: 60;
  }
}

@media (min-width: 769px) {
  .mobile-bottom-nav {
    display: block;
    position: static;
    height: 20px;
    overflow: hidden;
    z-index: auto;
  }

  .mobile-bottom-nav > * {
    display: none !important;
  }
}

.mobile-bottom-nav .nav-item {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 10px;
  text-decoration: none;
  position: relative;
}

.mobile-bottom-nav .nav-item i,
.mobile-bottom-nav .nav-item .deposit-icon {
  font-size: 17px;
  line-height: 1;
}

/* ruang agar konten tidak tertutup bottom nav */
.inner-body {
  padding-bottom: 72px;
}

/* ---------- Ticker pengumuman mobile: satu baris, tidak menumpuk ---------- */
.announcement-container .announcement-list,
.announcement-container .newsticker {
  display: flex;
  flex-wrap: nowrap;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
  white-space: nowrap;
  overflow: hidden;
}

.announcement-container .announcement-list > li {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* ---------- Desktop: seksi home tetap rapi ---------- */
.game-list-container .game-list {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 6px;
}

.game-list-container .game-list .games-group {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.game-list-container .game-list .games-group .game-item {
  width: 100%;
}

/* ============================================================
   Modal register: pastikan isi modal tidak kolaps & tidak terpotong
   (mobile.css bisa ikut termuat → menimpa beta.css; kita pulihkan)
   ============================================================ */
._bm_backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1039;
}

#register_modal.show {
  z-index: 1040;
}

#register_modal .modal-dialog {
  min-height: 100%;
  height: auto;
  align-items: flex-start;
}

#register_modal .modal-content {
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
  flex-basis: 100%;
}

#register_modal .modal-body {
  height: auto !important;
  overflow: visible !important;
}

/* ============================================================
   Shell auth (/login, /registerasi, /lupa-sandi)
   Drawer .site-menu harus TERTUTUP rapi (off-canvas) sampai ☰ diklik.
   Tanpa ini isi drawer ikut terlihat dan menutupi formulir.
   ============================================================ */
body[data-route="login"] .site-menu,
body[data-route="register"] .site-menu,
body[data-route="forgot"] .site-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 300px;
  max-width: 86vw;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  transform: translateX(105%);
  transition: transform 0.25s ease;
  z-index: 300;
  visibility: hidden;
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.45);
}

body[data-route="login"] .site-menu-trigger-input,
body[data-route="register"] .site-menu-trigger-input,
body[data-route="forgot"] .site-menu-trigger-input {
  position: absolute;
  left: -9999px;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
}

body[data-route="login"] .site-menu-trigger-input:checked ~ .site-menu,
body[data-route="register"] .site-menu-trigger-input:checked ~ .site-menu,
body[data-route="forgot"] .site-menu-trigger-input:checked ~ .site-menu {
  transform: translateX(0);
  visibility: visible;
}

/* latar gelap saat drawer terbuka */
body[data-route="login"]
  .site-menu-trigger-input:checked
  ~ *
  label[for="site_menu_trigger_input"]
  ~ *,
body[data-route="login"] .site-menu label[for="site_menu_trigger_input"],
body[data-route="register"] .site-menu label[for="site_menu_trigger_input"],
body[data-route="forgot"] .site-menu label[for="site_menu_trigger_input"] {
  cursor: pointer;
}

body[data-route="login"] .site-menu > label,
body[data-route="register"] .site-menu > label,
body[data-route="forgot"] .site-menu > label {
  display: block;
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  left: -100vw;
  width: 100vw;
  z-index: -1;
}

/* isi formulir auth harus berada DI ATAS latar dan selebar halaman */
body[data-route="login"] .standard-form-container,
body[data-route="register"] .standard-form-container,
body[data-route="forgot"] .standard-form-container {
  position: relative;
  z-index: 1;
  max-width: none;
}

/* Gambar konten tidak boleh melebihi lebar layar (banner promosi 1920px merusak layout mobile) */
.promotion-list img,
.promotion-item img,
.standard-form-content img,
.info-center-container img,
.site-content-container img,
.menu-preview-container img {
  max-width: 100%;
  height: auto;
}

.promotion-item {
  overflow: hidden;
}

/* jaring pengaman: jangan pernah ada scroll horizontal di shell mobile */
.inner-body,
.inner-body-container {
  overflow-x: hidden;
  max-width: 100%;
}

/* ============================================================
   Bottom nav — tombol tengah ($ Depo/WD)
   Geometri PERSIS referensi (hasil getComputedStyle 390x844):
   nav 390x64 fixed · .center-deposit 66x66 top 758 (naik 22px dari nav top 780)
   border 3px solid #fff · radius 50% · bg rgb(37,1,59) · shadow 0 6px 12px rgba(0,0,0,.35)
   icon font-size 22px warna rgb(115,109,153)
   ============================================================ */
@media (max-width: 767px) {
  .mobile-bottom-nav {
    z-index: 9999;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.25);
  }

  .mobile-bottom-nav .nav-item.center-deposit {
    box-sizing: border-box;
    flex: 0 0 66px !important;
    width: 66px !important;
    max-width: 66px !important;
    height: 66px;
    margin-top: -22px;
    background-color: rgb(37, 1, 59) !important;
    border: 3px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .mobile-bottom-nav .nav-item.center-deposit .deposit-icon {
    font-size: 22px;
    line-height: 1;
    color: rgb(115, 109, 153);
  }

  /* Referensi menyembunyikan label pada item tengah (hanya ikon "$" yang tampil). */
  .mobile-bottom-nav .nav-item.center-deposit .label {
    display: none;
  }
}

/* ============================================================
   Lobby kategori mobile (/slots tanpa provider) — geometri referensi:
   baris ikon 70px, preview container 340px, tile 92x109 (gambar 92x92),
   satu baris horizontal per kategori (bukan wrap).
   Dibatasi ke .menu-preview-container agar TIDAK memengaruhi halaman grid.
   ============================================================ */
@media (max-width: 767px) {
  #main_menu_outer_container.main-menu-outer-container {
    height: 70px;
    min-height: 70px;
    align-items: center;
  }

  .menu-preview-container .game-list-container .game-list ul.game_list_content {
    display: flex;
    flex-wrap: wrap; /* referensi membiarkan baris wrap (bukan scroller 1 baris) */
    overflow: visible;
  }

  .menu-preview-container
    .game-list-container
    .game-list
    ul.game_list_content
    > li.game-item {
    flex: 0 0 calc((100% - 10px) / 4); /* referensi: tepat 4 tile per baris (91.5px) */
    width: auto;
    height: 109px;
    margin: 0; /* referensi: 4 tile per baris (4x92=368 <= 376) */
    overflow: hidden;
  }

  .menu-preview-container
    .game-list-container
    .game-list
    ul.game_list_content
    > li.game-item
    img {
    width: 100%;
    height: auto;
    max-height: 92px;
    object-fit: contain; /* logo provider harus UTUH (logo kita 116x55) */
    display: block;
    background: transparent;
  }

  .menu-preview-container .game-list-container .game-list ul.game_list_content {
    padding: 5px; /* = referensi */
    margin: 10px 0; /* = referensi */
    gap: 0;
  }

  .menu-preview-container
    .game-list-container
    .game-list
    ul.game_list_content
    > li.game-item
    .game-name {
    font-size: 10px;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* ============================================================
   Tombol "Lihat semua" pada grid provider mobile.
   Referensi: tombol ini TIDAK berfungsi (klik = tidak terjadi apa-apa).
   Di sini dibuat berfungsi: 8 provider pertama tampil, sisanya dibuka
   dengan tombol, dan bisa ditutup lagi.
   ============================================================ */
.menu-preview-container li.game-item.extra-provider {
  display: none;
}

.menu-preview-container
  .game-list-container.tampil-semua
  li.game-item.extra-provider {
  display: list-item;
}

/* ============================================================
   Grid game kategori (mobile): ul harus MELEBAR penuh.
   Kalau hanya ada sedikit game (mis. /sports = 1 game), ul menyusut
   ke lebar konten -> tile ikut mengecil (23x48). Referensi: ul 390px,
   tile 127x152, gambar 107x107.
   ============================================================ */
@media (max-width: 767px) {
  .slots-games-container .bigger-game-list > ul#game_list {
    width: 100%;
    flex: 1 1 auto;
  }
}

/* ============================================================
   Halaman Profil (mobile) — tab Akun Saya / Ubah Kata Sandi / Profil Saya
   mengikuti struktur referensi (.profile-container > .tab-menu-container).
   ============================================================ */
@media (max-width: 767px) {
  .profile-container .tab-menu-container {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .profile-container .tab-menu-container a.nav-link {
    flex: 1 1 auto;
    text-align: center;
    cursor: pointer;
  }

  .profile-container .tab-content {
    display: none;
  }

  .profile-container .tab-content.active {
    display: block;
  }
}

/* ============================================================
   Profil — header "Detail Perbankan"
   CSS vendor membuat blok ini melar (790px); kita kunci seperti referensi.
   ============================================================ */
.banking-details-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: auto;
  min-height: 0;
  margin: 0 0 8px;
}

.banking-details-header img {
  width: 18px;
  height: 18px;
}

/* Form deposit terkunci saat ada permintaan yang belum diproses (anti-duplikat). */
.deposit-locked {
  border: 0;
  margin: 0;
  padding: 0;
  opacity: 0.55;
  pointer-events: none;
}
.deposit-pending-container {
  margin-bottom: 16px;
}
.deposit-pending-container table.profile-summary-table {
  margin: 12px 0;
}

/* ============================================================
   Grid provider /slots: label nama provider mengikuti referensi
   (abu rgb(191,187,208) — sebelumnya putih sehingga tak terlihat
   di atas kartu putih).
   ============================================================ */
.menu-preview-container .game-item span[data-vendor-name],
.menu-preview-container .game-item .game-name,
.game-list-container.active .game-item span[data-vendor-name] {
  color: rgb(191, 187, 208) !important;
}
