/* Channel details (explore-channel.js): the Details pane part reuses the place classes (explore-place.css); these are the
   bars, the gauge card, the Advanced details button and the Advanced details dialog. */
.explore-page .channel-chart-svg { display: block; width: 100%; height: auto; overflow: visible; font-family: inherit; }
.explore-page .channel-grid line { stroke: #e3e9ef; }
.explore-page .channel-grid text, .explore-page .channel-tick { fill: #3d5876; font-size: 10px; }
.explore-page .channel-tick.is-selected { fill: #0f2c4d; font-weight: 700; }
.explore-page .channel-axis-label { fill: #3d5876; font-size: 10px; }
.explore-page .channel-bar { fill: #a9cdef; }
.explore-page .channel-bar.is-selected { fill: #1b6fc2; }
.explore-page .channel-bar-value { fill: #3d5876; font-size: 10px; }
.explore-page .channel-bar-value.is-selected { fill: #1b6fc2; font-weight: 700; }
.explore-page .channel-gauge { display: grid; gap: 2px; margin-top: 14px; padding: 10px 12px; border: 1px solid #c8d3de; border-radius: 8px; background: #fff; color: #0f2c4d; }
.explore-page .channel-gauge span { color: #3d5876; font-size: 13px; }
.explore-page .channel-advanced-open { width: 100%; min-height: 42px; margin-top: 14px; border: 0; border-radius: 6px; background: #1b6fc2; color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.explore-page .channel-advanced-open:hover { background: #155ca3; }
.explore-page .channel-advanced-open:focus-visible { outline: 3px solid #0f2c4d; outline-offset: 2px; }

/* The dialog. */
.channel-dialog { width: min(1180px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 22px 24px; border: 0; border-radius: 12px; background: #fff; color: #0f2c4d; box-shadow: 0 12px 40px #0f2c4d55; overflow: auto; }
.channel-dialog::backdrop { background: #0b1d3399; }
.channel-dialog-head { display: flex; align-items: flex-start; gap: 16px; }
.channel-dialog-head > div:first-child { flex: 1; min-width: 0; }
.channel-dialog-title { margin: 0; font-size: 28px; line-height: 1.15; }
.channel-dialog-sub { margin: 4px 0 0; color: #3d5876; font-size: 17px; }
.channel-dialog .channel-gauge { margin: 0; min-width: 200px; }
.channel-dialog-close { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #0f2c4d; cursor: pointer; }
.channel-dialog-close:hover { background: #eef4f9; }
.channel-dialog-close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.channel-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 16px 0 14px; }
.channel-tabs { display: inline-flex; flex-wrap: wrap; border: 1px solid #c8d3de; border-radius: 6px; overflow: hidden; }
.channel-tab { min-height: 36px; padding: 0 16px; border: 0; border-right: 1px solid #c8d3de; background: #fff; color: #0f2c4d; font: inherit; font-size: 14px; cursor: pointer; }
.channel-tab:last-child { border-right: 0; }
.channel-tab:hover { background: #eef4f9; }
.channel-tab[aria-selected="true"] { background: #1b6fc2; color: #fff; font-weight: 600; }
.channel-tab:focus-visible { outline: 3px solid #0f2c4d; outline-offset: -3px; }
.channel-toolbar-note { margin: 0; color: #3d5876; font-size: 13px; }
.channel-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.channel-card { min-width: 0; padding: 12px 14px; border: 1px solid #d8e1ec; border-radius: 8px; }
.channel-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.channel-card h3 { margin: 0; font-size: 17px; }
.channel-card-note { color: #3d5876; font-size: 12px; }
.channel-metrics { margin: 4px 0 0; font-size: 13px; font-variant-numeric: tabular-nums; }
.channel-hint { margin: 4px 0 0; color: #3d5876; font-size: 12px; }
.channel-key { display: flex; justify-content: flex-end; gap: 14px; margin: 4px 0 2px; color: #3d5876; font-size: 12px; }
.channel-key span { display: inline-flex; align-items: center; gap: 6px; }
.channel-key i { display: inline-block; width: 22px; height: 0; border-top: 3px solid #1b6fc2; }
.channel-key i.is-observed { border-top: 2px dashed #3a4654; }
.channel-key i.is-band { height: 10px; border: 0; background: #1b6fc233; }
.channel-line { fill: none; stroke-width: 1.8; stroke-linejoin: round; }
.channel-line.is-simulated { stroke: #1b6fc2; }
.channel-line.is-observed { stroke: #3a4654; stroke-dasharray: 5 4; stroke-width: 1.5; }
.channel-band { fill: #1b6fc233; stroke: none; }
.channel-dot { fill: #1b6fc2; }
.channel-year { fill: #1b6fc21a; }
.channel-brush { display: block; width: 100%; height: auto; margin-top: 4px; touch-action: none; }
.channel-brush-line { fill: none; stroke: #8fb6dd; stroke-width: 1.2; }
.channel-brush-window { fill: #1b6fc21f; stroke: #1b6fc2; stroke-width: 1; }
.channel-brush-handle { fill: #fff; stroke: #1b6fc2; stroke-width: 1.5; cursor: ew-resize; }
.channel-brush-handle:focus-visible { outline: none; stroke: #0f2c4d; stroke-width: 3; }
.channel-dialog-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.channel-data-link { color: #0f4c8a; font-weight: 600; }
.channel-dialog-done { min-height: 40px; padding: 0 28px; border: 1px solid #c8d3de; border-radius: 6px; background: #fff; color: #0f2c4d; font: inherit; font-weight: 600; cursor: pointer; }
.channel-dialog-done:hover { background: #eef4f9; }
@media (max-width: 760px) {
  .channel-dialog { padding: 16px; }
  .channel-dialog-head { flex-wrap: wrap; }
  .channel-dialog .channel-gauge { order: 3; width: 100%; }
  .channel-panels { grid-template-columns: minmax(0, 1fr); }
}
.channel-quality { margin: 0 0 12px; padding: 8px 12px; border: 1px solid #ebbf8f; border-radius: 6px; background: #fff4e5; color: #6b3104; font-size: 13px; }
.leaflet-tooltip.channel-label { padding: 3px 8px; border: 1px solid #c8d3de; border-radius: 6px; background: #fff; color: #0f2c4d; font-weight: 600; box-shadow: 0 1px 4px #0f2c4d33; }
.channel-sign-in a { color: #0f4c8a; font-weight: 600; text-decoration: underline; }

/* "Finding the nearest river…" while a click is looked up; gone once the channel shows its own loading line. */
.updates-pane .finding-details .place-status { display: flex; align-items: center; gap: 10px; }
.updates-pane .finding-spinner { display: none; }
.updates-pane:has(#channel-details:not([hidden])) .finding-details { display: none; }

/* The "Water" legend with the rivers: a river line, and lakes and reservoirs in teal, lakes edged white and reservoirs
   dark (explore-rivers.js draws them the same). */
.explore-page .water-legend-items { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; }
.explore-page .water-legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.explore-page .water-legend-river { width: 18px; height: 3px; border-radius: 2px; background: #4fa8ea; }
.explore-page :is(.water-legend-lake, .water-legend-reservoir) { box-sizing: border-box; width: 18px; height: 13px; border-radius: 3px; background: #5cc8d6; }
.explore-page .water-legend-lake { border: 1.5px solid #fff; outline: 1px solid #9fb3c6; }
.explore-page .water-legend-reservoir { border: 2px solid #0b5f6b; }
.explore-page .water-legend-item { color: #fff; text-shadow: 0 1px 2px #10294266; }
.explore-page .map-legend-overlay .water-legend-item { color: #0f2c4d; text-shadow: none; }

/* "Loading rivers…" over the map while the view's river tiles arrive (explore-rivers.js). */
.explore-page .rivers-loading { position: absolute; z-index: 800; top: 12px; left: 50%; margin: 0; padding: 6px 14px; border-radius: 16px; background: #ffffffeb; color: #0f2c4d; font-size: 13px; font-weight: 600; box-shadow: 0 2px 8px #0f2c4d26; transform: translateX(-50%); pointer-events: none; }
.explore-page .rivers-loading[hidden] { display: none; }
