/* ProtestPulse Components — All UI element styles */

/* ---- Utility classes ---- */
.hidden { display: none !important; }

/* ---- Logo ---- */
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: -0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}

.logo-accent {
  color: var(--red-400);
}

.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--red-500);
  border-radius: var(--radius-full);
  animation: pulse-dot 1200ms ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
  50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

/* ---- Mini pulse stats in header ---- */
#pulse-mini {
  display: flex;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  margin-left: auto;
}

.mini-stat {
  color: var(--text-muted);
  white-space: nowrap;
}

.mini-stat-value {
  color: var(--text-bright);
  font-weight: 600;
}

/* ---- Connection status ---- */
#connection-status {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  white-space: nowrap;
}

#connection-status.status-live { color: var(--emerald-500); }
#connection-status.status-stale { color: var(--amber-500); }
#connection-status.status-down { color: var(--red-500); }

/* ---- Source health dots ---- */
#source-health {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-shrink: 0;
}

.source-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-dim);
}

.source-dot.active { background: var(--emerald-500); animation: none; }
.source-dot.stale { background: var(--amber-500); animation: dot-breathe 2s ease-in-out infinite; }
.source-dot.dead { background: var(--text-dim); animation: none; opacity: 0.4; }

@keyframes dot-breathe {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}
@keyframes dot-breathe-active {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* Tooltip for source dots */
.source-dot[title] { cursor: help; }

/* Refresh button */
.refresh-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-full, 50%);
  color: var(--text-muted);
  font-size: 14px;
  padding: 4px 8px;
  cursor: pointer;
  line-height: 1;
}
.refresh-btn:hover { color: var(--text-bright); border-color: var(--text-muted); }
.refresh-btn:active { transform: scale(0.93); }
.refresh-btn.spinning { animation: spin 0.6s linear; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ---- View tabs ---- */
.view-tab {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  background: none;
  color: var(--text-muted);
  transition: all var(--duration-fast) var(--ease-default);
  white-space: nowrap;
  min-height: var(--touch-min, 44px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.view-tab:hover {
  color: var(--text-primary);
}

.view-tab.active {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
  color: var(--red-400);
}

/* ---- Filter pills ---- */
#firehose-filters {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
  overflow-x: auto;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}

.filter-pill {
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--duration-fast) var(--ease-default);
}

.filter-pill:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.filter-pill.active {
  background: var(--bg-surface);
  color: var(--text-bright);
  border-color: var(--border);
}

/* ---- New posts banner ---- */
#new-posts-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  background: var(--bg-raised);
  border-bottom: 1px solid var(--border);
  font-size: var(--text-sm);
  color: var(--blue-500);
  cursor: pointer;
  flex-shrink: 0;
}

#new-posts-banner button {
  background: none;
  border: none;
  color: var(--blue-500);
  font-weight: 600;
  font-size: var(--text-sm);
  cursor: pointer;
  text-decoration: underline;
}

/* ---- Firehose post card (the most important component) ---- */
.firehose-post {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background var(--duration-fast) var(--ease-default);
}

.firehose-post:hover {
  background: rgba(255, 255, 255, 0.02);
}

.post-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: 4px;
}

/* Platform badge — colored text */
.post-platform {
  font-family: var(--font-display, var(--font-body));
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.post-platform[data-platform="bluesky"] { color: var(--platform-bluesky); }
.post-platform[data-platform="mastodon"] { color: var(--platform-mastodon); }
.post-platform[data-platform="reddit"] { color: var(--platform-reddit); }
.post-platform[data-platform="youtube"] { color: var(--platform-youtube); }
.post-platform[data-platform="gdelt"] { color: var(--platform-gdelt); }
.post-platform[data-platform="rss"] { color: var(--platform-rss); }

/* Author — handle as link */
.post-author {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.post-author a {
  color: inherit;
  text-decoration: none;
}

.post-author a:hover {
  color: var(--text-bright);
}

/* Post time */
.post-time {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  margin-left: auto;
}

/* Post text — 15px, readable */
.post-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  margin: 8px 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.post-text .hashtag {
  color: var(--blue-500);
  font-weight: 500;
}

/* Media — images/video inline, prominent */
.post-media {
  margin: 10px -20px 0 -20px;
  border-radius: 0;
  overflow: hidden;
}

.post-media img {
  width: 100%;
  height: auto;
  display: block;
}

.post-media video {
  width: 100%;
  height: auto;
  max-height: 500px;
  background: #000;
}

/* Video thumbnail with play badge */
.post-media-video-thumb {
  display: block;
  position: relative;
  text-decoration: none;
}
.post-media-video-thumb img {
  width: 100%;
  height: auto;
  display: block;
}
.video-play-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(0,0,0,0.75);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
}
.post-media-video-thumb:hover .video-play-badge {
  background: rgba(232,64,61,0.85);
}

/* Actions */
.post-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  opacity: 0.5;
  transition: opacity 200ms;
}
.firehose-post:hover .post-actions {
  opacity: 1;
}

