/* Shared styles for the GPX track + historical wind replay map widget.
   See resources/wind_map.js for the accompanying logic. Used by blog pages
   such as blogs/aland_helsinki_saaristomeri.html and blogs/bol_dor_26.html. */

.wind-play-btn {
  font: inherit;
  color: cornflowerblue;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: color 0.15s ease;
  text-align: left;
}
.wind-play-btn:hover {
  color: blueviolet;
}
.wind-play-btn:focus-visible {
  outline: 1px solid cornflowerblue;
  outline-offset: 3px;
}
/* play/pause icons drawn in CSS rather than the ▶ / ⏸ characters,
   which iOS renders as color emoji. Both are 0.6em wide so the button
   doesn't change width, and use currentColor to follow hover. */
.wind-play-icon {
  display: inline-block;
  box-sizing: border-box;
  width: 0.6em;
  height: 0.7em;
  margin-right: 0.4em;
}
.wind-play-icon.play {
  height: 0;
  border-style: solid;
  border-width: 0.35em 0 0.35em 0.6em;
  border-color: transparent transparent transparent currentColor;
}
.wind-play-icon.pause {
  border-left: 0.2em solid currentColor;
  border-right: 0.2em solid currentColor;
}
/* minimal timeline scrubber: a thin grey line filled in cornflowerblue up
   to the current position (--progress, 0-1, set from wind_map.js), with a
   small round handle. The line is drawn as the input's own background so
   it looks the same in every browser; the native track is hidden. */
.wind-scrubber {
  --progress: 0;
  --thumb: 10px;
  flex: 1 1 120px;
  min-width: 100px;
  height: var(--thumb);
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  background:
    linear-gradient(cornflowerblue, cornflowerblue) 0 50% /
      calc(var(--thumb) / 2 + (100% - var(--thumb)) * var(--progress)) 2px
      no-repeat,
    linear-gradient(#ddd, #ddd) 0 50% / 100% 2px no-repeat;
  cursor: pointer;
}
.wind-scrubber::-webkit-slider-runnable-track {
  height: var(--thumb);
  background: transparent;
}
.wind-scrubber::-moz-range-track {
  height: var(--thumb);
  background: transparent;
}
.wind-scrubber::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: var(--thumb);
  height: var(--thumb);
  border: none;
  border-radius: 50%;
  background: cornflowerblue;
  transition: background 0.15s ease;
}
.wind-scrubber::-moz-range-thumb {
  width: var(--thumb);
  height: var(--thumb);
  border: none;
  border-radius: 50%;
  background: cornflowerblue;
  transition: background 0.15s ease;
}
.wind-scrubber:hover::-webkit-slider-thumb {
  background: blueviolet;
}
.wind-scrubber:hover::-moz-range-thumb {
  background: blueviolet;
}
.wind-scrubber:focus {
  outline: none;
}
.wind-scrubber:focus-visible {
  outline: 1px solid cornflowerblue;
  outline-offset: 3px;
}
.wind-label {
  color: #888;
  font-size: 0.9em;
  font-variant-numeric: tabular-nums;
  /* right-aligned within its reserved width, so the row ends flush with
     the map's right edge */
  text-align: right;
  white-space: nowrap;
}
.wind-dot-icon {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d1122f;
}

.wind-legend {
  background: rgba(255, 255, 255, 0.8);
  padding: 4px 10px 2px;
  border-radius: 4px;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
  font-size: 11px;
  line-height: 1.2;
  color: #333;
}
.wind-legend-title {
  margin-bottom: 3px;
}
.wind-legend-scale,
.wind-legend-ticks {
  position: relative;
  width: 160px;
}
.wind-legend-scale {
  height: 8px;
}
.wind-legend-bar {
  position: absolute;
  inset: 0;
  border-radius: 2px;
  /* matches the map raster's alpha (160/255) */
  opacity: 0.63;
}
.wind-legend-marker {
  display: none;
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 2px;
  margin-left: -1px;
  background: #d1122f;
}
.wind-legend-ticks {
  height: 1.3em;
  margin-top: 2px;
}
.wind-legend-ticks span {
  position: absolute;
  transform: translateX(-50%);
}

.leaflet-attribution-flag {
  display: none !important;
}

.leaflet-control-attribution {
  font-size: 0.7em;
  background: rgba(255, 255, 255, 0.5);
  padding: 0 4px;
}
