/* =========================================================
   drive-nearby.css — What's Nearby / Along Route
   Weather Compass · weathercompass.ca
   ========================================================= */

/* ── Card ── */
#nearby-card {
  margin-top: 12px;
}

/* ── Toggle row ── */
.nearby-toggles {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.nearby-toggle {
  flex: 1;
  padding: 10px 8px;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  cursor: pointer;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.5);
  transition: background 0.2s, color 0.2s;
}

.nearby-toggle.active {
  background: rgba(96,165,250,0.2);
  color: #60a5fa;
}

.nearby-toggle:disabled {
  opacity: 0.35;
  cursor: default;
}

/* ── 3x2 group grid ── */
.nearby-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.nearby-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 4px;
  border: none;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.nearby-group:active {
  transform: scale(0.95);
}

.nearby-group.active {
  background: rgba(96,165,250,0.18);
}

.nearby-group-icon {
  font-size: 24px;
  line-height: 1;
}

.nearby-group-label {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
}

.nearby-group.active .nearby-group-label {
  color: #60a5fa;
}

/* ── Subcategory pills ── */
.nearby-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
  min-height: 0;
}

.nearby-pills:empty {
  display: none;
}

.nearby-pill {
  padding: 6px 14px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.nearby-pill:active {
  transform: scale(0.95);
}

.nearby-pill.active {
  background: rgba(96,165,250,0.2);
  border-color: #60a5fa;
  color: #60a5fa;
}

/* ── Results list ── */
.nearby-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nearby-results:empty {
  display: none;
}

.nearby-loading {
  text-align: center;
  color: rgba(255,255,255,0.5);
  font-size: 13px;
  padding: 16px 0;
}

.nearby-empty {
  text-align: center;
  color: rgba(255,255,255,0.4);
  font-size: 13px;
  padding: 16px 0;
}

.nearby-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
}

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

.nearby-result-name {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nearby-result-meta {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  margin-top: 2px;
}

.nearby-result-go {
  padding: 6px 14px;
  border: none;
  border-radius: 8px;
  background: #2b6cb0;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  cursor: pointer;
  white-space: nowrap;
}

.nearby-result-go:active {
  background: #2c5282;
}

/* ── Disclaimer ── */
.nearby-disclaimer {
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  text-align: center;
  padding: 8px 12px;
  margin-top: 8px;
}

/* ── Daytime overrides ── */
@media (prefers-color-scheme: light) {
  .nearby-group {
    background: rgba(0,0,0,0.04);
  }
  .nearby-group-label {
    color: #374151;
  }
  .nearby-pill {
    background: rgba(0,0,0,0.04);
    border-color: rgba(0,0,0,0.12);
    color: #374151;
  }
  .nearby-result {
    background: rgba(0,0,0,0.04);
  }
  .nearby-result-name {
    color: #111;
  }
  .nearby-result-meta {
    color: #666;
  }
  .nearby-toggle {
    background: rgba(0,0,0,0.05);
    color: #666;
  }
}
