/* Keep the TV masthead readable on wide landscape windows whose aspect ratio
   otherwise triggers the compact stacked layout. The old fixed 48px height
   clipped the clock and connection row after it wrapped. */
@media screen and (orientation: landscape) and (min-width: 1100px) and (min-height: 500px) {
  body.tv-broadcast-body > .topbar {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: clamp(8px, 1vw, 16px) !important;
    box-sizing: border-box !important;
    height: auto !important;
    min-height: 54px !important;
    max-height: none !important;
    padding: 4px clamp(12px, 1.6vw, 24px) !important;
    overflow: visible !important;
  }

  body.tv-broadcast-body > .topbar > .brand {
    order: 0 !important;
    flex: 0 0 auto !important;
    min-width: max-content !important;
  }

  body.tv-broadcast-body > .topbar > .topbar-center {
    order: 0 !important;
    flex: 0 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    margin: 0 auto !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    overflow: hidden !important;
  }

  body.tv-broadcast-body > .topbar > .topbar-center .studio-clock-chip,
  body.tv-broadcast-body > .topbar > .topbar-center .connection {
    flex: 0 1 auto !important;
    min-width: 0 !important;
    white-space: nowrap !important;
  }

  body.tv-broadcast-body > .topbar > .topbar-center .connection {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  body.tv-broadcast-body > .topbar > nav {
    order: 0 !important;
    display: flex !important;
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    flex-wrap: nowrap !important;
    justify-content: flex-end !important;
  }
}

/* Give intermediate landscape widths two complete rows instead of squeezing
   the connection status beneath a fixed-height header. */
@media screen and (orientation: landscape) and (min-width: 700px) and (max-width: 1099px) and (min-height: 500px) {
  body.tv-broadcast-body > .topbar {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    align-content: start !important;
  }

  body.tv-broadcast-body > .topbar > .topbar-center {
    min-height: 28px !important;
    overflow: visible !important;
  }
}
