/**
 * Benimbahis referans ile birebir hizalama
 * Kaynak: Desktop/bnm bhs/index-Cwq4ZZKR.css
 * - .button.primary { background: rgba(var(--primary),1); color: rgba(var(--primary-sc),1); }
 * - .button.secondary { background: rgba(var(--secondary),1); ... }
 * - hover: rgba(var(--x),.9)
 * - Mobil: .m-g-header .guest .buttons .button → height 40px, padding 0 14px, font 600 12px, radius 8px, gap 6px
 *
 * Bootstrap .btn bu butonlarda kullanılmıyor (çakışma yok).
 * theme-benimbahis.css SONRASI yüklenir.
 */

/* Tema RGB — sadece bu header altında geçerli (head’deki --secondary beyaz ile çakışmasın) */
.header-topbar.header-topbar--guest {
  --primary: 197, 32, 33;
  --secondary: 0, 71, 171;
  --primary-sc: 255, 255, 255;
  --secondary-sc: 255, 255, 255;
}

/*
 * Ana ekran (--ref-bg-page) ile logo şeridi (--ref-bg-header) arasında çok hafif ton farkı.
 * Şerit bir kademe daha “açık” lacivert; gövde biraz daha koyu — butonlar değil, sadece arka plan.
 */
html body {
  --ref-bg-page: #070e1c;
  --ref-bg-header: #0a162b;
  background-color: var(--ref-bg-page) !important;
}

/*
 * Misafir (logo + Giriş / Kayıt): şerit rengi gövdeden ayrışır; üst/alt ince çizgi (yan yok).
 */
html body .header-topbar.header-topbar--guest {
  background: linear-gradient(180deg, #0b1a34 0%, var(--ref-bg-header) 42%, #081222 100%) !important;
  border: none !important;
  border-top: 1px solid rgba(255, 255, 255, 0.055) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.38) !important;
  box-shadow: none !important;
}

@media (min-width: 768px) {
  html body .header-topbar.header-topbar--guest {
    border-radius: 12px !important;
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.05) inset,
      0 6px 22px rgba(0, 0, 0, 0.28) !important;
  }
}

/* Mobil: tam genişlik; ince üst/alt çizgi korunur */
@media (max-width: 767.98px) {
  html body .header-topbar-container--guest-ref {
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 100% !important;
  }

  html body .header-topbar.header-topbar--guest {
    background: linear-gradient(180deg, #0b1a34 0%, var(--ref-bg-header) 42%, #081222 100%) !important;
    border: none !important;
    border-top: 1px solid rgba(255, 255, 255, 0.055) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.38) !important;
    border-radius: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    box-shadow: none !important;
    padding: 10px 14px !important;
  }
}

