/* P67: responsive Race Lab presentation fixes.
 * Keep the established mobile scale, while reducing desktop map labels by 20%.
 * The start-signal board is an independent header segment and must remain
 * visible on mobile Race Lab views.
 */
@media (min-width: 821px) {
  .ow-racelab-v2-icon .ow-rl2-label,
  .ow-rv4e-label,
  .ow-live-standard-label-r2j,
  .leaflet-tooltip.tracker-label,
  .leaflet-tooltip.ow-tracker-map-label {
    font-size: 11.2px !important;
    line-height: 1.15 !important;
    padding: 2.4px 5.6px !important;
    min-height: 18px !important;
    max-width: 120px !important;
  }
}

@media (max-width: 820px) {
  body.mobile-ui-active.ow-p36-mobile-header > header {
    grid-template-columns: minmax(96px, 1fr) auto 32px 36px 36px !important;
    grid-template-areas: "brand wind flags command account" !important;
  }

  body.mobile-ui-active.ow-p36-mobile-header
  #simulator-header-status-slot {
    grid-area: flags !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    min-width: 32px !important;
    height: 36px !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.mobile-ui-active.ow-p36-mobile-header
  #simulator-header-status-slot
  #ow-static-mode-status-v1.ow-start-signal-status {
    display: inline-flex !important;
    width: 30px !important;
    min-width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  body.mobile-ui-active.ow-p36-mobile-header
  #simulator-header-status-slot
  #ow-static-mode-status-v1
  .ow-start-signal-summary {
    display: none !important;
  }

  #ow-static-mode-status-v1.ow-start-signal-status {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    min-width: 58px !important;
    min-height: 32px !important;
    padding: 0 2px !important;
    border: 0 !important;
    background: transparent !important;
  }

  #ow-static-mode-status-v1 .ow-start-signal-summary {
    min-width: 0 !important;
  }
}

/* P76: one final map-label scale across Live, Race Lab and Replay.
 * The earlier P44/P45 rules restored larger labels after P67; keep this
 * declaration last so the labels and their typography are 15% smaller than
 * the P70 presentation across the whole map.
 */
@media (min-width: 821px) {
  .ow-racelab-v2-icon .ow-rl2-label,
  .ow-rl2-label,
  .ow-rv4e-label,
  .ow-live-standard-label-r2j,
  .leaflet-tooltip.tracker-label,
  .leaflet-tooltip.ow-tracker-map-label {
    font-size: 8.075px !important;
    line-height: 1.15 !important;
    padding: 1.7px 4.08px !important;
    min-height: 12.75px !important;
    max-width: 86.7px !important;
  }
}

@media (max-width: 820px) {
  .ow-racelab-v2-icon .ow-rl2-label,
  .ow-rl2-label,
  .ow-rv4e-label,
  .ow-live-standard-label-r2j,
  .leaflet-tooltip.tracker-label,
  .leaflet-tooltip.ow-tracker-map-label {
    font-size: 9.35px !important;
    line-height: 1.15 !important;
    padding: 2.125px 5.1px !important;
    min-height: 15.3px !important;
    max-width: 88.4px !important;
  }
}

.ow-rl2-label-color-dot-v1b,
.ow-rv4e-label-color-dot-v1b,
.ow-live-standard-label-r2j > span:first-child {
  width: 6.8px !important;
  height: 6.8px !important;
  min-width: 6.8px !important;
  min-height: 6.8px !important;
}
