/* ZeroRiskk COMTRADE Viewer module: playable Distance Mho R-X workbench with Fault-Location-style pilot evidence. */

.gcw-root.gcw-tool-open .gcw-query-page[data-tool="distance"] .gcw-query-chart-wrap {
  padding: 0 !important;
  overflow: hidden !important;
}

.gcw-root.gcw-tool-open .gcw-query-page[data-tool="distance"] .gcw-workbench-floating-toolbar {
  top: 7px !important;
  right: 12px !important;
  z-index: 10 !important;
}

.gcw-root.gcw-tool-open .gcw-query-page[data-tool="distance"] .gcw-fault-rx-side-layout,
body.zrk-comtrade-body .gcw-root.gcw-tool-open .gcw-query-page[data-tool="distance"] .gcw-fault-rx-side-layout,
.gcw-root.gcw-viewport-full.gcw-tool-open .gcw-query-page[data-tool="distance"] .gcw-fault-rx-side-layout {
  flex: 1 1 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  display: flex !important;
  overflow: hidden !important;
  gap: 0 !important;
}

.gcw-root.gcw-tool-open .gcw-query-page[data-tool="distance"] .gcw-distance-rx-cockpit-layout,
body.zrk-comtrade-body .gcw-root.gcw-tool-open .gcw-query-page[data-tool="distance"] .gcw-distance-rx-cockpit-layout,
.gcw-root.gcw-viewport-full.gcw-tool-open .gcw-query-page[data-tool="distance"] .gcw-distance-rx-cockpit-layout {
  flex: 1 1 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: var(--gcw-fault-rx-side-width, 352px) 12px minmax(0, 1fr) !important;
  gap: 0 !important;
  overflow: hidden !important;
}

.gcw-root.gcw-tool-open .gcw-query-page[data-tool="distance"] .gcw-distance-info-pane {
  min-width: 0 !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  border: 1px solid rgba(15,118,110,.18) !important;
  border-radius: 12px 0 0 12px !important;
  background: #ffffff !important;
  box-shadow: inset -1px 0 0 rgba(226,232,240,.75) !important;
}

