/* RadarCeska RRAIL R13 - prevent legacy overlay flash during Trains mode.
 * Keep #trainOverview in DOM: the R18 native bridge may still read its rows.
 * Do not change map sizes, right-drawer layout, or existing event handlers.
 * Modern Chromium :has() matches the active native layer synchronously.
 */
@media (min-width: 831px) {
  body[data-railPub-r17="trains"] #trainOverview,
  body:has(button.layer-chip[data-layer="trains"].is-active) #trainOverview,
  body:has(button.layer-chip[data-layer="trains"][aria-pressed="true"]) #trainOverview,
  body[data-railPub-r17="trains"] #r5Panel,
  body:has(button.layer-chip[data-layer="trains"].is-active) #r5Panel,
  body:has(button.layer-chip[data-layer="trains"][aria-pressed="true"]) #r5Panel {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    animation: none !important;
    transition: none !important;
  }
}