.post-action {
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: none;
  font-family: var(--font-body);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  transition: all var(--duration-fast) var(--ease-default);
}

.post-action:hover {
  color: var(--text-bright);
  border-color: var(--border);
}

.post-action[data-action="open"] {
  margin-left: auto;
}

@media (max-width: 767px) {
  .post-actions { opacity: 1; }

  .post-action {
    min-height: var(--touch-min);
    padding: var(--space-sm) var(--space-md);
    font-size: var(--text-sm);
  }

  .firehose-post {
    padding: var(--space-lg);
  }

  .post-text {
    font-size: var(--text-base); /* 15px via mobile override */
    line-height: 1.55;
  }
}

/* ---- Platform badge (used in queue, etc) ---- */
.platform-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--space-sm);
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  line-height: 1.4;
}

.platform-badge[data-platform="bluesky"]  { background: rgba(91,157,255,0.15); color: var(--platform-bluesky); }
.platform-badge[data-platform="mastodon"] { background: rgba(99,100,255,0.15); color: var(--platform-mastodon); }
.platform-badge[data-platform="reddit"]   { background: rgba(255,69,0,0.15);   color: var(--platform-reddit); }
.platform-badge[data-platform="youtube"]  { background: rgba(255,0,0,0.15);    color: var(--platform-youtube); }
.platform-badge[data-platform="gdelt"]    { background: rgba(52,211,153,0.15); color: var(--platform-gdelt); }
.platform-badge[data-platform="rss"]      { background: rgba(52,211,153,0.15); color: var(--platform-rss); }

/* ---- News item ---- */
.news-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border);
  transition: background var(--duration-fast) var(--ease-default);
}

@media (max-width: 767px) {
  .news-item {
    padding: var(--space-lg);
    gap: var(--space-sm);
  }

  .news-item .news-headline {
    font-size: var(--text-lg);
    line-height: 1.4;
  }
}

.news-item:hover {
  background: var(--bg-card);
}

.news-item .news-source {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.news-item .news-headline,
.news-item .news-title {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text-bright);
  line-height: 1.4;
}

.news-item .tone-bar {
  height: 3px;
  border-radius: var(--radius-full);
  background: var(--orchid-500);
  margin-top: var(--space-xs);
  transition: width var(--duration-normal) var(--ease-default);
}

.breaking-flag {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--space-sm);
  border-radius: var(--radius-full);
  background: rgba(239, 68, 68, 0.2);
  color: var(--red-400);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  animation: breaking-pulse 2s ease-in-out infinite;
}

@keyframes breaking-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ---- Event list items (map sidebar) ---- */
.event-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

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

.event-type {
  font-family: var(--font-mono);
  font-size: var(--text-xs, 12px);
  text-transform: uppercase;
  color: var(--amber-500);
  letter-spacing: 0.5px;
}

.event-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-bright);
  margin: 4px 0;
}

.event-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.event-link {
  font-size: 12px;
  color: var(--blue-500);
  text-decoration: none;
}

.event-link:hover {
  text-decoration: underline;
}

.event-item.live {
  border-left: 3px solid var(--red-500);
}

/* ---- Sidebar toggle button ---- */
.sidebar-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  float: right;
  padding: 4px 8px;
  line-height: 1;
  transition: transform 0.3s ease;
}

.map-sidebar.expanded .sidebar-toggle {
  transform: rotate(180deg);
}

/* ---- Show-more button for event list ---- */
.show-more-btn {
  display: block;
  width: 100%;
  padding: 12px 16px;
  background: none;
  border: none;
  border-top: 1px solid var(--border);
  color: var(--blue-500);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
}

.show-more-btn:hover {
  background: var(--bg-surface);
}

