/* Compact layouts for short landscape screens. Written in the same units as
   the other sheets: on phones js/game/ui-scale.js maps media queries and vw/vh
   to the scaled "virtual" viewport, so (max-height: 760px) here means a
   virtual height of 760px. Loaded after the sheets it overrides. */

/* ----- Lobby: fit the whole screen without a scrollbar ----- */
@media (max-height: 760px) and (orientation: landscape) {
  #lobby.racing-home {
    display: flex;
    flex-direction: column;
  }
  #lobby.racing-home .lobby-header {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    flex: none;
    height: 54px;
    margin: 0 3.3%;
    padding-top: 6px;
  }
  #lobby.racing-home .lobby-workspace {
    flex: 1 1 0;
    min-height: 0;
    margin: 0 auto;
    padding: 6px 0 4px;
    justify-content: center;
  }
  #lobby.racing-home .lobby-section-heading {
    flex: none;
    margin-bottom: 6px;
    font-size: 8px;
  }
  #lobby.racing-home #lobby-nav {
    height: 33px;
    margin-bottom: 8px;
  }
  #lobby.racing-home #lobby-nav > button {
    font-size: 13px;
    padding: 6px 10px;
  }
  #lobby.racing-home .lobby-tiles {
    flex: 1 1 0;
    height: auto;
    min-height: 0;
    max-height: none;
    gap: 7px;
  }
  #lobby.racing-home .tile-column {
    gap: 7px;
  }
  #lobby.racing-home .tile-column-right {
    grid-template-rows: minmax(0, 1.1fr) minmax(0, 0.9fr) minmax(0, 0.9fr);
  }
  #lobby.racing-home .quick-access {
    min-height: 0;
  }
  #lobby.racing-home .lobby-underbar {
    flex: none;
  }
  #lobby.racing-home .lobby-footer {
    position: relative;
    flex: none;
    height: 30px;
    margin: 0 3.3%;
  }
}

/* ----- Transition loader (garage / drive / race): fit short landscape ----- */
@media (max-height: 700px) and (orientation: landscape) {
  #match-loading.reference-transition {
    overflow: hidden;
  }
  #match-loading.reference-transition .loading-content {
    left: 6%;
    width: min(560px, 62%);
    padding: 7vh 0 24px;
  }
  #match-loading.reference-transition .eyebrow {
    font-size: 10px;
  }
  #match-loading.reference-transition h2 {
    font-size: clamp(34px, 9vh, 64px);
    margin: 8px 0;
  }
  #match-loading.reference-transition p {
    font-size: 11px;
    line-height: 1.4;
  }
  #match-loading.reference-transition .loading-rule {
    margin: 12px 0;
  }
  #match-loading.reference-transition strong {
    font-size: clamp(15px, 3vh, 20px);
  }
  #match-loading.reference-transition small.atra-load-tip {
    margin: 8px 0 14px;
    font-size: 12px;
    line-height: 1.4;
  }
  #match-loading.reference-transition .transition-status {
    margin-top: 8px;
    font-size: 10px;
  }
  #match-loading.reference-transition .load-retry {
    margin-top: 12px;
    padding: 8px 14px;
    font-size: 11px;
  }
  #match-loading.reference-transition .loading-brand {
    right: 4%;
    bottom: 5%;
    font-size: clamp(26px, 6vh, 40px);
  }
  #match-loading.reference-transition .loading-brand small {
    margin-top: 6px;
    font-size: 8px;
  }
}
