/* ECHOWX_R235J_RADAR_DOCK_LAYOUT_RESET
   Desktop-only hard reset of the r235h/r235i Radar control-deck geometry.
   This replaces the conflicting dock positioning rules; it does not change
   Radar data, playback, caching, the publisher, mobile UI, or Outlooks.
*/

@media (min-width: 900px) {
  body.echowx-r235h-radar-page {
    --r235j-deck-width: calc(100vw - 20px);
    --r235j-row-gap: 6px;
  }

  /*
   * Explicitly reset legacy/follow-up positioning so every row participates
   * in normal vertical flow. This prevents the command dock from sitting over
   * the selector row.
   */
  body.echowx-r235h-radar-page .echowx-r235h-timeline-row,
  body.echowx-r235h-radar-page .echowx-r235h-selector-row,
  body.echowx-r235h-radar-page .echowx-r235h-command-row {
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    transform: none !important;
    float: none !important;
    clear: both !important;
    box-sizing: border-box !important;
    width: var(--r235j-deck-width) !important;
    max-width: var(--r235j-deck-width) !important;
    margin-left: 10px !important;
    margin-right: 10px !important;
    overflow: visible !important;
  }

  body.echowx-r235h-radar-page .echowx-r235h-timeline-row {
    z-index: 3 !important;
    min-height: 44px !important;
    height: 44px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding: 4px 10px !important;
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
  }

  /*
   * The selector row is a centered control group. No child is allowed to use
   * margin-left:auto or escape the row at the right edge.
   */
  body.echowx-r235h-radar-page .echowx-r235h-selector-row {
    z-index: 2 !important;
    min-height: 56px !important;
    height: 56px !important;
    margin-top: 0 !important;
    margin-bottom: var(--r235j-row-gap) !important;
    padding: 6px 12px !important;
    display: flex !important;
    flex-flow: row nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
  }

  body.echowx-r235h-radar-page .echowx-r235h-selector {
    position: relative !important;
    inset: auto !important;
    transform: none !important;
    display: grid !important;
    grid-template-rows: 10px 22px !important;
    align-content: center !important;
    align-items: center !important;
    min-width: 0 !important;
    min-height: 42px !important;
    height: 42px !important;
    margin: 0 !important;
    padding: 4px 10px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  body.echowx-r235h-radar-page .echowx-r235h-selector label,
  body.echowx-r235h-radar-page .echowx-r235h-selector [class*="label"] {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    display: block !important;
    width: 100% !important;
    height: 10px !important;
    min-height: 10px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    line-height: 10px !important;
    white-space: nowrap !important;
  }

  body.echowx-r235h-radar-page .echowx-r235h-selector select {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 22px !important;
    min-height: 22px !important;
    margin: 0 !important;
    padding: 0 24px 0 0 !important;
    line-height: 22px !important;
    overflow: visible !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.echowx-r235h-radar-page .echowx-r235h-location-selector {
    flex: 0 1 270px !important;
    width: 270px !important;
    max-width: 270px !important;
  }

  body.echowx-r235h-radar-page .echowx-r235h-product-selector {
    flex: 0 1 430px !important;
    width: min(430px, 34vw) !important;
    max-width: 430px !important;
  }

  body.echowx-r235h-radar-page .echowx-r235h-tilt-selector {
    flex: 0 1 165px !important;
    width: 165px !important;
    max-width: 165px !important;
  }

  body.echowx-r235h-radar-page .echowx-r235h-draw-button {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    flex: 0 0 94px !important;
    width: 94px !important;
    min-width: 94px !important;
    max-width: 94px !important;
    height: 42px !important;
    min-height: 42px !important;
    margin: 0 !important;
  }

  body.echowx-r235h-radar-page .echowx-r235h-live-pill {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    flex: 0 0 68px !important;
    width: 68px !important;
    min-width: 68px !important;
    max-width: 68px !important;
    height: 26px !important;
    margin: 0 !important;
    padding: 0 8px !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    white-space: nowrap !important;
  }

  /*
   * Center the five command actions as one bounded group. They no longer
   * stretch from edge to edge or inherit offsets from older dock rules.
   */
  body.echowx-r235h-radar-page .echowx-r235h-command-row {
    z-index: 1 !important;
    min-height: 52px !important;
    height: 52px !important;
    margin-top: 0 !important;
    margin-bottom: 10px !important;
    padding: 4px 14px !important;
    display: flex !important;
    flex-flow: row nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
  }

  body.echowx-r235h-radar-page .echowx-r235h-command-button {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    flex: 0 1 190px !important;
    width: 190px !important;
    min-width: 130px !important;
    max-width: 190px !important;
    height: 42px !important;
    min-height: 42px !important;
    margin: 0 !important;
    border-radius: 9px !important;
  }

  body.echowx-r235h-radar-page
    .echowx-r235h-command-button + .echowx-r235h-command-button {
    border-left-color: transparent !important;
  }

  /*
   * Maintain usable geometry on narrower desktop windows without allowing
   * either dock to overlap.
   */
  @media (max-width: 1120px) {
    body.echowx-r235h-radar-page .echowx-r235h-location-selector {
      flex-basis: 220px !important;
      width: 220px !important;
      max-width: 220px !important;
    }

    body.echowx-r235h-radar-page .echowx-r235h-product-selector {
      flex: 1 1 300px !important;
      width: auto !important;
      max-width: 390px !important;
    }

    body.echowx-r235h-radar-page .echowx-r235h-command-button {
      flex-basis: 160px !important;
      width: 160px !important;
      min-width: 115px !important;
      max-width: 160px !important;
    }
  }
}
