/* The flood water block inside the cloud key: a heading, then one row per water type. */
.fr-key {
  margin: 8px 0 0;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.fr-key[hidden] {
  display: none;
}

.fr-key h4 {
  margin: 0 0 6px;
  font-size: 12px;
}

.fr-key p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.fr-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 4px 0 0;
  font-size: 11px;
  line-height: 1.35;
}

.fr-text {
  color: var(--muted);
}

/* A small square for water, or a short bar for the surge line. */
.fr-sw {
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.fr-sw.fr-sw-line {
  width: 16px;
  height: 3px;
  border-radius: 2px;
}

/* The depth card over the map. */
.fr-card .maplibregl-popup-content {
  background: var(--surface-glass);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-float);
  color: var(--text);
  padding: 10px;
  font-size: 12px;
}

.fr-card.maplibregl-popup-anchor-top .maplibregl-popup-tip,
.fr-card.maplibregl-popup-anchor-top-left .maplibregl-popup-tip,
.fr-card.maplibregl-popup-anchor-top-right .maplibregl-popup-tip {
  border-bottom-color: var(--surface-glass);
}

.fr-card.maplibregl-popup-anchor-bottom .maplibregl-popup-tip,
.fr-card.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip,
.fr-card.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip {
  border-top-color: var(--surface-glass);
}

.fr-card.maplibregl-popup-anchor-left .maplibregl-popup-tip {
  border-right-color: var(--surface-glass);
}

.fr-card.maplibregl-popup-anchor-right .maplibregl-popup-tip {
  border-left-color: var(--surface-glass);
}

.fr-card .maplibregl-popup-close-button {
  color: var(--muted);
  font-size: 16px;
  padding: 2px 6px;
  border-radius: 0 8px 0 4px;
}

.fr-card .maplibregl-popup-close-button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}

.fr-card p {
  margin: 0;
  line-height: 1.4;
}

.fr-card p + p {
  margin-top: 4px;
  color: var(--muted);
}

.fr-card .fr-head {
  font-weight: 600;
  color: var(--text);
}

/* The water rows, below the places with water. */
.fr-places + .fr-water {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.fr-places ul {
  max-height: 10rem;
  overflow: auto;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

/* A place row: the name, then the 360 button. The left bar marks the places with water now. */
.fr-place {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 2px 0;
  padding-left: 6px;
  border-left: 3px solid transparent;
  font-size: 12px;
  line-height: 1.35;
}

.fr-place.fr-now {
  border-left-color: #4292c6;
}

.fr-place.fr-now .fr-go {
  font-weight: 700;
}

.fr-go {
  padding: 2px 0;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.fr-go:hover {
  text-decoration: underline;
}

/* The 360 button is small and bordered, so it reads as a separate action from the name. */
.fr-sv {
  flex: none;
  padding: 1px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}

.fr-sv:hover {
  color: var(--text);
}

.fr-go:focus-visible,
.fr-sv:focus-visible {
  outline: 2px solid #4292c6;
  outline-offset: 2px;
}
