/* Scoped styling for bike-share-station-finder */
.bssf-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--color-text, #1e293b);
}

.bssf-header {
  margin-bottom: 1.5rem;
}

.bssf-badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 9999px;
  background-color: #dbeafe;
  color: #1e40af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.bssf-title {
  font-size: 1.85rem;
  font-weight: 800;
  margin: 0 0 0.5rem 0;
  color: var(--color-heading, #0f172a);
}

.bssf-subtitle {
  margin: 0;
  font-size: 1rem;
  color: var(--color-text-muted, #64748b);
  line-height: 1.5;
}

/* Ad slots */
.bssf-ad-slot {
  margin: 1.5rem 0;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface-subtle, #f8fafc);
  border: 1px dashed var(--color-border, #e2e8f0);
  border-radius: 0.5rem;
}

/* Main Grid */
.bssf-main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 960px) {
  .bssf-main-grid {
    grid-template-columns: 7fr 5fr;
  }
}

.bssf-side-col {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Cards */
.bssf-card {
  background: var(--color-surface, #ffffff);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.bssf-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-border, #e2e8f0);
  padding-bottom: 0.75rem;
}

.bssf-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: var(--color-heading, #0f172a);
}

.bssf-card-sub {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0 0 1rem 0;
}

.bssf-data-source {
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  background: #f1f5f9;
  border-radius: 0.25rem;
  color: #475569;
  font-weight: 600;
}

/* Controls */
.bssf-controls-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.bssf-control-group {
  flex: 1;
  min-width: 220px;
}

.bssf-label {
  display: block;
  font-size: 0.825rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.35rem;
}

.bssf-select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font-size: 0.9rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  background: #ffffff;
  color: #1e293b;
  outline: none;
}

.bssf-select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.bssf-select-sm {
  padding: 0.55rem 0.65rem;
  font-size: 0.85rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  background: #ffffff;
  color: #1e293b;
}

.bssf-btn-wrap {
  margin-bottom: 1px;
}

.bssf-btn-primary {
  background: #2563eb;
  color: #ffffff;
  border: 1px solid #1d4ed8;
  padding: 0.6rem 1.15rem;
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.bssf-btn-primary:hover {
  background: #1d4ed8;
}

/* Search Row */
.bssf-search-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.bssf-search-wrap {
  flex: 1;
  min-width: 200px;
}

.bssf-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.75rem;
  font-size: 0.875rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  outline: none;
}

.bssf-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Feed Status */
.bssf-feed-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: #64748b;
}

.bssf-count-text {
  font-weight: 600;
}

.bssf-network-title {
  font-weight: 700;
  color: #0f172a;
}

/* Station Cards */
.bssf-station-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.bssf-station-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 1rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.bssf-station-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  gap: 0.5rem;
}

.bssf-station-name {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
  color: #0f172a;
}

.bssf-status-pill {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  white-space: nowrap;
}

.bssf-pill-good { background: #dcfce7; color: #15803d; }
.bssf-pill-warn { background: #fef9c3; color: #a16207; }
.bssf-pill-low { background: #fee2e2; color: #b91c1c; }

.bssf-dock-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  text-align: center;
}

.bssf-stat-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  padding: 0.4rem 0.25rem;
}

.bssf-stat-num {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  display: block;
}

.bssf-stat-lbl {
  font-size: 0.65rem;
  color: #64748b;
  font-weight: 600;
}

/* Fill bar */
.bssf-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.bssf-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
}

.bssf-bar {
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
}

.bssf-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.bssf-bg-good { background-color: #10b981; }
.bssf-bg-warn { background-color: #f59e0b; }
.bssf-bg-low { background-color: #ef4444; }

/* Calculator */
.bssf-calc-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.bssf-calc-row {
  display: flex;
  flex-direction: column;
}

.bssf-impact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.bssf-impact-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.85rem;
  text-align: center;
}

.bssf-impact-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  display: block;
  margin-bottom: 0.2rem;
}

.bssf-impact-lbl {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 600;
}

/* Tips list */
.bssf-tips-list {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.5;
}

.bssf-tips-list li {
  margin-bottom: 0.5rem;
}

.bssf-tips-list strong {
  color: #334155;
}

.bssf-main-card {
  position: relative;
}

.bssf-loading {
  opacity: 0.6;
  pointer-events: none;
}

.bssf-filter-wrap {
  min-width: 150px;
}