/* ---- Compact event items on mobile ---- */
@media (max-width: 767px) {
  .event-item {
    padding: 8px 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 8px;
    min-height: 52px;
  }

  .event-type {
    font-size: 10px;
    flex-shrink: 0;
  }

  .event-title {
    font-size: 13px;
    margin: 0;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .event-meta {
    font-size: 11px;
    width: 100%;
    flex-basis: 100%;
  }

  .event-link {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border: 1px solid var(--blue-500);
    border-radius: 4px;
    white-space: nowrap;
    margin-left: auto;
  }
}

/* ---- Event map markers ---- */
.event-marker-icon {
  background: transparent;
  border: none;
}

.event-diamond {
  width: 12px;
  height: 12px;
  background: #FFAA2E;
  transform: rotate(45deg);
  border: 1px solid rgba(255, 170, 46, 0.8);
  box-shadow: 0 0 6px rgba(255, 170, 46, 0.4);
}

/* ---- Event popup ---- */
.event-popup {
  font-size: var(--text-sm);
  line-height: 1.5;
  max-width: 260px;
}

.event-popup strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text-bright);
}

.event-popup a {
  display: inline-block;
  margin-top: 6px;
  color: #FFAA2E;
  font-weight: 600;
  text-decoration: none;
  font-size: var(--text-xs);
}

.event-popup a:hover {
  text-decoration: underline;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-default);
  min-height: 36px;
  min-width: 44px;
}

@media (max-width: 767px) {
  .btn { min-height: 44px; }
}

.btn-primary {
  background: var(--blue-500);
  color: #fff;
  border-color: var(--blue-500);
}

.btn-primary:hover {
  background: #4a8af0;
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--bg-raised);
  border-color: var(--text-muted);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--bg-raised);
}

/* ---- Share queue tray ---- */
.tray-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-lg);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-muted);
  cursor: pointer;
}

.tray-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: var(--text-lg);
  cursor: pointer;
  padding: var(--space-xs);
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tray-body {
  padding: var(--space-sm) var(--space-lg);
}

.tray-actions {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  border-top: 1px solid var(--border);
}

/* ---- Queue item ---- */
.queue-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) 0;
}

.queue-text {
  flex: 1;
  font-size: var(--text-sm);
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: var(--text-lg);
  padding: var(--space-xs);
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ---- Modal ---- */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.modal-header h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--text-bright);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: var(--text-2xl);
  cursor: pointer;
  padding: var(--space-xs);
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: var(--text-bright);
}

#card-preview {
  background: var(--bg-raised);
  border-radius: var(--radius-lg);
  min-height: 200px;
  margin-bottom: var(--space-lg);
}

.modal-actions {
  display: flex;
  gap: var(--space-sm);
  justify-content: flex-end;
}

/* ---- Feed empty / loading states ---- */
.feed-empty {
  padding: var(--space-3xl) var(--space-xl);
  text-align: center;
  color: var(--text-dim);
  font-size: var(--text-sm);
}

.loading-state,
.empty-state {
  padding: var(--space-3xl) var(--space-xl);
  text-align: center;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

/* ---- News snippet ---- */
.news-snippet {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
}

/* ---- News filter pills container ---- */
.filter-pills {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
  overflow-x: auto;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}

/* ---- Queue flash animation ---- */
.queue-flash {
  animation: queue-flash-anim 600ms ease-out;
}

@keyframes queue-flash-anim {
  0% { border-color: var(--blue-500); box-shadow: 0 0 12px rgba(91, 157, 255, 0.3); }
  100% { border-color: var(--border); box-shadow: none; }
}

/* ---- New dot ---- */
.new-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--blue-500);
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

/* ---- Active states (Fix 3) ---- */
.post-action:active {
  background: var(--bg-surface);
  transform: scale(0.97);
}

.filter-pill:active {
  background: var(--bg-surface);
}

.view-tab:active {
  opacity: 0.8;
}

.btn:active {
  transform: scale(0.97);
}

#load-new-posts:active {
  opacity: 0.7;
  transform: scale(0.97);
}

.tray-toggle:active,
.queue-remove:active,
.modal-close:active {
  transform: scale(0.93);
}

/* ---- About button & panel (Fix 1) ---- */
.about-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 16px;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--duration-fast) var(--ease-default);
}

.about-btn:hover { color: var(--text-bright); border-color: var(--text-muted); }
.about-btn:active { transform: scale(0.93); }

.about-panel {
  position: fixed;
  top: calc(56px + 44px); /* below header + view tabs */
  left: 0;
  right: 0;
  z-index: 45; /* below view tabs (50), above content */
  background: var(--bg-raised);
  border-bottom: 1px solid var(--border);
  padding: var(--space-md) var(--space-xl);
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--text-muted);
}

