/* ============================================================
   WINDMASTER — FORECAST
   Strip de pronóstico 48h con datos de Open-Meteo
   Página: condiciones
============================================================ */

.wm-forecast {
  position: relative;
  background-color: var(--wm-bg-primary);
}

/* ── SELECTOR DE SPOT ── */

.wm-forecast-selector {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.wm-forecast-btn {
  padding: 7px 16px;
  border-radius: var(--wm-radius-pill);
  background: var(--wm-bg-secondary);
  border: 1px solid var(--wm-border-subtle);
  color: var(--wm-text-dim);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.02em;
  transition: var(--wm-transition-fast);
}

.wm-forecast-btn:hover {
  color: var(--wm-text-main);
  border-color: rgba(0, 200, 255, 0.25);
  background: var(--wm-bg-light);
}

.wm-forecast-btn.active {
  background: var(--wm-accent);
  color: #000;
  border-color: var(--wm-accent);
  font-weight: 700;
}

/* ── STRIP SCROLL ── */

.wm-forecast-strip-wrap {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 200, 255, 0.2) transparent;
  padding-bottom: 6px;
  border-radius: var(--wm-radius-lg);
}

.wm-forecast-strip-wrap::-webkit-scrollbar {
  height: 4px;
}

.wm-forecast-strip-wrap::-webkit-scrollbar-track {
  background: transparent;
}

.wm-forecast-strip-wrap::-webkit-scrollbar-thumb {
  background: rgba(0, 200, 255, 0.2);
  border-radius: 99px;
}

.wm-forecast-strip {
  display: flex;
  align-items: stretch;
  gap: 8px;
  min-width: max-content;
  padding: 2px 1px 8px;
}

/* Separador de día */
.wm-forecast-day-label {
  display: flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--wm-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  writing-mode: horizontal-tb;
  white-space: nowrap;
  padding: 0 4px;
  border-left: 1px solid var(--wm-border-subtle);
  margin-left: 4px;
}

/* Subtítulo de confiabilidad: una sola línea arriba del strip que
   explica qué parte del pronóstico es dato real y cuál es modelo
   puro, sin romper el ritmo visual de las tarjetas. */
.wm-forecast-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 12px;
  color: var(--wm-text-muted);
}

.wm-forecast-status-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.wm-forecast-status-item--live {
  color: var(--wm-accent, #00c8ff);
  font-weight: 600;
}

.wm-forecast-status-item--model {
  color: var(--wm-text-muted);
}

.wm-forecast-status-sep {
  color: var(--wm-border-subtle);
}

.wm-fc-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--wm-accent, #00c8ff);
  box-shadow: 0 0 5px rgba(0, 200, 255, 0.6);
  flex-shrink: 0;
}

/* ── SLOT INDIVIDUAL ── */

.wm-forecast-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 14px 12px;
  min-width: 76px;
  background: var(--wm-bg-secondary);
  border: 1px solid var(--wm-border-subtle);
  border-radius: var(--wm-radius-md);
  transition: var(--wm-transition-fast);
  cursor: default;
  position: relative;
}

.wm-forecast-slot:hover {
  border-color: rgba(0, 200, 255, 0.2);
  background: var(--wm-bg-light);
}

.wm-forecast-slot.is-now {
  border-color: var(--wm-accent);
  background: rgba(0, 200, 255, 0.05);
}

/* Barra de acento "AHORA" */
.wm-forecast-slot.is-now::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--wm-accent);
  border-radius: var(--wm-radius-md) var(--wm-radius-md) 0 0;
}

/* Hora */
.wm-fc-time {
  font-size: 10px;
  font-weight: 700;
  color: var(--wm-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.wm-forecast-slot.is-now .wm-fc-time {
  color: var(--wm-accent);
}

/* Flecha de dirección */
.wm-fc-arrow {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wm-fc-arrow svg {
  width: 20px;
  height: 20px;
}

/* Velocidad */
.wm-fc-speed-wrap {
  display: flex;
  align-items: baseline;
  gap: 2px;
  line-height: 1;
}

.wm-fc-speed {
  font-size: 17px;
  font-weight: 800;
  color: var(--wm-text-white);
}

.wm-fc-unit {
  font-size: 9px;
  font-weight: 600;
  color: var(--wm-text-muted);
}

/* Olas */
.wm-fc-wave {
  font-size: 11px;
  color: var(--wm-text-subtle);
}

/* Indicador de condición */
.wm-fc-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.wm-fc-dot.good { background: #22c55e; box-shadow: 0 0 5px rgba(34, 197, 94, 0.5); }
.wm-fc-dot.ok   { background: #f59e0b; box-shadow: 0 0 5px rgba(245, 158, 11, 0.5); }
.wm-fc-dot.bad  { background: #ef4444; box-shadow: 0 0 5px rgba(239, 68, 68, 0.5); }
.wm-fc-dot.none { background: #4b5563; }

/* ── ESTADOS ── */

.wm-forecast-loading,
.wm-forecast-error {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 150px;
  color: var(--wm-text-dim);
  font-size: 13px;
  gap: 10px;
}

.wm-forecast-loading::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 2px solid rgba(0, 200, 255, 0.15);
  border-top-color: var(--wm-accent);
  border-radius: 50%;
  animation: wmSpin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes wmFcFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.wm-forecast-slot {
  animation: wmFcFadeIn 0.3s ease-out both;
}

/* Stagger */
.wm-forecast-slot:nth-child(1)  { animation-delay: 0.02s; }
.wm-forecast-slot:nth-child(2)  { animation-delay: 0.04s; }
.wm-forecast-slot:nth-child(3)  { animation-delay: 0.06s; }
.wm-forecast-slot:nth-child(4)  { animation-delay: 0.08s; }
.wm-forecast-slot:nth-child(5)  { animation-delay: 0.10s; }
.wm-forecast-slot:nth-child(6)  { animation-delay: 0.12s; }
.wm-forecast-slot:nth-child(7)  { animation-delay: 0.14s; }
.wm-forecast-slot:nth-child(8)  { animation-delay: 0.16s; }

/* ── RESPONSIVE ── */

@media (max-width: 767px) {
  .wm-forecast-selector {
    gap: 6px;
    margin-bottom: 14px;
  }

  .wm-forecast-btn {
    padding: 6px 12px;
    font-size: 11px;
  }

  .wm-forecast-slot {
    min-width: 68px;
    padding: 12px 10px;
    gap: 6px;
  }

  .wm-fc-speed {
    font-size: 15px;
  }

  .wm-fc-wave {
    font-size: 10px;
  }
}