.gcw-root.gcw-tool-open .gcw-query-page[data-tool="distance"] .gcw-distance-info-head {
  flex: 0 0 32px !important;
  min-height: 32px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  padding: 5px 8px !important;
  border-bottom: 1px solid rgba(226,232,240,.95) !important;
  background: linear-gradient(180deg, #ecfeff, #ffffff) !important;
}

.gcw-root.gcw-tool-open .gcw-query-page[data-tool="distance"] .gcw-distance-info-head strong {
  color: #0f172a !important;
  font-size: 11.2px !important;
  font-weight: 950 !important;
  white-space: nowrap !important;
}

.gcw-root.gcw-tool-open .gcw-query-page[data-tool="distance"] .gcw-distance-info-head span {
  color: #0f766e !important;
  font-size: 9.4px !important;
  font-weight: 850 !important;
  white-space: nowrap !important;
}

.gcw-root.gcw-tool-open .gcw-query-page[data-tool="distance"] .gcw-distance-cockpit-scroll {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  overflow: auto !important;
  padding: 6px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  scrollbar-width: thin !important;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
}

.gcw-root.gcw-tool-open .gcw-query-page[data-tool="distance"] .gcw-fault-rx-side-resizer {
  min-width: 12px !important;
  width: 12px !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: col-resize !important;
  background: linear-gradient(180deg, #ecfeff, #a7f3d0, #ecfeff) !important;
  border-top: 1px solid rgba(15,118,110,.18) !important;
  border-bottom: 1px solid rgba(15,118,110,.18) !important;
  user-select: none !important;
  touch-action: none !important;
}

.gcw-root.gcw-tool-open .gcw-query-page[data-tool="distance"] .gcw-fault-rx-side-resizer::before {
  width: 3px !important;
  height: 54px !important;
  border-radius: 99px !important;
  background: rgba(15,118,110,.58) !important;
}

.gcw-root.gcw-tool-open .gcw-query-page[data-tool="distance"] .gcw-distance-rx-plot-panel,
body.zrk-comtrade-body .gcw-root.gcw-tool-open .gcw-query-page[data-tool="distance"] .gcw-distance-rx-plot-panel,
.gcw-root.gcw-viewport-full.gcw-tool-open .gcw-query-page[data-tool="distance"] .gcw-distance-rx-plot-panel {
  min-width: 0 !important;
  min-height: 0 !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  position: relative !important;
  overflow: hidden !important;
  border: 1px solid rgba(15,118,110,.16) !important;
  border-left: 0 !important;
  border-radius: 0 12px 12px 0 !important;
  background: #ffffff !important;
}

.gcw-distance-plot-head {
  flex: 0 0 48px !important;
  min-height: 48px !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 8px 16px !important;
  border-bottom: 1px solid rgba(226,232,240,.96) !important;
  background: #ffffff !important;
}

.gcw-distance-plot-head > strong {
  color: #0f172a !important;
  font-size: 13px !important;
  font-weight: 950 !important;
  letter-spacing: -.01em !important;
  white-space: nowrap !important;
  margin-right: auto !important;
}

.gcw-distance-loop-chips {
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  flex-wrap: nowrap !important;
}

.gcw-distance-loop-chip {
  height: 24px !important;
  min-width: 39px !important;
  padding: 0 12px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(148,163,184,.34) !important;
  background: #ffffff !important;
  color: #334155 !important;
  font-size: 10px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  cursor: pointer !important;
  box-shadow: 0 2px 6px rgba(15,23,42,.04) !important;
}

.gcw-distance-loop-chip.is-active {
  border-color: rgba(249,115,22,.84) !important;
  background: linear-gradient(180deg, #fb923c, #f97316) !important;
  color: #ffffff !important;
  box-shadow: 0 7px 14px rgba(249,115,22,.22) !important;
}

.gcw-distance-icon-btn {
  width: 30px !important;
  height: 30px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 10px !important;
  border: 1px solid rgba(13,148,136,.14) !important;
  background: #ecfdf5 !important;
  color: #0f766e !important;
  font-size: 16px !important;
  font-weight: 950 !important;
  cursor: pointer !important;
}

.gcw-distance-mini-player {
  flex: 0 0 38px !important;
  min-height: 38px !important;
  display: grid !important;
  grid-template-columns: 28px 28px 28px minmax(160px, 1fr) auto 42px !important;
  align-items: center !important;
  gap: 7px !important;
  padding: 5px 16px !important;
  border-bottom: 1px solid rgba(226,232,240,.92) !important;
  background: linear-gradient(180deg, #ffffff, #f8fafc) !important;
}

.gcw-distance-play-icon,
.gcw-distance-mini-btn,
.gcw-distance-speed-select {
  height: 26px !important;
  min-height: 26px !important;
  border-radius: 9px !important;
  border: 1px solid rgba(148,163,184,.26) !important;
  background: #ffffff !important;
  color: #475569 !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  cursor: pointer !important;
  padding: 0 !important;
}

.gcw-distance-play-icon.is-playing {
  border-color: rgba(15,118,110,.34) !important;
  background: #ccfbf1 !important;
  color: #0f766e !important;
}

.gcw-distance-slider-shell {
  position: relative !important;
  height: 22px !important;
  border-radius: 999px !important;
  background: #f1f5f9 !important;
  overflow: visible !important;
  border: 0 !important;
}

.gcw-distance-slider-fill {
  position: absolute !important;
  left: 0 !important;
  top: 8px !important;
  height: 4px !important;
  border-radius: 999px !important;
  background: #0d9488 !important;
  pointer-events: none !important;
}

.gcw-distance-time-slider {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  opacity: 0 !important;
  cursor: pointer !important;
}

.gcw-distance-slider-shell::after {
  content: '' !important;
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  top: 10px !important;
  height: 2px !important;
  border-radius: 999px !important;
  background: rgba(226,232,240,.95) !important;
  z-index: 0 !important;
}

.gcw-distance-slider-fill { z-index: 1 !important; }
.gcw-distance-time-slider { z-index: 3 !important; }

.gcw-distance-play-time-ms {
  white-space: nowrap !important;
  color: #475569 !important;
  font-size: 10px !important;
  font-weight: 850 !important;
  font-variant-numeric: tabular-nums !important;
}

.gcw-distance-play-time-ms i,
.gcw-distance-play-time-ms b {
  font-style: normal !important;
  font-weight: 900 !important;
  color: #334155 !important;
}

.gcw-distance-speed-select {
  width: 42px !important;
  text-align: center !important;
  color: #334155 !important;
}

.gcw-distance-rx-plot-core {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  padding: 0 10px !important;
  position: relative !important;
}

.gcw-distance-rx-plot-panel .gcw-tool-uplot-shell,
.gcw-distance-rx-plot-panel .gcw-tool-plotly-shell {
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: #ffffff !important;
  display: flex !important;
  flex-direction: column !important;
}

.gcw-distance-rx-plot-panel .gcw-tool-uplot,
.gcw-distance-rx-plot-panel .gcw-tool-plotly {
  flex: 1 1 0 !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: hidden !important;
}

.gcw-distance-rx-plot-panel .gcw-tool-uplot-head,
.gcw-distance-rx-plot-panel .gcw-tool-uplot-readout,
.gcw-distance-rx-plot-panel .gcw-tool-plot-resize-grip {
  display: none !important;
}

.gcw-distance-rx-plot-panel .modebar-container {
  top: 8px !important;
  right: 10px !important;
}

.gcw-distance-plot-readout {
  flex: 0 0 36px !important;
  min-height: 36px !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 0 16px !important;
  border-top: 1px solid rgba(226,232,240,.96) !important;
  background: #ffffff !important;
  color: #334155 !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}

.gcw-distance-plot-readout span,
.gcw-distance-plot-readout strong {
  min-width: 0 !important;
}

.gcw-distance-readout-dot {
  flex: 0 0 10px !important;
  width: 10px !important;
  height: 10px !important;
  border-radius: 50% !important;
  background: #f97316 !important;
  box-shadow: 0 0 0 3px rgba(249,115,22,.12) !important;
}

.gcw-distance-plot-readout b {
  color: #0f172a !important;
  font-weight: 950 !important;
}

.gcw-distance-plot-readout .is-spacer {
  flex: 1 1 auto !important;
}

.gcw-distance-zone-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 30px !important;
  height: 22px !important;
  padding: 0 8px !important;
  border-radius: 8px !important;
  color: #ffffff !important;
  background: #c084fc !important;
  font-size: 10px !important;
  font-weight: 950 !important;
}

.gcw-distance-answers-card,
.gcw-distance-setup-drawer,
.gcw-distance-warning-drawer,
.gcw-distance-summary-drawer,
.gcw-distance-evidence-card,
.gcw-distance-reach-strip,
.gcw-root.gcw-tool-open .gcw-query-page[data-tool="distance"] .gcw-electrical-map-panel {
  margin: 0 !important;
  border-radius: 10px !important;
  border: 1px solid rgba(148,163,184,.22) !important;
  background: #ffffff !important;
  box-shadow: 0 2px 8px rgba(15,23,42,.04) !important;
}

.gcw-distance-answers-card header {
  min-height: 32px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  padding: 7px 8px !important;
  border-bottom: 1px solid rgba(226,232,240,.92) !important;
  background: linear-gradient(180deg, #f8fafc, #ffffff) !important;
}

.gcw-distance-answers-card header div {
  display: flex !important;
  flex-direction: column !important;
  gap: 1px !important;
}

.gcw-distance-answers-card header strong {
  color: #0f172a !important;
  font-size: 12px !important;
  font-weight: 950 !important;
}

.gcw-distance-answers-card header span {
  color: #0f766e !important;
  font-size: 9.7px !important;
  font-weight: 850 !important;
}

.gcw-distance-answers-card header b {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 26px !important;
  height: 26px !important;
  border-radius: 9px !important;
  background: #ecfeff !important;
  color: #0f766e !important;
  border: 1px solid rgba(15,118,110,.18) !important;
  font-size: 12px !important;
  font-weight: 950 !important;
}

.gcw-distance-answers-card .gcw-fault-rx-cockpit-table {
  table-layout: fixed !important;
  width: 100% !important;
}

.gcw-distance-answers-card .gcw-fault-rx-cockpit-table th {
  width: 114px !important;
  padding: 7px 8px !important;
  color: #334155 !important;
  font-size: 10.5px !important;
  font-weight: 900 !important;
  vertical-align: top !important;
  border-bottom: 1px solid rgba(226,232,240,.7) !important;
}

.gcw-distance-answers-card .gcw-fault-rx-cockpit-table td {
  padding: 7px 8px !important;
  border-bottom: 1px solid rgba(226,232,240,.7) !important;
  vertical-align: top !important;
}

.gcw-distance-answers-card .gcw-fault-rx-cockpit-table td strong {
  display: block !important;
  color: #0f172a !important;
  font-size: 11.5px !important;
  font-weight: 950 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.gcw-distance-answers-card .gcw-fault-rx-cockpit-table td em {
  display: block !important;
  margin-top: 2px !important;
  color: #64748b !important;
  font-size: 10px !important;
  line-height: 1.22 !important;
  font-style: normal !important;
}

.gcw-distance-reach-strip {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 5px !important;
  padding: 6px !important;
}

.gcw-distance-reach-strip span {
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 1px !important;
  padding: 6px 6px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(148,163,184,.18) !important;
  background: #f8fafc !important;
}

.gcw-distance-reach-strip b {
  font-size: 11px !important;
  line-height: 1 !important;
  color: #0f172a !important;
  font-weight: 950 !important;
}

.gcw-distance-reach-strip em {
  font-style: normal !important;
  font-size: 9.2px !important;
  line-height: 1.12 !important;
  color: #64748b !important;
  font-weight: 850 !important;
}

.gcw-distance-reach-strip .is-zone1 { background: #f0fdf4 !important; border-color: rgba(34,197,94,.24) !important; }
.gcw-distance-reach-strip .is-zone2 { background: #eff6ff !important; border-color: rgba(96,165,250,.26) !important; }
.gcw-distance-reach-strip .is-zone3 { background: #faf5ff !important; border-color: rgba(168,85,247,.24) !important; }

.gcw-distance-setup-drawer summary,
.gcw-distance-warning-drawer summary,
.gcw-distance-summary-drawer summary {
  min-height: 30px !important;
  padding: 7px 9px !important;
  color: #0f172a !important;
  font-size: 11px !important;
  font-weight: 950 !important;
  cursor: pointer !important;
}

.gcw-distance-setup-drawer .gcw-tool-input-grid {
  padding: 0 7px 7px !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 5px !important;
}

.gcw-distance-setup-drawer p {
  margin: 0 8px 8px !important;
  color: #64748b !important;
  font-size: 10.3px !important;
  line-height: 1.28 !important;
}

.gcw-distance-evidence-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 6px !important;
}

.gcw-distance-evidence-card {
  padding: 7px 8px !important;
}

.gcw-distance-evidence-card header {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 7px !important;
  margin-bottom: 4px !important;
}

.gcw-distance-evidence-card header strong {
  font-size: 11.2px !important;
  color: #0f172a !important;
  font-weight: 950 !important;
}

.gcw-distance-evidence-card header span {
  text-align: right !important;
  font-size: 9.6px !important;
  line-height: 1.12 !important;
  color: #0f766e !important;
  font-weight: 900 !important;
}

.gcw-distance-evidence-card p {
  margin: 0 0 4px !important;
  color: #475569 !important;
  font-size: 10.4px !important;
  line-height: 1.24 !important;
}

.gcw-distance-evidence-card ul {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: grid !important;
  gap: 2px !important;
}

.gcw-distance-evidence-card li {
  display: grid !important;
  grid-template-columns: 84px 1fr !important;
  gap: 6px !important;
  font-size: 9.9px !important;
  color: #334155 !important;
}

.gcw-distance-evidence-card li strong {
  color: #64748b !important;
  font-weight: 850 !important;
}

.gcw-distance-evidence-card.is-good,
.gcw-distance-evidence-card.is-zone1 {
  border-color: rgba(34,197,94,.28) !important;
  background: linear-gradient(180deg, #f0fdf4, #ffffff) !important;
}

.gcw-distance-evidence-card.is-zone2,
.gcw-distance-evidence-card.is-zone3,
.gcw-distance-evidence-card.is-advisory {
  border-color: rgba(245,158,11,.25) !important;
  background: linear-gradient(180deg, #fffbeb, #ffffff) !important;
}

.gcw-distance-evidence-card.is-weak,
.gcw-distance-evidence-card.is-outside {
  border-color: rgba(239,68,68,.24) !important;
  background: linear-gradient(180deg, #fff1f2, #ffffff) !important;
}

.gcw-distance-copy-summary {
  width: calc(100% - 16px) !important;
  min-height: 132px !important;
  margin: 0 8px 8px !important;
  resize: vertical !important;
  border: 1px solid rgba(148,163,184,.28) !important;
  border-radius: 9px !important;
  padding: 8px !important;
  font-size: 10.4px !important;
  line-height: 1.34 !important;
  color: #0f172a !important;
  background: #f8fafc !important;
}

.gcw-root.gcw-tool-open .gcw-query-page[data-tool="distance"] .gcw-fault-rx-warning-card {
  margin: 0 7px 7px !important;
  padding: 7px !important;
  border-radius: 9px !important;
  border: 1px solid rgba(245,158,11,.23) !important;
  background: #fffbeb !important;
}

.gcw-root.gcw-tool-open .gcw-query-page[data-tool="distance"] .gcw-fault-rx-warning-card strong {
  font-size: 11px !important;
  color: #92400e !important;
}

.gcw-root.gcw-tool-open .gcw-query-page[data-tool="distance"] .gcw-fault-rx-warning-card p,
.gcw-root.gcw-tool-open .gcw-query-page[data-tool="distance"] .gcw-fault-rx-warning-card li {
  font-size: 10.2px !important;
  line-height: 1.28 !important;
  color: #78350f !important;
}

.gcw-root.gcw-tool-open .gcw-query-page[data-tool="distance"] .gcw-fault-rx-layout-tools {
  display: flex !important;
  gap: 5px !important;
  margin: 0 !important;
}

.gcw-root.gcw-tool-open .gcw-query-page[data-tool="distance"] .gcw-fault-rx-layout-tools .gcw-workbench-tool-btn {
  flex: 1 1 0 !important;
  min-height: 28px !important;
  font-size: 10px !important;
}



/* v3.4.10: Distance/R-X uses the same playback section as Fault Location. */
.gcw-root.gcw-tool-open .gcw-query-page[data-tool="distance"] .gcw-distance-graph-player-bar,
body.zrk-comtrade-body .gcw-root.gcw-tool-open .gcw-query-page[data-tool="distance"] .gcw-distance-graph-player-bar,
.gcw-root.gcw-viewport-full.gcw-tool-open .gcw-query-page[data-tool="distance"] .gcw-distance-graph-player-bar {
  flex: 0 0 auto !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 12 !important;
  padding: 4px 5px !important;
  border-bottom: 1px solid rgba(226,232,240,.95) !important;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
  box-shadow: 0 4px 12px rgba(15,23,42,.04) !important;
}
.gcw-root.gcw-tool-open .gcw-query-page[data-tool="distance"] .gcw-distance-graph-player-bar .gcw-fault-rx-player.gcw-phasor-player,
body.zrk-comtrade-body .gcw-root.gcw-tool-open .gcw-query-page[data-tool="distance"] .gcw-distance-graph-player-bar .gcw-fault-rx-player.gcw-phasor-player,
.gcw-root.gcw-viewport-full.gcw-tool-open .gcw-query-page[data-tool="distance"] .gcw-distance-graph-player-bar .gcw-fault-rx-player.gcw-phasor-player {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 7px !important;
  margin: 0 !important;
  padding: 4px 6px !important;
  border: 1px solid rgba(15,118,110,.14) !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  box-shadow: none !important;
}
.gcw-root.gcw-tool-open .gcw-query-page[data-tool="distance"] .gcw-distance-graph-player-bar .gcw-phasor-player-left {
  flex-wrap: nowrap !important;
  gap: 4px !important;
  min-width: max-content !important;
}
.gcw-root.gcw-tool-open .gcw-query-page[data-tool="distance"] .gcw-distance-graph-player-bar .gcw-phasor-player-main {
  min-width: 0 !important;
}
.gcw-root.gcw-tool-open .gcw-query-page[data-tool="distance"] .gcw-distance-graph-player-bar .gcw-phasor-time-meta {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 5px !important;
  overflow: hidden !important;
  white-space: nowrap !important;
}
.gcw-root.gcw-tool-open .gcw-query-page[data-tool="distance"] .gcw-distance-graph-player-bar .gcw-phasor-time-meta span {
  width: auto !important;
  min-width: 0 !important;
  display: inline-flex !important;
  justify-content: flex-start !important;
  gap: 3px !important;
  padding: 2px 5px !important;
  border-radius: 999px !important;
  background: #f8fafc !important;
  border: 1px solid rgba(226,232,240,.95) !important;
  color: #475569 !important;
}
.gcw-root.gcw-tool-open .gcw-query-page[data-tool="distance"] .gcw-distance-graph-player-bar .gcw-phasor-slider-shell {
  height: 17px !important;
  margin-top: 3px !important;
}
.gcw-root.gcw-tool-open .gcw-query-page[data-tool="distance"] .gcw-distance-graph-player-bar .gcw-phasor-play-btn,
.gcw-root.gcw-tool-open .gcw-query-page[data-tool="distance"] .gcw-distance-graph-player-bar .gcw-phasor-mini-btn,
.gcw-root.gcw-tool-open .gcw-query-page[data-tool="distance"] .gcw-distance-graph-player-bar .gcw-phasor-speed-select {
  height: 23px !important;
  min-height: 23px !important;
  font-size: 9.6px !important;
  padding: 2px 6px !important;
}
.gcw-root.gcw-tool-open .gcw-query-page[data-tool="distance"] .gcw-distance-graph-player-bar .gcw-phasor-speed-label {
  flex: 0 0 auto !important;
  min-width: 76px !important;
}

@media (max-width: 1320px) {
  .gcw-root.gcw-tool-open .gcw-query-page[data-tool="distance"] .gcw-distance-graph-player-bar .gcw-fault-rx-player.gcw-phasor-player {
    grid-template-columns: 1fr !important;
  }
  .gcw-root.gcw-tool-open .gcw-query-page[data-tool="distance"] .gcw-distance-graph-player-bar .gcw-phasor-player-left {
    flex-wrap: wrap !important;
  }
}
@media (max-width: 860px) {
  .gcw-root.gcw-tool-open .gcw-query-page[data-tool="distance"] .gcw-distance-graph-player-bar .gcw-phasor-time-meta {
    flex-wrap: wrap !important;
  }
}

@media (max-width: 1180px) {
  .gcw-distance-loop-chips { gap: 5px !important; }
  .gcw-distance-loop-chip { min-width: 34px !important; padding: 0 8px !important; }
  .gcw-distance-mini-player { grid-template-columns: 28px 28px minmax(130px, 1fr) auto 42px !important; }
  .gcw-distance-mini-player .gcw-distance-mini-btn:nth-of-type(2) { display: none !important; }
}

@media (max-width: 880px) {
  .gcw-root.gcw-tool-open .gcw-query-page[data-tool="distance"] .gcw-distance-rx-cockpit-layout {
    display: flex !important;
    flex-direction: column !important;
  }
  .gcw-root.gcw-tool-open .gcw-query-page[data-tool="distance"] .gcw-distance-info-pane {
    order: 2 !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    border-right: 1px solid rgba(15,118,110,.18) !important;
    border-top: 0 !important;
    border-radius: 0 0 12px 12px !important;
    max-height: 42vh !important;
  }
  .gcw-root.gcw-tool-open .gcw-query-page[data-tool="distance"] .gcw-fault-rx-side-resizer {
    display: none !important;
  }
  .gcw-root.gcw-tool-open .gcw-query-page[data-tool="distance"] .gcw-distance-rx-plot-panel {
    order: 1 !important;
    min-height: 520px !important;
    border-left: 1px solid rgba(15,118,110,.16) !important;
    border-radius: 12px 12px 0 0 !important;
  }
  .gcw-distance-plot-head {
    flex-wrap: wrap !important;
    min-height: 76px !important;
    align-items: flex-start !important;
  }
  .gcw-distance-loop-chips {
    order: 2 !important;
    width: 100% !important;
    flex-wrap: wrap !important;
  }
  .gcw-distance-mini-player {
    grid-template-columns: 28px 28px minmax(120px, 1fr) 42px !important;
    padding: 5px 10px !important;
  }
  .gcw-distance-play-time-ms { display: none !important; }
  .gcw-distance-plot-readout {
    overflow-x: auto !important;
    scrollbar-width: thin !important;
  }
}

/* v5.1.8 Python-authoritative refresh guard */
.gcw-server-prepared-dirty-banner{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 14px;margin:0 0 12px;border:1px solid rgba(37,99,235,.20);border-radius:16px;background:linear-gradient(135deg,rgba(239,246,255,.98),rgba(240,253,250,.96));box-shadow:0 12px 30px rgba(15,23,42,.06)}
.gcw-server-prepared-dirty-banner div{display:flex;flex-direction:column;gap:2px;min-width:0}.gcw-server-prepared-dirty-banner strong{font-size:13px;color:#0f172a}.gcw-server-prepared-dirty-banner span{font-size:12px;color:#475569;line-height:1.35}.gcw-server-prepared-dirty-banner .gcw-tool-primary{white-space:nowrap}
