/*
 * BetBlunt unified home shell
 * This is the single visual source for the authenticated and guest home.
 * Keep session-only controls in their specific stylesheets; home content belongs here.
 */

body.prototype-live .betblunt-home-unified {
  width: calc(100% - 30px) !important;
  max-width: 1460px !important;
  margin: 0 auto 32px !important;
  display: block !important;
}

/* One banner system, including the same admin-managed desktop/mobile assets. */
body.prototype-live .betblunt-home-unified .prototype-hero {
  width: 100% !important;
  aspect-ratio: 1403 / 330 !important;
  margin-top: 10px !important;
  overflow: hidden !important;
  border: 1px solid rgba(0, 237, 145, .24) !important;
  border-radius: 12px !important;
  background-color: #07120d !important;
  background-image: url('../dashboard/php/slider_banner.php?slot=0') !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
  animation: none !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .25) !important;
}

body.prototype-live .betblunt-home-unified .prototype-reference-crop {
  display: none !important;
}

/* Search, categories and section rhythm are intentionally shared. */
body.prototype-live .betblunt-home-unified .prototype-toolbar {
  width: 100% !important;
  margin-top: 10px !important;
}

body.prototype-live .betblunt-home-unified .prototype-category-strip {
  width: 100% !important;
  max-width: none !important;
  margin: 10px 0 0 !important;
  display: flex !important;
  justify-content: center !important;
  gap: 7px !important;
}

body.prototype-live .betblunt-home-unified .prototype-category-strip > a,
body.prototype-live .betblunt-home-unified .prototype-category-strip > button {
  min-width: 0 !important;
  max-width: none !important;
  flex: 1 1 0 !important;
}

body.prototype-live .betblunt-home-unified .prototype-game-section {
  margin-top: 12px !important;
}

body.prototype-live .betblunt-home-unified .prototype-section-head {
  min-height: 38px !important;
}

body.prototype-live .betblunt-home-unified .prototype-section-title > div {
  display: grid;
  gap: 1px;
}

body.prototype-live .betblunt-home-unified .prototype-games-grid {
  display: grid !important;
  grid-template-columns: repeat(9, minmax(0, 1fr)) !important;
  gap: 11px !important;
}

body.prototype-live .betblunt-home-unified .prototype-game-card {
  min-width: 0 !important;
}

