/* ============================================================
   Nautische Nomade — Windlaag (wind.js)
   Pijlen op de kaart + tijdbalk + toggle-knop.
   ============================================================ */

/* ---------- Pijlen ---------- */

.nn-wind-wrap { background: none; border: none; }

.nn-wind {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.6));
}
.nn-wind svg {
  width: 100%;
  height: 100%;
  transition: transform 0.35s var(--ease-out);
}
.nn-wind__kn {
  position: absolute;
  bottom: -11px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

/* Punt waar de wind >30°/uur draait: ring + badge */
.nn-wind.is-shift::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid rgba(194, 90, 61, 0.85);
  animation: nn-wind-pulse 1.6s var(--ease-in-out) infinite;
}
.nn-wind__shift {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 700;
  white-space: nowrap;
  color: #EFE6D6;
  background: rgba(166, 69, 44, 0.92);
  border-radius: var(--r-pill);
  padding: 1px 5px;
  pointer-events: none;
}
@keyframes nn-wind-pulse {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.18); opacity: 0.35; }
}

/* ---------- Toggle-knop (Leaflet-control) ---------- */

.nn-windtoggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid rgba(239, 230, 214, 0.16);
  border-radius: var(--r-sm);
  background: rgba(30, 26, 20, 0.82);
  backdrop-filter: blur(6px);
  color: #EFE6D6;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: background var(--dur-fast) var(--ease-out);
}
.nn-windtoggle:hover { background: rgba(194, 90, 61, 0.92); }
.nn-windtoggle.is-active {
  background: var(--terracotta-500);
  border-color: transparent;
}

/* ---------- Tijdbalk ---------- */

.nn-windbar {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 14px;
  transform: translate(-50%, 12px);
  width: min(440px, calc(100% - 120px));
  padding: 10px 14px 8px;
  border: 1px solid rgba(239, 230, 214, 0.14);
  border-radius: var(--r-md);
  background: rgba(30, 26, 20, 0.88);
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-mid) var(--ease-out), transform var(--dur-mid) var(--ease-out);
}
.nn-windbar.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.nn-windbar__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}
.nn-windbar__label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--terracotta-400);
}
.nn-windbar__time {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: #EFE6D6;
}
.nn-windbar__hint {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.03em;
  color: rgba(239, 230, 214, 0.45);
  text-align: right;
}
.nn-windbar__hint em { font-style: normal; color: rgba(210, 122, 94, 0.8); }

.nn-windbar__slider {
  width: 100%;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  height: 4px;
  border-radius: var(--r-pill);
  background: rgba(239, 230, 214, 0.18);
  outline-offset: 4px;
  cursor: pointer;
}
.nn-windbar__slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--terracotta-500);
  border: 2px solid #FBF7EE;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  cursor: grab;
}
.nn-windbar__slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--terracotta-500);
  border: 2px solid #FBF7EE;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  cursor: grab;
}

.nn-windbar__foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 5px;
}
.nn-windbar__status {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--terracotta-400);
}
.nn-windbar__credit {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.03em;
  color: rgba(239, 230, 214, 0.45);
  text-decoration: none;
}
.nn-windbar__credit:hover { color: rgba(239, 230, 214, 0.8); text-decoration: underline; }

/* ---------- Mobiel ---------- */

@media (max-width: 900px) {
  /* Onder de topbar, en rechts vrij van de knoppenkolom (thema/zoom/
     wind/positie) zodat alle toggles bereikbaar blijven — de bottom
     sheet zit onderaan */
  .nn-windbar {
    left: 12px;
    right: 108px;
    bottom: auto;
    top: 124px;
    width: auto;
    transform: translateY(-8px);
  }
  .nn-windbar.is-open { transform: translateY(0); }
  .nn-windbar__hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .nn-wind svg, .nn-windbar { transition: none; }
  .nn-wind.is-shift::before { animation: none; }
}
