/* ZeroRiskk COMTRADE Viewer v2.4.6 module: Distance / Mho R-X workbench. */

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

.gcw-root.gcw-tool-open .gcw-distance-rx-workbench {
  width: 100%;
  min-height: min(82vh, 920px);
  box-sizing: border-box;
}

.gcw-root.gcw-tool-open .gcw-distance-rx-layout {
  display: grid;
  grid-template-columns: minmax(330px, 385px) minmax(620px, 1fr);
  gap: 12px;
  align-items: stretch;
  min-height: min(82vh, 920px);
  box-sizing: border-box;
}

.gcw-root.gcw-tool-open .gcw-distance-rx-side,
.gcw-root.gcw-tool-open .gcw-distance-rx-plot-panel,
.gcw-root.gcw-tool-open .gcw-distance-rx-plot-card {
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
}

.gcw-root.gcw-tool-open .gcw-distance-rx-side {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.gcw-root.gcw-tool-open .gcw-distance-rx-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.95);
  background: rgba(248, 250, 252, 0.88);
}

.gcw-root.gcw-tool-open .gcw-distance-rx-side-head strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
}

.gcw-root.gcw-tool-open .gcw-distance-rx-side-head span {
  color: #475569;
  font-size: 10.5px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.055em;
  white-space: nowrap;
}

.gcw-root.gcw-tool-open .gcw-distance-rx-side-scroll {
  overflow: auto;
  padding: 10px;
  display: grid;
  gap: 10px;
}

.gcw-root.gcw-tool-open .gcw-distance-rx-card {
  border: 1px solid rgba(203, 213, 225, 0.72);
  border-radius: 15px;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.045);
  padding: 10px;
}

.gcw-root.gcw-tool-open details.gcw-distance-rx-card {
  padding: 0;
  overflow: hidden;
}

.gcw-root.gcw-tool-open details.gcw-distance-rx-card > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
}

.gcw-root.gcw-tool-open details.gcw-distance-rx-card > summary::-webkit-details-marker { display: none; }

.gcw-root.gcw-tool-open .gcw-distance-rx-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.86);
}

.gcw-root.gcw-tool-open .gcw-distance-rx-card header strong,
.gcw-root.gcw-tool-open .gcw-distance-rx-card summary strong {
  color: #0f172a;
  font-size: 12.3px;
  font-weight: 900;
}

.gcw-root.gcw-tool-open .gcw-distance-rx-card header span,
.gcw-root.gcw-tool-open .gcw-distance-rx-card summary span {
  color: #64748b;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.045em;
  text-align: right;
}

.gcw-root.gcw-tool-open .gcw-distance-rx-answer-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
}

.gcw-root.gcw-tool-open .gcw-distance-rx-answer-list li {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 4px 8px;
  align-items: baseline;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(203, 213, 225, 0.76);
}

.gcw-root.gcw-tool-open .gcw-distance-rx-answer-list li:last-child { border-bottom: 0; }
.gcw-root.gcw-tool-open .gcw-distance-rx-answer-list.compact li { grid-template-columns: 92px minmax(0, 1fr); }

.gcw-root.gcw-tool-open .gcw-distance-rx-answer-list b {
  color: #64748b;
  font-size: 10.8px;
  font-weight: 850;
}

.gcw-root.gcw-tool-open .gcw-distance-rx-answer-list span {
  color: #0f172a;
  font-size: 11.5px;
  font-weight: 850;
  min-width: 0;
  overflow-wrap: anywhere;
}

.gcw-root.gcw-tool-open .gcw-distance-rx-answer-list em {
  grid-column: 2;
  color: #64748b;
  font-size: 10.1px;
  font-style: normal;
  line-height: 1.28;
}

.gcw-root.gcw-tool-open .gcw-distance-rx-zone-chips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.gcw-root.gcw-tool-open .gcw-distance-rx-zone-chips span {
  border: 1px solid rgba(148, 163, 184, 0.5);
  border-radius: 12px;
  padding: 7px;
  background: #f8fafc;
  display: grid;
  gap: 2px;
  text-align: center;
}