/* The four admin-managed cards are always the same size and order. */
body.prototype-live .betblunt-home-unified .prototype-promos {
  margin-top: 12px !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

body.prototype-live .betblunt-home-unified .prototype-promos .prototype-promo {
  width: 100% !important;
  aspect-ratio: 2.12 / 1 !important;
  display: block !important;
  overflow: hidden !important;
  border: 1px solid rgba(0, 237, 145, .40) !important;
  border-radius: 10px !important;
  background: #06150e !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .16) !important;
}

body.prototype-live .betblunt-home-unified .prototype-promo > img,
body.prototype-live .betblunt-home-unified .prototype-promo > svg {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  object-fit: cover !important;
  object-position: center !important;
}

/* Keep every home block in DOM order in both modes. */
body.prototype-live .betblunt-home-unified .prototype-hero,
body.prototype-live .betblunt-home-unified .prototype-toolbar,
body.prototype-live .betblunt-home-unified .prototype-search-results-host,
body.prototype-live .betblunt-home-unified .prototype-category-strip,
body.prototype-live .betblunt-home-unified .prototype-game-section,
body.prototype-live .betblunt-home-unified .prototype-promos,
body.prototype-live .betblunt-home-unified .public-winners-strip {
  order: initial !important;
}

@media (max-width: 1120px) {
  body.prototype-live .betblunt-home-unified .prototype-games-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  }

  body.prototype-live .betblunt-home-unified .prototype-promos {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 700px) {
  body.prototype-live .betblunt-home-unified {
    width: calc(100% - 16px) !important;
    margin: 0 auto 84px !important;
    display: block !important;
  }

  body.prototype-live .betblunt-home-unified .prototype-hero {
    margin-top: 9px !important;
    aspect-ratio: 750 / 320 !important;
    border-radius: 12px !important;
    background-image: url('../dashboard/php/slider_banner.php?slot=0&device=mobile') !important;
    animation: none !important;
  }

  body.prototype-live .betblunt-home-unified .prototype-category-strip {
    margin-top: 9px !important;
    padding: 0 1px 2px !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    overflow-x: auto !important;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  body.prototype-live .betblunt-home-unified .prototype-category-strip::-webkit-scrollbar,
  body.prototype-live .betblunt-home-unified .prototype-games-grid::-webkit-scrollbar,
  body.prototype-live .betblunt-home-unified .prototype-promos::-webkit-scrollbar {
    display: none;
  }

  body.prototype-live .betblunt-home-unified .prototype-category-strip > a,
  body.prototype-live .betblunt-home-unified .prototype-category-strip > button {
    min-width: 112px !important;
    max-width: 112px !important;
    flex: 0 0 112px !important;
    scroll-snap-align: start;
  }

  body.prototype-live .betblunt-home-unified .prototype-toolbar {
    margin-top: 8px !important;
    display: block !important;
  }

  body.prototype-live .betblunt-home-unified .prototype-game-section {
    margin-top: 12px !important;
  }

  body.prototype-live .betblunt-home-unified .prototype-games-grid {
    margin-top: 5px !important;
    padding: 0 8px 5px 0 !important;
    display: flex !important;
    gap: 8px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  body.prototype-live .betblunt-home-unified .prototype-game-card {
    min-width: 0 !important;
    flex: 0 0 112px !important;
    scroll-snap-align: start;
  }

  body.prototype-live .betblunt-home-unified .prototype-promos {
    margin-top: 10px !important;
    padding-bottom: 3px;
    display: flex !important;
    gap: 8px !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  body.prototype-live .betblunt-home-unified .prototype-promos .prototype-promo,
  body.prototype-live .betblunt-home-unified .prototype-promos .prototype-promo:nth-child(2),
  body.prototype-live .betblunt-home-unified .prototype-promos .prototype-promo:nth-child(4) {
    min-width: 82vw !important;
    flex: 0 0 82vw !important;
    display: block !important;
    scroll-snap-align: start;
  }
}

@media (max-width: 430px) {
  body.prototype-live .betblunt-home-unified .prototype-game-card {
    flex-basis: 108px !important;
  }

  body.prototype-live .betblunt-home-unified .prototype-promos .prototype-promo,
  body.prototype-live .betblunt-home-unified .prototype-promos .prototype-promo:nth-child(2),
  body.prototype-live .betblunt-home-unified .prototype-promos .prototype-promo:nth-child(4) {
    min-width: 86vw !important;
    flex-basis: 86vw !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.prototype-live .betblunt-home-unified .prototype-hero {
    animation: none !important;
  }
}
/* Shared carousel: preserve the existing hero dimensions and click actions. */
body.prototype-live .betblunt-home-unified .prototype-hero {
  position: relative !important;
  isolation: isolate;
}
body.prototype-live .betblunt-home-unified .prototype-hero.home-banner-active {
  background-image: none !important;
}
.home-banner-track {
  position: absolute;
  inset: 0;
  display: flex;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}
.home-banner-track > img {
  flex: 0 0 100%;
  width: 100%;
  min-width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Double behaves like a native catalog game while keeping its own route. */
.betblunt-double-card .prototype-game-launch {
  color: inherit;
  text-decoration: none;
}
.betblunt-double-card .prototype-game-art {
  aspect-ratio: 5 / 6 !important;
}
.betblunt-double-card .prototype-game-art > img {
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: 5 / 6 !important;
  object-fit: cover !important;
}

/* Arena card keeps native catalog typography without link underlines. */
.betblunt-arena-card .prototype-game-launch,
.betblunt-arena-card .prototype-game-launch:hover,
.betblunt-arena-card .prototype-game-launch:focus,
.betblunt-arena-card .prototype-game-launch:active,
.betblunt-arena-card .prototype-game-copy,
.betblunt-arena-card .prototype-game-copy strong,
.betblunt-arena-card .prototype-game-copy small {
  color: inherit;
  text-decoration: none !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
}

/* Mines is a native-looking game card even though its launch is a link. */
.betblunt-mines-card .prototype-game-launch,
.betblunt-mines-card .prototype-game-launch:hover,
.betblunt-mines-card .prototype-game-launch:focus,
.betblunt-mines-card .prototype-game-launch:active,
.betblunt-mines-card .prototype-game-copy,
.betblunt-mines-card .prototype-game-copy strong,
.betblunt-mines-card .prototype-game-copy small {
  color: inherit;
  text-decoration: none !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
}

/* Arena cover refinement: tighter framing so the fighters and logo read at card size. */
.betblunt-arena-card .prototype-game-art {
  aspect-ratio: 5 / 6 !important;
  overflow: hidden !important;
}
.betblunt-arena-card .prototype-game-art > img {
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: 5 / 6 !important;
  object-fit: cover !important;
  object-position: 50% 47% !important;
  transform: scale(1.07);
  transform-origin: 50% 47%;
  filter: contrast(1.06) saturate(1.04);
}
.lista-jogos .betblunt-double-card .jogar-btn {
  text-decoration: none;
}

/* BetBlunt provider dropdown — visual próprio e lista sincronizada com o admin. */
body.prototype-live .betblunt-home-unified .prototype-toolbar {
  position: relative;
  z-index: 80;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 10px;
  align-items: center;
}

body.prototype-live .betblunt-home-unified .prototype-provider-box {
  position: relative;
  min-width: 0;
  height: 46px;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: 0 !important;
  overflow: visible !important;
}

body.prototype-live .betblunt-home-unified .prototype-provider-trigger {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(0, 237, 145, .28);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(8, 30, 21, .98), rgba(4, 20, 14, .98));
  color: #f1f7f3;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
  cursor: pointer;
  text-align: left;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

body.prototype-live .betblunt-home-unified .prototype-provider-trigger:hover,
body.prototype-live .betblunt-home-unified .prototype-provider-box.open .prototype-provider-trigger {
  border-color: rgba(0, 237, 145, .65);
  background:
    linear-gradient(180deg, rgba(7, 38, 25, .99), rgba(4, 24, 16, .99));
  box-shadow: 0 0 0 3px rgba(0, 237, 145, .055), inset 0 1px 0 rgba(255, 255, 255, .035);
}

body.prototype-live .betblunt-home-unified .prototype-provider-trigger .provider-trigger-icon {
  color: var(--brand, #00ed91);
  font-size: 14px;
}

body.prototype-live .betblunt-home-unified #prototype-provider-label {
  min-width: 0;
  overflow: hidden;
  color: #f3f7f5;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.prototype-live .betblunt-home-unified .provider-trigger-chevron {
  color: var(--brand, #00ed91);
  font-size: 10px;
  transition: transform .18s ease;
}

body.prototype-live .betblunt-home-unified .prototype-provider-box.open .provider-trigger-chevron {
  transform: rotate(180deg);
}

body.prototype-live .betblunt-home-unified .prototype-provider-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 5000;
  width: min(330px, calc(100vw - 28px));
  padding: 9px;
  overflow: hidden;
  border: 1px solid rgba(0, 237, 145, .25);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(7, 25, 18, .995), rgba(3, 15, 10, .995));
  box-shadow: 0 22px 56px rgba(0, 0, 0, .56), inset 0 1px 0 rgba(255, 255, 255, .025);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

body.prototype-live .betblunt-home-unified .prototype-provider-menu[hidden] {
  display: none !important;
}

body.prototype-live .betblunt-home-unified .prototype-provider-search {
  height: 39px;
  margin-bottom: 7px;
  padding: 0 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 10px;
  background: rgba(255, 255, 255, .035);
}

body.prototype-live .betblunt-home-unified .prototype-provider-search i {
  color: #70857a;
  font-size: 11px;
}

body.prototype-live .betblunt-home-unified .prototype-provider-search input {
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font-size: 11px;
}

body.prototype-live .betblunt-home-unified .prototype-provider-search input::placeholder {
  color: #6f8077;
}

body.prototype-live .betblunt-home-unified .prototype-provider-list {
  max-height: 310px;
  padding: 1px 3px 1px 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 237, 145, .72) rgba(255, 255, 255, .035);
}

body.prototype-live .betblunt-home-unified .prototype-provider-list::-webkit-scrollbar {
  width: 8px;
}

body.prototype-live .betblunt-home-unified .prototype-provider-list::-webkit-scrollbar-track {
  margin: 5px 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .035);
}

body.prototype-live .betblunt-home-unified .prototype-provider-list::-webkit-scrollbar-thumb {
  border: 2px solid rgba(3, 15, 10, .98);
  border-radius: 999px;
  background: linear-gradient(180deg, #00ed91, #00a966);
}

body.prototype-live .betblunt-home-unified .prototype-provider-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #2affad, #00c679);
}

body.prototype-live .betblunt-home-unified .prototype-provider-option {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 14px;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #dce6e1;
  cursor: pointer;
  text-align: left;
  transition: color .14s ease, background .14s ease, transform .14s ease;
}

body.prototype-live .betblunt-home-unified .prototype-provider-option span {
  overflow: hidden;
  font-size: 11px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.prototype-live .betblunt-home-unified .prototype-provider-option i {
  color: #52655b;
  font-size: 9px;
}

body.prototype-live .betblunt-home-unified .prototype-provider-option:hover,
body.prototype-live .betblunt-home-unified .prototype-provider-option:focus-visible {
  outline: none;
  background: rgba(0, 237, 145, .09);
  color: #fff;
  transform: translateX(1px);
}

body.prototype-live .betblunt-home-unified .prototype-provider-option:hover i,
body.prototype-live .betblunt-home-unified .prototype-provider-option:focus-visible i,
body.prototype-live .betblunt-home-unified .prototype-provider-option.active i {
  color: var(--brand, #00ed91);
}

body.prototype-live .betblunt-home-unified .prototype-provider-option.active {
  background: rgba(0, 237, 145, .075);
  color: var(--brand, #00ed91);
}

body.prototype-live .betblunt-home-unified .prototype-provider-option[hidden] {
  display: none !important;
}

body.prototype-live .betblunt-home-unified .prototype-provider-empty {
  padding: 14px 10px;
  color: #778a80;
  font-size: 11px;
  text-align: center;
}

@media (max-width: 700px) {
  body.prototype-live .betblunt-home-unified .prototype-toolbar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.prototype-live .betblunt-home-unified .prototype-provider-box {
    height: 44px;
  }

  body.prototype-live .betblunt-home-unified .prototype-provider-trigger {
    height: 44px;
    border-radius: 999px;
  }

  body.prototype-live .betblunt-home-unified .prototype-provider-menu {
    left: 0;
    right: auto;
    width: 100%;
  }

  body.prototype-live .betblunt-home-unified .prototype-provider-list {
    max-height: min(52vh, 320px);
  }
}


/* Jogos em alta: uma fileira inicial + uma segunda fileira sob demanda. */
body.prototype-live .betblunt-home-unified #prototype-games .prototype-hot-more[hidden],
body.prototype-live .betblunt-home-unified #public-games .prototype-hot-more[hidden]{
  display:none!important;
}
body.prototype-live .betblunt-home-unified #prototype-games .prototype-hot-more,
body.prototype-live .betblunt-home-unified #public-games .prototype-hot-more{
  margin-top:11px!important;
}
body.prototype-live .betblunt-home-unified .home-hot-toggle{
  padding:0!important;
  border:0!important;
  background:transparent!important;
  color:#00ed91!important;
  font-size:11px!important;
  font-weight:800!important;
  cursor:pointer!important;
}
body.prototype-live .betblunt-home-unified .home-hot-toggle i{
  margin-left:5px;
  font-size:10px;
}
@media(max-width:700px){
  body.prototype-live .betblunt-home-unified #prototype-games .prototype-hot-more,
  body.prototype-live .betblunt-home-unified #public-games .prototype-hot-more{
    margin-top:7px!important;
  }
}


/* Estabilidade mobile: evita zoom de foco, double-tap zoom e deslocamentos laterais. */
html{
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
  overflow-x:clip;
}
body.prototype-live{
  max-width:100%;
  overflow-x:clip;
  overscroll-behavior-x:none;
}
body.prototype-live a,
body.prototype-live button,
body.prototype-live input,
body.prototype-live select,
body.prototype-live textarea,
body.prototype-live label,
body.prototype-live [role="button"]{
  touch-action:manipulation;
}
body.prototype-live img,
body.prototype-live svg{
  max-width:100%;
}
@media(max-width:700px){
  /* 16px impede o zoom automático do Safari/iPhone ao focar campos. */
  body.prototype-live input,
  body.prototype-live select,
  body.prototype-live textarea,
  body.prototype-live .prototype-search-box input,
  body.prototype-live .prototype-provider-search input,
  body.public-prototype-guest .auth-modal input{
    font-size:16px!important;
  }

  body.prototype-live .betblunt-home-unified,
  body.prototype-live .prototype-home,
  body.prototype-live .prototype-toolbar,
  body.prototype-live .prototype-game-section{
    max-width:100%!important;
  }
}

/* Capas dos originais seguem o mesmo quadro, independente do tamanho do arquivo. */
body.prototype-live .betblunt-home-unified .prototype-game-card:is(.betblunt-double-card,.betblunt-mines-card,.betblunt-arena-card) .prototype-game-art{
  position:relative!important;
  aspect-ratio:5 / 6!important;
  height:auto!important;
  overflow:hidden!important;
}
body.prototype-live .betblunt-home-unified .prototype-game-card:is(.betblunt-double-card,.betblunt-mines-card,.betblunt-arena-card) .prototype-game-art>img{
  position:absolute!important;inset:0!important;
  width:100%!important;height:100%!important;
  aspect-ratio:auto!important;object-fit:cover!important;
}
@media(max-width:700px){
 body.prototype-live .betblunt-home-unified .prototype-game-card:is(.betblunt-double-card,.betblunt-mines-card,.betblunt-arena-card) .prototype-game-art{aspect-ratio:1 / 1.05!important}
}