.about-content {
  max-width: 640px;
  margin: 0 auto;
  position: relative;
  padding-right: 32px;
}

.about-content p { margin-bottom: var(--space-xs); }
.about-content p:last-of-type { margin-bottom: 0; }
.about-content strong { color: var(--text-bright); }

.about-dismiss {
  position: absolute;
  top: 0;
  right: 0;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: var(--text-xl);
  cursor: pointer;
  padding: var(--space-xs);
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.about-dismiss:hover { color: var(--text-bright); }

/* ---- Location filter bar (Fix 2) ---- */
.location-filter-bar {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  flex-wrap: wrap;
  position: relative;
}

.location-filter-bar input[type="text"] {
  flex: 1;
  min-width: 140px;
  max-width: 240px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  outline: none;
  transition: border-color var(--duration-fast) var(--ease-default);
}

.geo-note {
  width: 100%;
  font-size: var(--text-xs);
  color: var(--text-dim);
  padding-top: 4px;
  line-height: 1.4;
}

.location-filter-bar input[type="text"]:focus {
  border-color: var(--blue-500);
}

.location-filter-bar input[type="text"]::placeholder {
  color: var(--text-dim);
}

.filter-btn {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-muted);
  font-size: var(--text-sm);
  cursor: pointer;
  white-space: nowrap;
  min-height: 36px;
  transition: all var(--duration-fast) var(--ease-default);
}

.filter-btn:hover { color: var(--text-bright); border-color: var(--text-muted); }
.filter-btn:active { transform: scale(0.97); }

/* Floating highlights pill */
.highlights-pill {
  position: fixed;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-bright);
  text-decoration: none;
  padding: 10px 20px;
  background: var(--bg-card);
  border: 1px solid var(--amber-500);
  border-radius: 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 0 12px rgba(255,170,46,0.15);
  white-space: nowrap;
}
.highlights-pill:hover {
  background: var(--bg-raised);
  box-shadow: 0 4px 24px rgba(0,0,0,0.6), 0 0 16px rgba(255,170,46,0.25);
}
.highlights-pill:active { transform: translateX(-50%) scale(0.97); }

/* Welcome overlay — first visit */
.welcome-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.welcome-overlay.hidden { display: none; }

.welcome-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  max-width: 420px;
  width: 100%;
  text-align: center;
}
.welcome-card h2 {
  font-family: var(--font-display, var(--font-body));
  font-size: 24px;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 8px;
}
.welcome-lead {
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 16px;
}
.welcome-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 12px;
}
.welcome-card strong { color: var(--text-bright); }

.welcome-btn {
  margin-top: 16px;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  background: var(--red-500);
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  min-height: 48px;
}
.welcome-btn:hover {
  background: #D63A3A;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(232, 64, 61, 0.3);
}
.welcome-btn:active {
  transform: translateY(0) scale(0.98);
  box-shadow: none;
}

/* Map disclaimer */
.map-disclaimer {
  padding: 8px 16px;
  font-size: var(--text-xs);
  color: var(--text-muted);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  text-align: center;
  flex-shrink: 0;
}

.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: var(--space-lg);
  right: var(--space-lg);
  max-height: 200px;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  z-index: var(--z-dropdown);
}

.autocomplete-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  cursor: pointer;
  font-size: var(--text-sm);
  color: var(--text-primary);
  transition: background var(--duration-fast) var(--ease-default);
}

.autocomplete-item:hover { background: var(--bg-surface); }

.result-type {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-dim);
}

.filter-chips {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: rgba(91, 157, 255, 0.15);
  color: var(--blue-500);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  white-space: nowrap;
}

.chip-remove {
  background: none;
  border: none;
  color: var(--blue-500);
  cursor: pointer;
  font-size: 14px;
  padding: 0 2px;
  line-height: 1;
}

.chip-remove:hover { color: var(--text-bright); }

@media (max-width: 767px) {
  .location-filter-bar {
    padding: var(--space-sm) var(--space-md);
  }

  .location-filter-bar input[type="text"] {
    max-width: none;
    min-width: 0;
  }

  .filter-btn {
    min-height: var(--touch-min);
  }

  .about-panel {
    top: 56px;
    padding: var(--space-md);
  }
}

/* ---- Tab note (Fix 5) ---- */
.tab-note {
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--text-xs);
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

/* ---- Disabled filter pill (Fix 7) ---- */
.filter-pill.disabled {
  opacity: 0.3;
  pointer-events: none;
  cursor: default;
}
