/* ═══════════════════════════════════════════════════════════════
   TAM MOBİL SIĞDIRMA — telefon ekranına her şey sığar
   @media + html.is-mobile / html.is-phone
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 767px) {
  html {
    overflow-x: hidden !important;
    width: 100%;
    max-width: 100vw;
  }

  body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
    margin: 0;
    padding-left: 0;
    padding-right: 0;
    -webkit-overflow-scrolling: touch;
  }

  .App,
  .Main,
  .Header,
  header,
  main,
  footer,
  .footerbg,
  section,
  .container,
  .container-90,
  .containerfullwidth,
  .container-size,
  .Account,
  .games-list,
  .Auth,
  .sportbook-shell {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  /* Slider taşmasını kes — tüm sayfalardaki 31548px hatası */
  #image-gallery,
  .lSSlideOuter,
  .lSSlideWrapper,
  .lightSlider,
  .lSSlideWrapper .lightSlider {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    transform: none !important;
    -webkit-transform: none !important;
    padding-bottom: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
  }

  #image-gallery li,
  #image-gallery .lslide {
    width: 100% !important;
    max-width: 100% !important;
  }

  #image-gallery img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 140px;
    object-fit: cover;
    display: block;
  }

  .slider-wrapper,
  .lSSlideOuter {
    max-width: 100% !important;
    overflow: hidden !important;
  }

  /* Bootstrap grid sıfırla */
  .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100%;
  }

  .row > [class*="col-"],
  [class*="col-md-"],
  [class*="col-lg-"],
  [class*="col-"] {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
    box-sizing: border-box;
  }

  /* Header */
  .header_new {
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 10px !important;
    max-width: 100%;
  }

  .logo_content {
    flex: 1 1 45%;
    min-width: 0;
  }

  .logo_content img {
    max-width: min(130px, 40vw) !important;
    max-height: 40px !important;
    height: auto !important;
  }

  .header_right_content {
    flex: 1 1 100%;
    width: 100%;
    justify-content: flex-end;
    min-width: 0;
  }

  .header_right_content_down {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-end !important;
    align-items: center;
    gap: 5px !important;
    width: 100%;
    max-width: 100%;
  }

  .header-logged-actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px;
  }

  .header-action-btn {
    width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 !important;
    border-radius: 50%;
  }

  .header-action-btn span {
    display: none !important;
  }

  .header-balance-pill {
    min-height: 32px;
    padding: 5px 8px;
    font-size: 11px;
  }

  .header-user-profile__toggle {
    min-height: 32px;
    padding: 5px 8px;
    font-size: 11px;
    max-width: 130px;
  }

  .header-user-profile__name {
    max-width: 56px;
    font-size: 11px;
  }

  #header-auth-buttons .btn-yellow {
    font-size: 10px;
    padding: 6px 8px;
    min-height: 32px;
  }

  .header-search-btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
  }

  /* Üst menü kaydır */
  .Header-navigation,
  .Header-navigation-menu {
    max-width: 100vw;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap !important;
  }

  .Header-navigation-menu__item {
    flex: 0 0 auto !important;
    min-width: 54px;
  }

  .Header-navigation-menu__item > a {
    font-size: 8px;
    padding: 5px 2px;
    min-height: 54px;
  }

  #betpark_tv {
    display: none !important;
  }

  /* Casino */
  .games-list .border-radius {
    padding: 8px !important;
  }

  .games-list h4 {
    font-size: 14px !important;
  }

  .games-list h4 .text--primary-color {
    display: block;
    width: 100%;
  }

  #providerSearchControls {
    float: none !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 6px;
    margin-top: 6px;
  }

  #providerSearchInput,
  #providerSearchButton,
  #searchAreaControl,
  #search_game,
  #searchgameinput {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .searchArea .col-md-10,
  .searchArea .col-md-2 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin-bottom: 6px;
  }

  .game-category {
    max-width: 100%;
    overflow-x: auto;
  }

  #gameCategory li a {
    font-size: 13px;
    padding: 8px;
  }

  .Slot-providers {
    max-width: 100%;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch;
  }

  .Slot-providers__item a {
    min-width: 72px !important;
    width: 72px !important;
  }

  .game-item {
    flex: none !important;
    max-width: none !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
  }

  .game-item:hover {
    transform: none !important;
    box-shadow: none !important;
  }

  .games-list__wrap,
  .casino-category-games,
  #games {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0 !important;
  }

  .casino-game-item-content {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .casino-game-item {
    aspect-ratio: 4/3;
  }

  .game-item__info-title {
    font-size: 10px !important;
    line-height: 1.2;
    word-break: break-word;
  }

  .game-item__info-provider {
    font-size: 9px !important;
  }

  #btnLoadMoreGames {
    width: 100%;
    margin: 10px 0;
    box-sizing: border-box;
  }

  /* Giriş */
  .Auth--login .Auth__layout,
  .Auth--register .Auth__layout {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 8px !important;
  }

  .Auth-header {
    flex-direction: column;
    padding: 0.5rem 0 1rem;
    text-align: center;
  }

  .Auth-header__title h1 {
    font-size: 1.1rem !important;
  }

  .Auth__main {
    padding: 0 0 1rem !important;
  }

  .cf-fake-turnstile {
    max-width: 100% !important;
  }

  /* Para yatır */
  .Account-header {
    flex-direction: column;
    padding: 12px !important;
    gap: 10px;
  }

  .Account-header__actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .Account-header__actions > a {
    flex: 1 1 calc(50% - 4px);
    font-size: 11px;
    padding: 8px 6px;
    text-align: center;
  }

  .Account-navigation__menu {
    overflow-x: auto;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch;
    max-width: 100vw;
  }

  .Account-deposit-filters {
    overflow-x: auto;
    max-width: 100%;
  }

  .Account-deposit-methods,
  #deposit-methods-grid,
  .deposit-methods-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .Account-deposit-methods__item {
    width: 100% !important;
    max-width: none !important;
    height: 6.75rem !important;
    min-height: 6.75rem !important;
  }

  .deposit-inline-panel {
    flex-direction: column !important;
    max-width: 100%;
  }

  .deposit-inline-panel__logo,
  .deposit-inline-panel__form,
  .deposit-inline-panel__submit {
    width: 100% !important;
    max-width: 100% !important;
  }

  .deposit-wizard-overlay {
    padding: 0 !important;
  }

  .deposit-wizard {
    width: 100% !important;
    max-width: 100vw !important;
    min-height: 100vh;
    max-height: 100vh;
    border-radius: 0 !important;
    margin: 0 !important;
  }

  .deposit-wizard__steps {
    overflow-x: auto;
    flex-wrap: nowrap !important;
  }

  .deposit-wizard__footer {
    flex-direction: column;
    gap: 8px;
  }

  .deposit-wizard__btn {
    width: 100% !important;
  }

  /* Spor */
  .sportbook-providers {
    overflow-x: auto;
    flex-wrap: nowrap !important;
    max-width: 100vw;
  }

  .sportbook-frame,
  .sportbook-frame-wrap {
    width: 100% !important;
    max-width: 100vw !important;
    min-height: calc(100dvh - 150px) !important;
    height: calc(100dvh - 150px) !important;
  }

  /* Footer */
  .social-icons {
    display: none !important;
  }

  .footerbg .row > [class*="col-"] {
    flex: 0 0 50% !important;
    max-width: 50% !important;
    margin-bottom: 12px;
  }

  .footerbg .row > .col-lg-4 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }

  .bottom-footer-marque,
  .containerfullwidth.bottom-footer-marque {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 900;
    width: 100% !important;
    max-width: 100vw !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .bottom-marque-row {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    max-width: 100vw;
    margin: 0 !important;
  }

  .bottom-marque-row .col-4,
  .bottom-marque-row marquee,
  .marque-content {
    display: none !important;
  }

  .bottom-footer-item {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 8px 2px !important;
    font-size: 8px !important;
  }

  .bottom-footer-item a {
    flex-direction: column;
    align-items: center;
    font-size: 8px;
    text-align: center;
    line-height: 1.2;
  }

  body {
    padding-bottom: 56px !important;
  }

  /* Profil menüsü — alttan panel */
  .header-user-profile__menu {
    position: fixed !important;
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    max-height: 75vh;
    overflow-y: auto;
    border-radius: 14px 14px 0 0;
    z-index: 10001;
  }

  /* Taşan tablolar / formlar */
  table,
  .Form,
  .form-control,
  input,
  select,
  textarea,
  button:not(.Account-deposit-methods__item):not(.Account-deposit-methods__group) {
    max-width: 100%;
    box-sizing: border-box;
  }

  img:not(.icon):not([class*="nav_icon"] img) {
    max-width: 100%;
    height: auto;
  }

  .scrool-top-container {
    bottom: 64px;
    right: 8px;
  }

  #flippanel #flip .col-md-12 {
    font-size: 10px;
    padding: 6px;
    line-height: 1.35;
  }

  .section-page-banner h2 {
    font-size: 1.15rem;
    padding: 0 8px;
  }

  .promo-page-grid,
  .promo-grid,
  .promosyon-grid {
    grid-template-columns: 1fr !important;
  }
}

/* UA ile algılanan telefon — aynı kurallar (geniş ekranlı telefon yedek) */
html.is-phone .App,
html.is-phone .Main {
  max-width: 100vw;
  overflow-x: hidden;
}

html.is-phone #image-gallery {
  width: 100% !important;
  transform: none !important;
}

html.is-phone .games-list__wrap,
html.is-phone #games {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

/* Tablet */
@media (min-width: 768px) and (max-width: 991px) {
  body {
    overflow-x: hidden;
  }

  .games-list__wrap,
  #games {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .Account-deposit-methods__item {
    width: 100% !important;
    max-width: none !important;
  }

  #image-gallery {
    width: 100% !important;
    transform: none !important;
  }
}
