/* --- Filter Panel (Desktop Sidebar) --- */
#filter-panel {
  width: 300px;
  height: 100vh;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
  flex-shrink: 0;
  z-index: 20;
  padding: 20px 16px;
}

.filter-header {
  margin-bottom: 20px;
}

.filter-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-green);
  margin-bottom: 4px;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.filter-clock {
  font-size: 13px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
}

.filter-section {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.filter-section:last-of-type {
  border-bottom: none;
}

.filter-section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-family: var(--font-mono);
}

.filter-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.toggle-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  font-family: var(--font-body);
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-pills--scroll {
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.filter-pills--scroll::-webkit-scrollbar {
  display: none;
}

.filter-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-results {
  font-size: 12px;
  color: var(--text-secondary);
  padding: 8px 0;
  text-align: center;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* Sidebar scrollbar */
#filter-panel::-webkit-scrollbar {
  width: 4px;
}

#filter-panel::-webkit-scrollbar-track {
  background: transparent;
}

#filter-panel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

/* --- Mobile Bottom Sheet --- */
@media (max-width: 768px) {
  .app {
    flex-direction: column;
  }

  #map {
    width: 100vw;
    height: 100vh;
  }

  #filter-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 60px;
    overflow: hidden;
    border-right: none;
    border-top: 1px solid var(--border-color);
    border-radius: 16px 16px 0 0;
    padding: 0 16px;
    transition: height 0.3s ease;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  #filter-panel.sheet--expanded {
    height: 65vh;
    overflow-y: auto;
    padding: 0 16px 20px;
  }

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

  .sheet-handle::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
  }

  .mobile-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 40px;
    font-size: 13px;
    color: var(--text-primary);
  }

  .mobile-summary-count {
    color: var(--accent-green);
    font-weight: 600;
  }

  .filter-header {
    margin-bottom: 12px;
  }

  .filter-title {
    font-size: 16px;
  }

  .filter-section {
    margin-bottom: 12px;
    padding-bottom: 12px;
  }
}

/* Desktop: hide mobile elements */
@media (min-width: 769px) {
  .sheet-handle {
    display: none;
  }

  .mobile-summary {
    display: none;
  }
}
