﻿/* BingoRon mobile horizontal game layout. Keep landscape game rules here. */

@media (max-width: 680px), (max-height: 520px) and (max-width: 980px) {
  body.mobile-landscape-game {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    width: 100svw;
    height: 100svh;
    overflow: hidden;
    background: #10181b;
  }

  body.mobile-landscape-game .app-header,
  body.mobile-landscape-game .market-shell,
  body.mobile-landscape-game .preview-shell,
  body.mobile-landscape-game .leaderboard-shell {
    display: none !important;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] {
    --mobile-landscape-chat-width: clamp(244px, 38vw, 360px);
    --mobile-landscape-meta-width: clamp(132px, 22vw, 166px);
    --mobile-landscape-top-gap: 5px;
    position: fixed;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 3px;
    width: 100vw;
    height: 100vh;
    width: 100svw;
    height: 100svh;
    max-width: none;
    min-height: 0;
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    background:
      linear-gradient(135deg, rgba(18, 29, 32, 0.96), rgba(12, 18, 22, 0.98)),
      var(--surface-soft);
    padding: 4px;
    -webkit-overflow-scrolling: touch;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .mobile-game-stepbar {
    position: relative;
    grid-column: 2;
    grid-row: 1;
    z-index: 60;
    align-self: stretch;
    justify-self: start;
    width: calc(100% - var(--mobile-landscape-meta-width) - var(--mobile-landscape-top-gap));
    margin: 0;
    min-height: 20px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.92);
    padding: 1px;
    box-shadow: none;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .mobile-game-stepbar button {
    min-height: 18px;
    border-radius: 7px;
    font-size: 0.52rem;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .mobile-game-meta-bar {
    display: grid;
    grid-column: 2;
    grid-row: 1;
    grid-template-columns: minmax(68px, 1fr) 30px 30px;
    gap: 3px;
    align-self: stretch;
    justify-self: end;
    width: var(--mobile-landscape-meta-width);
    margin-right: 0;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .mobile-game-credit-chip,
  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .mobile-game-account-chip,
  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .mobile-game-settings-button {
    appearance: none;
    min-width: 0;
    min-height: 22px;
    border: 1px solid rgba(216, 222, 223, 0.95);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink);
    padding: 0 6px;
    font: inherit;
    cursor: pointer;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .mobile-game-credit-chip {
    display: grid;
    align-content: center;
    gap: 0;
    text-align: left;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .mobile-game-credit-chip span {
    color: var(--muted);
    font-size: 0.42rem;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .mobile-game-credit-chip small {
    overflow: hidden;
    color: var(--teal);
    font-size: 0.62rem;
    font-weight: 1000;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .mobile-game-account-chip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    overflow: hidden;
    font-size: 0.58rem;
    font-weight: 900;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .mobile-game-avatar {
    flex: 0 0 auto;
    width: 18px;
    font-size: 0.56rem;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .mobile-game-account-name {
    display: none;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .mobile-game-settings-button {
    display: grid;
    place-items: center;
    padding: 0;
    color: var(--teal);
    font-size: 0;
    font-weight: 1000;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .mobile-game-settings-button::before {
    content: "\2699";
    font-size: 1rem;
    line-height: 1;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .game-stage {
    display: contents;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .game-toolbar {
    grid-column: 1;
    grid-row: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 5px;
    min-width: 0;
    min-height: 22px;
    padding: 3px 6px;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .game-toolbar > div:first-child {
    min-width: 0;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .game-toolbar h2 {
    overflow: hidden;
    margin-top: 1px;
    font-size: 0.76rem;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .eyebrow {
    font-size: 0.46rem;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .game-actions {
    display: flex;
    gap: 4px;
    width: auto;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .game-actions button,
  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .audio-action {
    min-width: 56px;
    width: auto;
    min-height: 20px;
    padding: 0 5px;
    font-size: 0.5rem;
    white-space: nowrap;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .game-hud {
    grid-column: 2;
    grid-row: 2;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 3px;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .game-hud article {
    border-radius: 9px;
    padding: 2px 5px;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .game-hud small {
    font-size: 0.38rem;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .game-hud span {
    margin-top: 1px;
    font-size: 0.66rem;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .current-ball-tile span {
    font-size: 0.78rem;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .called-ball-strip {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    width: calc((31px * 6) + (4px * 5) + 12px);
    max-width: 100%;
    min-height: 36px;
    height: 36px;
    gap: 4px;
    overflow: hidden;
    padding: 2px 6px;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .called-ball {
    flex: 0 0 auto;
    width: 31px;
    will-change: transform;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .called-ball-empty {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .called-ball.roll-in {
    animation: called-ball-roll-in 560ms cubic-bezier(0.22, 0.9, 0.24, 1) both;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .called-ball.push-slide {
    animation: called-ball-push-slide 560ms cubic-bezier(0.22, 0.9, 0.24, 1) both;
  }

  @keyframes called-ball-roll-in {
    from {
      opacity: 0;
      transform: translateX(-34px) rotate(-300deg) scale(0.82);
    }

    72% {
      opacity: 1;
      transform: translateX(2px) rotate(14deg) scale(1.04);
    }

    to {
      opacity: 1;
      transform: translateX(0) rotate(0deg) scale(1);
    }
  }

  @keyframes called-ball-push-slide {
    from {
      transform: translateX(-32px);
    }

    to {
      transform: translateX(0);
    }
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .called-ball-face {
    width: 72%;
    border-width: 1px;
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.9),
      inset -1px -2px 3px rgba(29, 35, 41, 0.12),
      inset 1px 1px 2px rgba(255, 255, 255, 0.95);
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .called-ball-face small {
    font-size: 0.3rem;
    margin-top: 0;
    transform: translateY(-2px);
    line-height: 0.85;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .called-ball-face strong {
    color: #111;
    font-size: 0.68rem;
    font-weight: 1000;
    margin-top: -4px;
    line-height: 0.9;
  }

  @media (prefers-reduced-motion: reduce) {
    body.mobile-landscape-game .game-shell[data-mobile-step="game"] .called-ball.roll-in,
    body.mobile-landscape-game .game-shell[data-mobile-step="game"] .called-ball.push-slide {
      animation: none;
    }
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .game-cards-grid {
    grid-column: 1 / -1;
    grid-row: 3;
    align-self: stretch;
    min-height: 252px;
    border-radius: 10px;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .game-cards-grid.table-theme-fiesta,
  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .game-cards-grid.table-theme-beach,
  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .game-cards-grid.table-theme-halloween {
    --theme-scene-height: max(252px, 100%);
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .game-card-frame {
    width: 171px;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .game-card-footer {
    min-height: 22px;
    padding: 2px 7px;
    font-size: 0.62rem;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .other-player-cards-zone {
    gap: 5px;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .other-player-cards-title {
    padding: 2px 7px;
    font-size: 0.52rem;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .other-player-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(92px, 106px));
    gap: 8px;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .other-player-card-frame .bingo-card {
    border-width: 3px;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .other-player-card-frame .grid-panel {
    padding: 3px;
    padding-top: 0;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .other-player-card-frame .bingo-grid {
    --bingo-header-row-height: 7px;
    --bingo-panel-bottom-padding: 3px;
    gap: 1.5px;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .table-chat-panel {
    top: 2px;
    right: 2px;
    bottom: auto;
    left: auto;
    width: var(--mobile-landscape-chat-width);
    height: calc(100% - 4px);
    min-height: 220px;
    max-height: none;
    border-radius: 10px;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .table-chat-header {
    min-height: 62px;
    gap: 5px;
    padding: 6px 8px;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .table-chat-title strong {
    font-size: 0.82rem;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .table-chat-tab {
    padding: 4px 6px;
    font-size: 0.66rem;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .table-chat-messages {
    padding: 8px 9px;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .table-chat-form {
    gap: 5px;
    padding: 6px 8px 8px;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .table-chat-avatar {
    width: 24px;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .table-chat-input {
    height: 30px;
    font-size: 0.76rem;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .table-chat-emoji-toggle,
  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .table-chat-send {
    width: 30px;
    height: 30px;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .game-cards-grid .game-empty {
    padding-right: calc(var(--mobile-landscape-chat-width) + 22px);
    padding-bottom: 0;
  }
}
