/* Radar Česka V5.7.8 · Live Five + Legend Owner
   UI/state cleanup over V5.7.7. No PointCube / radar / model backend changes. */

/* --------------------------------------------------------------------------
   LEGEND OWNER — WEATHER LAYERS
   --------------------------------------------------------------------------
   Legacy floating legends remain retired, except the desktop native wind
   legend. Wind is a continuous scalar field and needs its km/h scale visible.
   Mobile still uses the compact integrated timeline legend.
*/
#radarV5Legend,
#modelLegend,
#modelTemperatureV11Legend,
#cloudEngineStableLegend,
#stormNativeLegendV180,
.model-temperature-v11-legend,
.model-precip-v12-legend,
.cloud-engine-stable-legend,
.cloud-inline-legend,
.storm-native-legend-v180,
.storm-native-legend{
  display:none!important;
  visibility:hidden!important;
  pointer-events:none!important;
}

/* rcV574Legend is the integrated mobile timeline legend. It must never survive
   as a free desktop DOM block after a resize/orientation/breakpoint change. */
@media (min-width:701px){
  #rcV574Legend,#rcV574Live{
    display:none!important;
    visibility:hidden!important;
    pointer-events:none!important;
  }
}

/* --------------------------------------------------------------------------
   ŽIVĚ — FIVE EVENTS ON BOTH MOBILE AND DESKTOP
   -------------------------------------------------------------------------- */
@media (min-width:1101px){
  .app-shell[data-mode="weather"] .live-feed:not([hidden]){
    width:330px!important;
    max-height:min(570px,calc(100dvh - 238px))!important;
    padding:13px!important;
  }
  .live-feed-list{
    display:grid!important;
    gap:6px!important;
    max-height:none!important;
    overflow:hidden!important;
    padding-right:0!important;
    scrollbar-width:none!important;
  }
  .live-feed-list::-webkit-scrollbar{display:none!important}
  .live-feed-item{
    min-height:58px!important;
    padding:8px 8px!important;
  }
  .live-feed-copy strong{-webkit-line-clamp:1!important}
  .live-feed-copy span{-webkit-line-clamp:2!important}
}

/* Small desktop/tablet: Živě stays lower-right, but with the floating legend
   gone it can use the first lower-right slot and fit five compact stories. */
@media (max-width:1100px) and (min-width:701px){
  .app-shell[data-mode="weather"] .live-feed:not([hidden]),
  #app.radar-engine-v5-active .live-feed:not([hidden]){
    right:76px!important;
    bottom:86px!important;
    width:min(342px,calc(100vw - 102px))!important;
    max-height:min(520px,calc(100dvh - 170px))!important;
    padding:12px!important;
    overflow:hidden!important;
  }
  .live-feed-list{
    display:grid!important;
    gap:5px!important;
    max-height:none!important;
    overflow:hidden!important;
    padding-right:0!important;
    scrollbar-width:none!important;
  }
  .live-feed-list::-webkit-scrollbar{display:none!important}
  .live-feed-item{
    min-height:55px!important;
    padding:7px 8px!important;
  }
  .live-feed-copy strong{-webkit-line-clamp:1!important}
  .live-feed-copy span{-webkit-line-clamp:2!important}
}

@media (max-width:700px){
  /* Five events are rendered by app.js. Give them enough list budget while the
     full transform-only sheet remains the outer scroll/gesture owner. */
  .mobile-live-list{
    max-height:min(52dvh,430px)!important;
  }
  .mobile-live-item{
    min-height:59px!important;
  }
}
