/* The flood views (#621, #622): the section's drawing overlay and panel, the hydrograph in a cell's card, and
   what gets flooded in the legend. The charts' strokes and fills are classes, so dark mode follows the tokens. */

.fv-chart { display: block; max-width: 100%; height: auto; overflow: visible; font-family: inherit; }
.fv-grid { stroke: var(--line); stroke-width: 1; }
.fv-axis { stroke: color-mix(in srgb, var(--ink) 45%, transparent); stroke-width: 1; }
.fv-tickmark { stroke: color-mix(in srgb, var(--ink) 45%, transparent); }
.fv-tick { fill: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.fv-title { fill: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .02em; }
.fv-end { fill: var(--ink); font-size: 12px; font-weight: 700; }
.fv-ground { fill: #c9b79c; fill-opacity: .55; }
.fv-ground-line { fill: none; stroke: #7d6849; stroke-width: 1.4; stroke-linejoin: round; }
.fv-water { fill: #3d8fd6; fill-opacity: .42; }
.fv-surface { fill: none; stroke: #0b5fa5; stroke-width: 1.8; stroke-linejoin: round; }
.fv-max { fill: none; stroke: #0b5fa5; stroke-width: 1.1; stroke-dasharray: 4 3; opacity: .75; }
.fv-hover { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 2 2; opacity: .6; }
.fv-dot-water { fill: #0b5fa5; stroke: #fff; stroke-width: 1.4; }
.fv-dot-ground { fill: #7d6849; stroke: #fff; stroke-width: 1.2; }
.fv-wetband { fill: #3d8fd6; fill-opacity: .07; }
.fv-bracket { stroke: #0b5fa5; stroke-width: 1.2; }
.fv-mark { fill: var(--ink-2, var(--ink)); font-size: 10px; font-weight: 600; }
.fv-thr { stroke: #0b5fa5; stroke-width: 1; stroke-dasharray: 2 3; opacity: .7; }
.fv-arrive { stroke: #0b5fa5; stroke-width: 1.2; stroke-dasharray: 3 2; }
.fv-peak { fill: #0b5fa5; stroke: #fff; stroke-width: 1.5; }
.fv-now { stroke: var(--ink); stroke-width: 1.3; opacity: .8; }
.fv-right { text-anchor: start; }
@media (prefers-color-scheme: dark) {
  .fv-ground { fill: #8a7658; fill-opacity: .5; }
  .fv-ground-line { stroke: #c4ad88; }
  .fv-water { fill: #4aa3f0; fill-opacity: .38; }
  .fv-surface, .fv-max, .fv-bracket, .fv-thr, .fv-arrive { stroke: #7cc0f5; }
  .fv-dot-water, .fv-peak { fill: #7cc0f5; }
}

/* drawing the line */
.fs-draw {
  position: absolute; inset: 0; z-index: 7; cursor: crosshair; touch-action: none; outline: none;
  background: rgba(15, 28, 38, .04);
}
.fs-draw.done { background: none; cursor: default; }
.fs-hint {
  position: absolute; top: 58px; left: 50%; transform: translateX(-50%); margin: 0; padding: 7px 12px;
  background: var(--surface-solid); color: var(--ink); border: 1px solid var(--line); border-radius: 999px;
  box-shadow: var(--shadow-2); font-size: .8rem; white-space: nowrap; pointer-events: none;
}
.fs-cancel { position: absolute; top: 100px; left: 50%; transform: translateX(-50%); }
.fs-end {
  display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px;
  background: #0f1c26; color: #fff; font-size: .72rem; font-weight: 700; box-shadow: 0 0 0 2px #fff;
}

/* the section panel, docked under the map above the time bar */
.fs-panel {
  position: absolute; z-index: 5; left: 300px; right: 16px; bottom: var(--fs-bottom, 150px); max-width: 900px; margin-left: auto;
  padding: 10px 14px 10px; background: var(--surface-solid); color: var(--ink); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-2);
}
.fs-panel[hidden] { display: none; }
.fs-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: 4px; }
.fs-title { margin: 0; font-size: .82rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs-sub { color: var(--muted); font-weight: 400; }
.fs-btns { display: flex; align-items: center; gap: .5rem; flex: none; }
.fs-panel .fd-go { font-size: .74rem; }
.fs-x { font: inherit; font-size: 1.1rem; line-height: 1; border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 2px; }
.fs-body { touch-action: pan-y; }
.fs-read { margin: 2px 0 0; font-size: .74rem; font-variant-numeric: tabular-nums; color: var(--ink); min-height: 1.1em; }
.fs-note { margin: 3px 0 0; font-size: .68rem; color: var(--muted); line-height: 1.35; }
.fs-wait, .fs-error { margin: 18px 0; font-size: .8rem; display: flex; gap: .5rem; align-items: center; }
.fs-error { color: var(--err-ink); }
@media (max-width: 640px) {
  .fs-panel { left: 8px; right: 8px; padding: 8px 10px; z-index: 8; }
  .fs-hint { top: 64px; white-space: normal; width: max-content; max-width: calc(100% - 32px); text-align: center; }
  .fs-cancel { top: auto; bottom: 110px; }
}

/* the hydrograph in the card */
.map-card .mc-chart .fv-chart { margin-top: 2px; }

/* the tools line on the model's legend row */
.ml-body .mv-tools { margin-top: .4rem; padding-top: .35rem; border-top: 1px solid var(--line-soft, var(--line)); }
.mv-tools > span { color: var(--muted); font-size: .64rem; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; margin-right: .1rem; }

/* what gets flooded, in the legend */
.fx-legend-mark { display: inline-block; width: 14px; height: 10px; border-radius: 2px; }
.fx-status, .fx-when { margin: .2rem 0 .3rem; font-size: .74rem; line-height: 1.35; display: flex; gap: .45rem; align-items: flex-start; }
.fx-when { color: var(--muted); font-weight: 600; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; }
.fx-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.fx-rows li { display: grid; grid-template-columns: 12px 1fr 56px; gap: .4rem; align-items: center; }
.fx-rows li .fv-spark { margin: 0; }
.fx-rows b { display: block; font-size: .82rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fx-rows span { display: block; font-size: .68rem; color: var(--muted); line-height: 1.3; }
.fx-mark { display: block; width: 12px; height: 12px; border-radius: 2px; background: #d9480f; }
.fx-roads .fx-mark { height: 3px; margin-top: 0; border-radius: 2px; background: #8f1d06; }
.fx-people .fx-mark { border-radius: 50%; background: #9c3608; }
.fv-spark { display: block; margin-top: 3px; max-width: 100%; height: auto; }
.fv-count { fill: none; stroke: #d9480f; stroke-width: 1.3; }
.fv-count-area { fill: #d9480f; fill-opacity: .12; }
.fx-thr { margin: .45rem 0 0; font-size: .68rem; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .55rem; }
.fx-thr label { display: inline-flex; align-items: center; gap: .2rem; color: var(--ink); cursor: pointer; }
.fx-thr input { margin: 0; accent-color: #d9480f; }
.fx-thr-words { margin: .2rem 0 0; font-size: .66rem; color: var(--muted); line-height: 1.3; }
.fx-err { margin: .3rem 0 0; font-size: .68rem; color: var(--err-ink); }
.fx-more { margin-top: .35rem; font-size: .68rem; color: var(--muted); }
.fx-more summary { cursor: pointer; color: var(--ink); }
.fx-more ul { margin: .3rem 0 0; padding-left: 1rem; line-height: 1.35; }
.fx-more li { margin-bottom: .2rem; }
