/* Customer-only game-status layout. Main and Bumper share this view, but keep
   separate game IDs and state endpoints. Loaded after the Royal Casino CSS. */
body[data-area="customer"] .customer-layout > .dividend-panel[hidden],
body[data-area="customer"] .customer-layout > .winner-panel[hidden],
body[data-area="customer"] .customer-layout > .prize-announcement[hidden]{display:none!important}
/* Do not reveal the winner panels before the game actually starts.
   This also covers CSS from older cached theme files. */
body[data-area="customer"] .customer-layout:not([data-game-phase="live"]):not([data-game-phase="paused"]):not([data-game-phase="finished"]) > :is(.winner-panel,.prize-announcement){display:none!important}

/* Before the first call keep the existing booking-first layout.
   For every active or completed game, stack the content
   in reading order so verified results appear before the ticket finder. */
body[data-area="customer"] .customer-layout:is([data-game-phase="live"],[data-game-phase="paused"],[data-game-phase="finished"]){
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  gap:15px!important;
  width:100%;
}
body[data-area="customer"] .customer-layout:is([data-game-phase="live"],[data-game-phase="paused"],[data-game-phase="finished"]) > *{
  min-width:0;
  max-width:100%;
  width:100%;
}
body[data-area="customer"] .customer-layout:is([data-game-phase="live"],[data-game-phase="paused"],[data-game-phase="finished"]) > .announcement{order:-1}
body[data-area="customer"] .customer-layout:is([data-game-phase="live"],[data-game-phase="paused"],[data-game-phase="finished"]) > .customer-top{order:0}
body[data-area="customer"] .customer-layout:is([data-game-phase="live"],[data-game-phase="paused"],[data-game-phase="finished"]) > .live-ticket-finder{order:3}
body[data-area="customer"] .customer-layout:is([data-game-phase="live"],[data-game-phase="paused"],[data-game-phase="finished"]) > #tickets{order:4}
body[data-area="customer"] .customer-layout:is([data-game-phase="live"],[data-game-phase="paused"],[data-game-phase="finished"]) > .customer-prize-update{order:1}
body[data-area="customer"] .customer-layout:is([data-game-phase="live"],[data-game-phase="paused"],[data-game-phase="finished"]) > .winner-panel{order:2}
body[data-area="customer"] .customer-layout:is([data-game-phase="live"],[data-game-phase="paused"],[data-game-phase="finished"]) > .dividend-panel{order:5}

/* Live draw: keep the existing 10-column numbered board legible rather than
   stretching its cells to the full width of a desktop display. */
body[data-area="customer"] .customer-layout:is([data-game-phase="live"],[data-game-phase="paused"]) .customer-call-board{
  max-width:900px;
  margin-inline:auto;
  width:100%;
}
body[data-area="customer"] .customer-layout:is([data-game-phase="live"],[data-game-phase="paused"]) #tickets{
  border-color:#a78040!important;
  scroll-margin-top:16px;
}
body[data-area="customer"] .customer-layout:is([data-game-phase="live"],[data-game-phase="paused"]) .live-ticket-finder{
  border-color:#c69b55!important;
  scroll-margin-top:14px;
}
body[data-area="customer"] .customer-layout > .customer-prize-update{
  border:1px solid #a87b32!important;
  border-radius:14px;
  box-shadow:0 10px 34px #0006;
  overflow:hidden;
  scroll-margin-top:14px;
}
body[data-area="customer"] .customer-layout > .winner-panel{
  scroll-margin-top:14px;
}
/* Hide dividends only when there is no published game. JavaScript and PHP
   mirror this state. */
body[data-area="customer"] .customer-layout:not([data-game-phase="booking_open"]):not([data-game-phase="live"]):not([data-game-phase="paused"]):not([data-game-phase="finished"]) > .dividend-panel{
  display:none!important;
}
@media(max-width:650px){
  body[data-area="customer"] .customer-layout:is([data-game-phase="live"],[data-game-phase="paused"],[data-game-phase="finished"]){
    gap:10px!important;
  }
  body[data-area="customer"] .customer-layout > .customer-prize-update{
    border-radius:10px;
  }
}
