/**
 * Fa101 embed: same Spribe bundle as official, different effective widths
 * (sidebar + optional chat + shell). Overrides hybrid .game-wrap + bad wrap detection.
 */
@media (min-width: 992px) {
  .main-wrapper .main-container {
    --betControlsHeight: var(--betControlsHeightRow, 184px) !important;
  }

  .game-container.fa101-desktop-layout,
  .game-container.fa101-desktop-layout.game-wrap {
    -webkit-box-orient: horizontal !important;
    -webkit-box-direction: normal !important;
    -ms-flex-direction: row !important;
    flex-direction: row !important;
    height: 100% !important;
  }

  .game-container.fa101-desktop-layout .bets-widget-container {
    height: 100% !important;
    min-width: 320px !important;
    max-width: 320px !important;
    width: 320px !important;
  }

  .game-container.fa101-desktop-layout .game-play {
    width: calc(100% - 320px) !important;
    padding: 0 0 4px !important;
  }

  .game-container.fa101-desktop-layout .stage-board {
    height: 100% !important;
    min-height: 0 !important;
  }

  /* Official desktop: dual bet panels stay in one row */
  .bet-controls .controls.controls-wrap {
    -ms-flex-wrap: nowrap !important;
    flex-wrap: nowrap !important;
  }

  .bet-controls .controls.controls-wrap .bet-control:first-child {
    margin-bottom: 0 !important;
  }
}

/* Match official first row: preset grid (140px) + green Bet button */
.bet-controls .controls-content-top .first-row.bet-game,
.bet-controls .controls-content-top .first-row {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  justify-content: center !important;
  width: 100% !important;
  max-width: 390px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.bet-controls .first-row .bet-block {
  width: 140px !important;
  min-width: 140px !important;
  max-width: 140px !important;
  flex: 0 0 140px !important;
}

.bet-controls .bet-block .bets-opt-list {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  width: 100% !important;
}

.bet-controls .bet-block .bets-opt-list .bet-opt {
  width: 68px !important;
  height: 24px !important;
  min-height: 24px !important;
  max-height: 24px !important;
  margin-top: 4px !important;
  font-size: 14px !important;
  line-height: 1 !important;
  padding: 0 !important;
}

.bet-controls .bet-block .bets-opt-list .bet-opt:nth-child(2n) {
  margin-left: 4px !important;
}

.bet-controls .first-row .buttons-block {
  width: calc(100% - 148px) !important;
  min-width: 0 !important;
  margin-left: 7px !important;
  border-radius: 16px !important;
  border: 4px solid #141516 !important;
  flex: 1 1 auto !important;
  display: flex !important;
  align-self: stretch !important;
}

.bet-controls .controls .controls-content-top {
  height: auto !important;
  max-height: var(--betControlsHeightRow, 184px) !important;
}

.bet-controls .controls.controls-wrap .bet-control {
  height: auto !important;
  min-height: 150px;
}

.bet-controls .controls:not(.controls-wrap) .bet-control {
  height: 170px !important;
  max-height: 184px;
}

.bet-controls .controls .buttons-block button {
  height: 100% !important;
  min-height: 80px !important;
  max-height: 96px !important;
  width: 100% !important;
  flex: 1 1 auto !important;
  font-size: 22px !important;
}

.bet-controls .controls .buttons-block button label.amount {
  font-size: inherit !important;
}

.bet-controls .controls .buttons-block button label.amount .currency {
  font-size: 18px !important;
  margin-left: 4px !important;
}

/* Flight curve (Pixi canvas) must sit above stage background */
.play-board-wrapper .stage-canvas,
.play-board-wrapper canvas {
  position: relative !important;
  z-index: 1 !important;
}

.play-board-wrapper .dom-container {
  z-index: 2;
  pointer-events: none;
}

/* UFC partner splash = betting only; during fly show multiplier + canvas line */
body.fa101-aviator-flying .waitting-bet-wrapper {
  display: none !important;
}

body.fa101-aviator-flying .dom-container .bet-wrapper {
  pointer-events: none;
}

.game-play .stage-board {
  min-height: 220px !important;
}

/* Betting countdown (red bar under UFC logo) */
.waitting-bet-wrapper .waitting-bar,
.waitting-bet-wrapper .bet-timer,
.waitting-bet-wrapper .timer-line-wrapper {
  width: 100% !important;
  min-height: 4px !important;
  display: block !important;
  visibility: visible !important;
}

.waitting-bet-wrapper .timer-line {
  background-color: #cf2030 !important;
  will-change: transform;
}

/* Own countdown fill (Vue timerPercent often stuck at 0 if status push raced mount) */
.waitting-bet-wrapper .waitting-bar {
  position: relative !important;
  overflow: hidden !important;
}

.waitting-bet-wrapper .waitting-bar .bet-timer .timer-line {
  opacity: 0 !important;
  pointer-events: none !important;
}

.waitting-bet-wrapper .waitting-bar .fa101-countdown-track {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  border-radius: 2px;
  background-color: #262830;
  overflow: hidden;
  z-index: 4;
}

.waitting-bet-wrapper .waitting-bar .fa101-countdown-fill {
  width: 100%;
  height: 100%;
  background-color: #cf2030 !important;
  box-shadow: 0 2px 4px #d0021b;
  border-radius: 2px;
  transform: translateX(0%);
  will-change: transform;
}

@keyframes fa101-countdown-shrink {
  from {
    transform: translateX(0%);
  }
  to {
    transform: translateX(-100%);
  }
}

body.fa101-aviator-betting .waitting-bet-wrapper .waitting-bar .fa101-countdown-fill.fa101-animate {
  animation: fa101-countdown-shrink var(--fa101-countdown-sec, 5s) linear forwards;
}

/* All Bets: green only after cashout (.cashout), pending stays dark like official Aviator */
.bets-widget-container .bet-list-item:not(.cashout) {
  background: #101112 !important;
  background-image: none !important;
}

/* Top tab: keep list visible (flex min-height:0 was collapsing to empty) */
.bets-widget-container .data-list {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  min-height: 260px !important;
  height: 100% !important;
  overflow: hidden !important;
}

.bets-widget-container .data-list > .d-flex.h-100.flex-column {
  min-height: 260px !important;
  height: 100% !important;
}

.bets-widget-container .top-list {
  flex: 1 1 auto !important;
  min-height: 220px !important;
  height: auto !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

.bets-widget-container .top-wins-list,
.bets-widget-container .top-rounds-list {
  min-height: 220px !important;
  max-height: none !important;
  overflow-y: visible !important;
}

.bets-widget-container .top-wins-list-item,
.bets-widget-container .top-rounds-list-item {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}
