/* ── Map search overlay (mobile only) ───────────────────────────────────────── */

.fab-row {
  display: none;
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1000;
  flex-direction: row;
  gap: 8px;
}

.fab-search {
  display: flex;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(6, 14, 28, 0.82);
  border: 1px solid var(--border);
  backdrop-filter: blur(6px);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition:
    border-color 0.15s,
    color 0.15s;
}

.fab-search:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.map-search {
  display: none;
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 1000;
  flex-direction: column;
  gap: 6px;
}

.map-search.open {
  display: flex;
}

.map-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 40px;
}

.map-search-close {
  position: static;
  flex-shrink: 0;
  font-size: 16px;
}

.map-search-input {
  background: rgba(6, 14, 28, 0.88);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 12px 16px;
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  color: var(--text);
  outline: none;
  flex: 1;
  box-sizing: border-box;
  backdrop-filter: blur(8px);
  transition: border-color 0.15s;
}

.map-search-input::placeholder {
  color: var(--muted);
}

.map-search-input:focus {
  border-color: var(--accent);
}

.map-search-results {
  background: rgba(6, 14, 28, 0.92);
  border: 1px solid var(--border);
  border-radius: 14px;
  backdrop-filter: blur(8px);
  max-height: 260px;
  overflow-y: auto;
  width: calc(100% - 90px);
  margin-left: 40px;
}

.msr-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}

.msr-item:last-child {
  border-bottom: none;
}

.msr-item:active {
  background: var(--card);
}

.msr-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.msr-info {
  flex: 1;
  min-width: 0;
}

.msr-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msr-zone {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.msr-empty {
  padding: 14px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

/* ── Forecast FAB & vertical slider panel (mobile only) ──────────────────────── */

.fab-forecast {
  font-size: 16px;
}

.forecast-panel {
  display: none;
  position: absolute;
  right: 10px;
  top: 62px;
  /* below the fab-row */
  bottom: 72px;
  /* above the ☰ FAB */
  z-index: 999;
  width: 52px;
  background: rgba(6, 14, 28, 0.88);
  border: 1px solid var(--border);
  border-radius: 14px;
  backdrop-filter: blur(8px);
  flex-direction: column;
  align-items: center;
  padding: 12px 0 10px;
  gap: 6px;
}

@media (max-width: 700px) {
  .forecast-panel.open {
    display: flex;
  }
}

.fp-end-label {
  font-size: 9px;
  color: var(--muted);
  font-family: "DM Sans", sans-serif;
  letter-spacing: 0.2px;
}

.fp-track {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  width: 100%;
  position: relative;
}

.fp-tooltip {
  position: absolute;
  right: calc(100% + 8px);
  top: 10px;
  transform: translateY(-50%);
  background: rgba(6, 14, 28, 0.95);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 10px;
  font-family: "DM Sans", sans-serif;
  color: var(--accent);
  white-space: nowrap;
  pointer-events: none;
  line-height: 1.4;
}

.fp-slider {
  writing-mode: vertical-lr;
  /* min=0 (Ahora) at top, max=23 (+24h) at bottom */
  height: 100%;
  width: 20px;
  /* touch target */
  -webkit-appearance: none;
  appearance: none;
  background: var(--border);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  flex-shrink: 0;
}

.fp-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(0, 200, 240, 0.5);
}

.fp-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
  box-shadow: 0 0 8px rgba(0, 200, 240, 0.5);
}

.fp-time-label {
  font-size: 9px;
  text-align: center;
  line-height: 1.4;
  padding: 0 4px;
  word-break: break-word;
}

/* ── Bottom sheet (mobile only) ──────────────────────────────────────────────── */

.bottom-sheet {
  display: none;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1001;
  background: var(--ocean);
  border-top: 1px solid var(--border);
  border-radius: 16px 16px 0 0;
  transition: transform 0.3s ease;
  max-height: 60vh;
  flex-direction: column;
}

.bs-handle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  cursor: pointer;
  flex-shrink: 0;
}

.bs-pill {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
}

.bs-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.bs-tab {
  flex: 1;
  padding: 8px;
  text-align: center;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  transition:
    color 0.15s,
    border-color 0.15s;
}

.bs-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.bs-content {
  overflow-y: auto;
  flex: 1;
  padding: 10px 12px;
}

.bs-leg {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── FAB (mobile only) ───────────────────────────────────────────────────────── */

.fab {
  display: none;
  position: absolute;
  bottom: 32px;
  right: 16px;
  z-index: 1002;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: none;
  cursor: pointer;
  font-size: 20px;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 200, 240, 0.35);
}

/* ── Breakpoint ──────────────────────────────────────────────────────────────── */

@media (max-width: 700px) {
  .main {
    position: relative;
  }

  .panel {
    display: none;
  }

  #map {
    width: 100%;
  }

  .bottom-sheet {
    display: flex;
  }

  .fab {
    display: flex;
  }

  .fab-row {
    display: flex;
  }

  .upd-info {
    display: none;
  }

  .logo p {
    display: none;
  }

  .ts-label {
    flex: 0;
    padding: 8px 0;
  }
}