/* Kayıt Ol — üstten alta kırmızı gradient, ince çerçeve */
html body .header-topbar.header-topbar--guest .button.primary {
  background: linear-gradient(to bottom, #ef3434, #b50f0f) !important;
  color: rgba(var(--primary-sc), 1) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset !important;
}

html body .header-topbar.header-topbar--guest .button.primary:hover,
html body .header-topbar.header-topbar--guest .button.primary:focus-visible {
  background: linear-gradient(to bottom, #f04545, #c01212) !important;
  color: rgba(var(--primary-sc), 1) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
}

/* Giriş Yap — mavi gradient, çok ince border */
html body .header-topbar.header-topbar--guest .guest .buttons .button.secondary {
  background: linear-gradient(to bottom, #2f5fa3, #1a3a6c) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1) inset !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45) !important;
  font-weight: 700 !important;
}

html body .header-topbar.header-topbar--guest .guest .buttons .button.secondary:hover,
html body .header-topbar.header-topbar--guest .guest .buttons .button.secondary:focus-visible {
  background: linear-gradient(to bottom, #335fa9, #1f4278) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55) !important;
}

/* Referans: .guest .buttons */
html body .header-topbar.header-topbar--guest .guest .buttons {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 6px !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Referans: .guest .buttons .button ölçü */
html body .header-topbar.header-topbar--guest .guest .buttons .button {
  appearance: none !important;
  -webkit-appearance: none !important;
  box-sizing: border-box !important;
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  padding: 0 14px !important;
  margin: 0 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
  text-transform: none !important;
  line-height: 1 !important;
  letter-spacing: normal !important;
  cursor: pointer !important;
  font-family: inherit !important;
  -webkit-font-smoothing: antialiased;
  filter: none !important;
  opacity: 1 !important;
}

/* Mobil: eşit genişlik */
html body .header-topbar.header-topbar--guest .ref-mobile-header .guest .buttons .button {
  flex: 1 1 0 !important;
  min-width: 0 !important;
}

/* Masaüstü: aynı genişlik kutusu */
@media (min-width: 768px) {
  html body .header-topbar.header-topbar--guest .account-menu .guest .buttons .button {
    flex: 0 0 136px !important;
    width: 136px !important;
    min-width: 136px !important;
    max-width: 136px !important;
  }
}

@media (max-width: 576px) {
  html body .header-topbar.header-topbar--guest .guest .buttons .button {
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    padding: 0 12px !important;
  }
}

@media (max-width: 438px) {
  html body .header-topbar.header-topbar--guest .guest .buttons .button {
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    padding: 0 10px !important;
    font-size: 11px !important;
  }
}

/* Masaüstü: telegram / promosyon ile hizalı */
html body .header-topbar.header-topbar--guest .account-menu .header-guest-actions {
  display: flex !important;
  align-items: center !important;
  margin-right: 6px !important;
}

/* =============================================================================
   Giriş yapmış — Benimbahis referans: logo + kullanıcı üstte; alt satırda solda 3
   buton (Bonus / Kayıp / Sadakat) yan yana, sağda 2 buton (Yatır / Çek), ortada
   geniş boşluk (space-between). Telegram yok.
   ============================================================================= */

/* Masaüstü: hafif derinlik; mobilde ayrı blokta tam genişlik şerit (referans) */
html body .header-topbar.ref-header-bnh {
  background: linear-gradient(180deg, #0b1a34 0%, var(--ref-bg-header) 50%, #081525 100%) !important;
  border: none !important;
  border-radius: 10px !important;
  padding: 10px 12px 12px !important;
  margin-top: 10px !important;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.42) !important;
}

html body .header-topbar.ref-header-bnh .ref-bnh-top {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  padding-bottom: 10px !important;
  margin-bottom: 0 !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.35) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

/* Mobil: tam genişlik şerit — container yan padding kalkar; kart/köşe/gölge yok (referans) */
@media (max-width: 767.98px) {
  html body .header-topbar-container--logged-ref {
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 100% !important;
  }

  html body .header-topbar.ref-header-bnh {
    background: linear-gradient(180deg, #0b1a34 0%, var(--ref-bg-header) 45%, #081222 100%) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin-top: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-bottom: 0 !important;
    padding: 10px 14px 12px !important;
  }

  html body .header-topbar.ref-header-bnh .ref-bnh-top {
    border-bottom: 1px solid rgba(255, 255, 255, 0.09) !important;
    box-shadow: none !important;
  }
}

html body .header-topbar.ref-header-bnh .ref-bnh-logo {
  display: flex !important;
  align-items: center !important;
  text-decoration: none !important;
  min-width: 0 !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Referans: logo düz arka planda — kutu/yan çizgi/alev ::after yok */
html body .header-topbar.ref-header-bnh .ref-bnh-logo::before,
html body .header-topbar.ref-header-bnh .ref-bnh-logo::after {
  content: none !important;
  display: none !important;
}

html body .header-topbar.ref-header-bnh .ref-bnh-logo .main_logo-desktop,
html body .header-topbar.ref-header-bnh .ref-bnh-logo .main_logo-mobile-mini {
  animation: none !important;
  filter: none !important;
  box-shadow: none !important;
  border: none !important;
}

html body .header-topbar.ref-header-bnh .ref-bnh-logo .main_logo-desktop {
  height: 42px !important;
  width: 220px !important;
  max-width: min(220px, 52vw) !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: left center !important;
}

html body .header-topbar.ref-header-bnh .ref-bnh-logo .main_logo-mobile-mini {
  display: none !important;
}

@media (max-width: 576px) {
  html body .header-topbar.ref-header-bnh .ref-bnh-logo .main_logo-desktop {
    display: none !important;
  }
  html body .header-topbar.ref-header-bnh .ref-bnh-logo .main_logo-mobile-mini {
    display: block !important;
    height: 32px !important;
    width: 150px !important;
    max-width: 48vw !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: left center !important;
  }
}

html body .header-topbar.ref-header-bnh .ref-bnh-user-dd {
  flex-shrink: 0 !important;
}

html body .header-topbar.ref-header-bnh .ref-bnh-user-pill {
  appearance: none !important;
  -webkit-appearance: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 0 !important;
  padding: 6px 12px 6px 8px !important;
  background: linear-gradient(180deg, #1c3558 0%, #152a48 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  border-radius: 999px !important;
  color: #fff !important;
  font-family: inherit !important;
  cursor: pointer !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset !important;
  max-width: 100% !important;
}

html body .header-topbar.ref-header-bnh .ref-bnh-user-pill:hover {
  background: linear-gradient(180deg, #224063 0%, #1a3154 100%) !important;
}

html body .header-topbar.ref-header-bnh .ref-bnh-user-pill::after {
  display: none !important;
}

html body .header-topbar.ref-header-bnh .ref-bnh-avatar {
  flex-shrink: 0 !important;
  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
  background: #d31111 !important;
  color: #fff !important;
  font-weight: 800 !important;
  font-size: 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35) !important;
}

html body .header-topbar.ref-header-bnh .ref-bnh-user-meta {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  text-align: left !important;
  line-height: 1.2 !important;
  min-width: 0 !important;
}

html body .header-topbar.ref-header-bnh .ref-bnh-username {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #fff !important;
  max-width: 132px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html body .header-topbar.ref-header-bnh .ref-bnh-balance,
html body .header-topbar.ref-header-bnh #header-total-balance {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: rgba(255, 255, 255, 0.92) !important;
  letter-spacing: 0.01em !important;
}

html body .header-topbar.ref-header-bnh .ref-bnh-chev {
  font-size: 11px !important;
  opacity: 0.75 !important;
  margin-left: 2px !important;
}

html body .header-topbar.ref-header-bnh .ref-bnh-dd-menu {
  min-width: 220px !important;
  margin-top: 8px !important;
  background: #0f1f3d !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 8px !important;
  padding: 6px 0 !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45) !important;
}

html body .header-topbar.ref-header-bnh .ref-bnh-dd-menu .dropdown-item {
  color: rgba(255, 255, 255, 0.9) !important;
  font-size: 13px !important;
  padding: 8px 16px !important;
}

html body .header-topbar.ref-header-bnh .ref-bnh-dd-menu .dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
}

/* Tek satır: sol 3 | geniş boşluk | sağ 2 (referans görsel) */
html body .header-topbar.ref-header-bnh .ref-bnh-actions {
  display: grid !important;
  grid-template-columns: auto minmax(72px, 1fr) auto !important;
  align-items: center !important;
  padding-top: 10px !important;
  min-width: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

html body .header-topbar.ref-header-bnh .ref-bnh-actions-left {
  grid-column: 1 !important;
}

html body .header-topbar.ref-header-bnh .ref-bnh-actions-right {
  grid-column: 3 !important;
  justify-self: end !important;
}

html body .header-topbar.ref-header-bnh .ref-bnh-actions-left,
html body .header-topbar.ref-header-bnh .ref-bnh-actions-right {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0 !important;
}

/* Referans: hap formu, hafif üstten alta gradient, kalın yazı */
html body .header-topbar.ref-header-bnh .ref-bnh-actions-left .ref-bnh-btn,
html body .header-topbar.ref-header-bnh .ref-bnh-actions-right .ref-bnh-btn {
  box-sizing: border-box !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 14px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
  border-radius: 10px !important;
  letter-spacing: 0.01em !important;
}

html body .header-topbar.ref-header-bnh .ref-bnh-actions-left .ref-bnh-btn {
  flex: 0 1 auto !important;
  min-width: 0 !important;
}

html body .header-topbar.ref-header-bnh .ref-bnh-actions-right .ref-bnh-btn {
  flex: 0 0 auto !important;
  min-width: 0 !important;
  max-width: none !important;
}

@media (min-width: 768px) {
  html body .header-topbar.ref-header-bnh .ref-bnh-actions-right .ref-bnh-btn {
    min-width: 104px !important;
  }
}

html body .header-topbar.ref-header-bnh .ref-bnh-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 700 !important;
  color: #fff !important;
  text-decoration: none !important;
  border: none !important;
  white-space: nowrap !important;
  transition: filter 0.15s ease, box-shadow 0.15s ease !important;
  -webkit-font-smoothing: antialiased !important;
}

html body .header-topbar.ref-header-bnh .ref-bnh-btn:hover {
  color: #fff !important;
  filter: brightness(1.07) !important;
}

html body .header-topbar.ref-header-bnh .ref-bnh-btn--green {
  background: linear-gradient(180deg, #3adb6b 0%, #23963e 100%) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.28) inset !important;
  border: none !important;
}

html body .header-topbar.ref-header-bnh .ref-bnh-btn--red {
  background: linear-gradient(180deg, #f02828 0%, #b90f0f 100%) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset !important;
  border: none !important;
}

/* Arka plandan biraz açık lacivert, hafif üst highlight */
html body .header-topbar.ref-header-bnh .ref-bnh-btn--navy {
  background: linear-gradient(180deg, #2d4f7d 0%, #1e3558 100%) !important;
  border: none !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset !important;
}

/*
 * Mobil dahil HER ZAMAN tek satır (referans): grid auto | 1fr | auto — asla 2 satır yok.
 * Sığması için puntoyu/padding/gap küçültülür; layout değişmez.
 */
@media (max-width: 767.98px) {
  html body .header-topbar.ref-header-bnh {
    margin-bottom: 8px !important;
    padding: 10px 10px 12px !important;
  }

  html body .header-topbar.ref-header-bnh .ref-bnh-actions {
    display: grid !important;
    grid-template-columns: auto minmax(28px, 1fr) auto !important;
    align-items: center !important;
    padding-top: 8px !important;
  }

  html body .header-topbar.ref-header-bnh .ref-bnh-actions-left,
  html body .header-topbar.ref-header-bnh .ref-bnh-actions-right {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 5px !important;
    min-width: 0 !important;
  }

  html body .header-topbar.ref-header-bnh .ref-bnh-actions-left .ref-bnh-btn,
  html body .header-topbar.ref-header-bnh .ref-bnh-actions-right .ref-bnh-btn {
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 4px !important;
    font-size: 9px !important;
    line-height: 1.05 !important;
    white-space: nowrap !important;
    border-radius: 10px !important;
  }

  html body .header-topbar.ref-header-bnh .ref-bnh-actions-right .ref-bnh-btn {
    font-size: 10px !important;
    padding: 0 6px !important;
  }
}

@media (max-width: 400px) {
  html body .header-topbar.ref-header-bnh .ref-bnh-actions-left,
  html body .header-topbar.ref-header-bnh .ref-bnh-actions-right {
    gap: 4px !important;
  }

  html body .header-topbar.ref-header-bnh .ref-bnh-actions-left .ref-bnh-btn,
  html body .header-topbar.ref-header-bnh .ref-bnh-actions-right .ref-bnh-btn {
    font-size: 9px !important;
    padding: 0 2px !important;
    height: 36px !important;
    min-height: 36px !important;
  }
}

/* Üst domain kutusu — kırmızı vurgu (referans) */
html body .ref-domain-notice-wrap .mobile-domain-notice {
  border: 1px solid rgba(211, 17, 17, 0.55) !important;
  box-shadow:
    0 0 0 1px rgba(211, 17, 17, 0.35) inset,
    0 0 20px rgba(211, 17, 17, 0.22),
    0 4px 16px rgba(0, 0, 0, 0.4) !important;
}