.gcw-root.gcw-tool-open .gcw-distance-rx-zone-chips span.is-zone1 { border-color: rgba(22, 163, 74, 0.55); background: #f0fdf4; color: #166534; }
.gcw-root.gcw-tool-open .gcw-distance-rx-zone-chips span.is-zone2 { border-color: rgba(249, 115, 22, 0.52); background: #fff7ed; color: #9a3412; }
.gcw-root.gcw-tool-open .gcw-distance-rx-zone-chips span.is-zone3 { border-color: rgba(124, 58, 237, 0.50); background: #f5f3ff; color: #5b21b6; }

.gcw-root.gcw-tool-open .gcw-distance-rx-zone-chips b { font-size: 12px; font-weight: 950; }
.gcw-root.gcw-tool-open .gcw-distance-rx-zone-chips em { font-size: 9.6px; font-style: normal; font-weight: 800; }
.gcw-root.gcw-tool-open .gcw-distance-rx-zone-card p,
.gcw-root.gcw-tool-open .gcw-distance-rx-note {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 10.4px;
  line-height: 1.45;
}

.gcw-root.gcw-tool-open .gcw-distance-rx-setting-grid {
  padding: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.gcw-root.gcw-tool-open .gcw-distance-rx-settings-card .gcw-map-panel,
.gcw-root.gcw-tool-open .gcw-distance-rx-settings-card .gcw-electrical-map-panel {
  margin: 0 10px 10px;
}

.gcw-root.gcw-tool-open .gcw-distance-rx-evidence-table {
  margin: 10px;
  width: calc(100% - 20px);
  font-size: 10.6px;
}

.gcw-root.gcw-tool-open .gcw-distance-rx-evidence-table th {
  width: 120px;
  color: #475569;
  font-weight: 900;
}

.gcw-root.gcw-tool-open .gcw-distance-rx-evidence-table td b,
.gcw-root.gcw-tool-open .gcw-distance-rx-evidence-table td em {
  display: block;
  font-style: normal;
}

.gcw-root.gcw-tool-open .gcw-distance-rx-plot-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: visible;
}

.gcw-root.gcw-tool-open .gcw-distance-rx-answer-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 8px;
}

.gcw-root.gcw-tool-open .gcw-distance-rx-answer-strip > div {
  min-width: 0;
  border: 1px solid rgba(203, 213, 225, 0.76);
  border-radius: 14px;
  background: #ffffff;
  padding: 8px 10px;
  box-shadow: 0 7px 18px rgba(15, 23, 42, 0.045);
}

.gcw-root.gcw-tool-open .gcw-distance-rx-answer-strip span,
.gcw-root.gcw-tool-open .gcw-distance-rx-answer-strip em {
  display: block;
  color: #64748b;
  font-size: 10px;
  font-style: normal;
  font-weight: 820;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gcw-root.gcw-tool-open .gcw-distance-rx-answer-strip strong {
  display: block;
  color: #0f172a;
  font-size: 13px;
  font-weight: 950;
  line-height: 1.22;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gcw-root.gcw-tool-open .gcw-distance-rx-answer-strip .is-good,
.gcw-root.gcw-tool-open .gcw-distance-rx-card .is-good { border-color: rgba(22, 163, 74, 0.52); background: #f0fdf4; }
.gcw-root.gcw-tool-open .gcw-distance-rx-answer-strip .is-advisory,
.gcw-root.gcw-tool-open .gcw-distance-rx-card .is-advisory { border-color: rgba(245, 158, 11, 0.50); background: #fffbeb; }
.gcw-root.gcw-tool-open .gcw-distance-rx-answer-strip .is-outside,
.gcw-root.gcw-tool-open .gcw-distance-rx-card .is-outside { border-color: rgba(220, 38, 38, 0.42); background: #fff1f2; }
.gcw-root.gcw-tool-open .gcw-distance-rx-answer-strip .is-unknown,
.gcw-root.gcw-tool-open .gcw-distance-rx-card .is-unknown { border-color: rgba(148, 163, 184, 0.55); background: #f8fafc; }

.gcw-root.gcw-tool-open .gcw-distance-rx-graph-player-bar,
.gcw-root.gcw-tool-open .gcw-distance-rx-live-ribbon,
.gcw-root.gcw-tool-open .gcw-distance-rx-live-sentence {
  border: 1px solid rgba(203, 213, 225, 0.78);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 7px 16px rgba(15, 23, 42, 0.045);
}

.gcw-root.gcw-tool-open .gcw-distance-rx-player {
  display: grid;
  grid-template-columns: auto minmax(240px, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px;
}

.gcw-root.gcw-tool-open .gcw-distance-rx-player-left,
.gcw-root.gcw-tool-open .gcw-distance-rx-player-right {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.gcw-root.gcw-tool-open .gcw-distance-rx-player-right span {
  display: grid;
  gap: 1px;
  text-align: right;
  min-width: 112px;
}

.gcw-root.gcw-tool-open .gcw-distance-rx-player-right b {
  color: #0f172a;
  font-size: 11px;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.gcw-root.gcw-tool-open .gcw-distance-rx-player-right em {
  color: #64748b;
  font-size: 9.7px;
  font-style: normal;
  font-weight: 820;
}

.gcw-root.gcw-tool-open .gcw-distance-rx-play-btn,
.gcw-root.gcw-tool-open .gcw-distance-rx-mini-btn,
.gcw-root.gcw-tool-open .gcw-distance-rx-speed-select {
  height: 30px;
  border: 1px solid rgba(148, 163, 184, 0.48);
  border-radius: 999px;
  background: #ffffff;
  color: #0f172a;
  font-size: 10.7px;
  font-weight: 900;
  padding: 0 11px;
  cursor: pointer;
  white-space: nowrap;
}

.gcw-root.gcw-tool-open .gcw-distance-rx-play-btn {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}
.gcw-root.gcw-tool-open .gcw-distance-rx-play-btn.is-playing { background: #0e7490; border-color: #0e7490; }

.gcw-root.gcw-tool-open .gcw-distance-rx-slider-wrap { min-width: 0; }
.gcw-root.gcw-tool-open .gcw-distance-rx-slider-shell {
  position: relative;
  height: 16px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  cursor: ew-resize;
  border: 1px solid rgba(148, 163, 184, 0.55);
}

.gcw-root.gcw-tool-open .gcw-distance-rx-slider-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: linear-gradient(90deg, #0ea5e9, #22c55e);
  opacity: 0.80;
  pointer-events: none;
}

.gcw-root.gcw-tool-open .gcw-distance-rx-time-slider {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.001;
  cursor: ew-resize;
}

body.gcw-distance-rx-playbar-scrubbing,
body.gcw-distance-rx-playbar-scrubbing * { cursor: ew-resize !important; user-select: none !important; }

.gcw-root.gcw-tool-open .gcw-distance-rx-live-ribbon {
  display: flex;
  align-items: stretch;
  gap: 6px;
  padding: 7px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.gcw-root.gcw-tool-open .gcw-distance-rx-live-ribbon span {
  flex: 0 0 auto;
  min-width: 96px;
  display: grid;
  gap: 2px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 11px;
  background: #f8fafc;
  padding: 5px 7px;
}

.gcw-root.gcw-tool-open .gcw-distance-rx-live-ribbon b {
  color: #64748b;
  font-size: 9.3px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.gcw-root.gcw-tool-open .gcw-distance-rx-live-ribbon strong,
.gcw-root.gcw-tool-open .gcw-distance-rx-live-ribbon i {
  color: #0f172a;
  font-size: 10.8px;
  font-weight: 900;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.gcw-root.gcw-tool-open .gcw-distance-rx-plot-card {
  flex: 1 1 auto;
  min-height: 620px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 18px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.gcw-root.gcw-tool-open .gcw-distance-rx-plot-card .gcw-tool-uplot-shell,
.gcw-root.gcw-tool-open .gcw-distance-rx-plot-card .gcw-tool-plotly-shell {
  height: 100%;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 18px !important;
  background: #ffffff !important;
  overflow: hidden !important;
}

.gcw-root.gcw-tool-open .gcw-distance-rx-plot-card .gcw-tool-uplot,
.gcw-root.gcw-tool-open .gcw-distance-rx-plot-card .gcw-tool-plotly {
  height: clamp(600px, 67vh, 820px) !important;
  min-height: 600px !important;
  background: #ffffff !important;
}

.gcw-root.gcw-tool-open .gcw-distance-rx-plot-card .gcw-tool-plotly .modebar {
  top: 6px !important;
  right: 8px !important;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82) !important;
  border: 1px solid rgba(226, 232, 240, 0.82);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.10);
}

.gcw-root.gcw-tool-open .gcw-distance-rx-live-sentence {
  padding: 7px 10px;
  color: #334155;
  font-size: 11px;
  font-weight: 820;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.gcw-root.gcw-tool-open .gcw-distance-rx-status-now { font-variant-numeric: tabular-nums; }

@media (max-width: 1240px) {
  .gcw-root.gcw-tool-open .gcw-distance-rx-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .gcw-root.gcw-tool-open .gcw-distance-rx-side {
    order: 2;
    max-height: 46vh;
  }
  .gcw-root.gcw-tool-open .gcw-distance-rx-plot-panel { order: 1; }
  .gcw-root.gcw-tool-open .gcw-distance-rx-answer-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .gcw-root.gcw-tool-open .gcw-distance-rx-answer-strip { grid-template-columns: 1fr; }
  .gcw-root.gcw-tool-open .gcw-distance-rx-player { grid-template-columns: 1fr; }
  .gcw-root.gcw-tool-open .gcw-distance-rx-player-right { justify-content: space-between; }
  .gcw-root.gcw-tool-open .gcw-distance-rx-setting-grid { grid-template-columns: 1fr; }
  .gcw-root.gcw-tool-open .gcw-distance-rx-plot-card .gcw-tool-uplot,
  .gcw-root.gcw-tool-open .gcw-distance-rx-plot-card .gcw-tool-plotly {
    height: 560px !important;
    min-height: 540px !important;
  }
}
