* {
  box-sizing: border-box;
}

/* Prevent over-scrolling on iOS Chrome - map page only */
html.map-page,
html.map-page body {
  overscroll-behavior-y: none;
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
}

body { 
  margin: 0; 
  padding: 0; 
  font-family: 'Quicksand', -apple-system, sans-serif;
}

#map { 
  position: absolute; 
  top: 70px;
  bottom: 0; 
  width: 100%; 
}

/* HEADER */
#header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: rgba(255, 255, 255, 1);
  backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

#header img {
  height: 60px;
  cursor: pointer;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

#desktop-filter-btn,
#desktop-list-btn,
#feedback-btn,
#account-btn {
  width: 80px;
  min-width: 80px;
  height: 48px;
  border-radius: 24px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 0;
  transition: all 0.2s ease;
}

/* Account avatar sizing for signed-in users */
.account-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.account-avatar-mobile {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.account-initial {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #4daabb;
  color: white;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

#desktop-filter-btn svg,
#desktop-list-btn svg,
#feedback-btn svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

#desktop-filter-btn .nav-label,
#desktop-list-btn .nav-label,
#feedback-btn .nav-label {
  font-size: 11px;
  font-weight: 600;
  color: #666;
  white-space: nowrap;
}

@media (hover: hover) and (pointer: fine) {
  #desktop-filter-btn:hover,
  #desktop-list-btn:hover,
  #feedback-btn:hover {
    background: rgba(0, 0, 0, 0.05);
  }
}

/* Active state for desktop filter button */
#desktop-filter-btn.active {
  color: #4daabb;
}

#desktop-filter-btn.active svg {
  stroke: #4daabb;
}

#desktop-filter-btn.active .nav-label {
  color: #4daabb;
}

/* FILTER DRAWER */
.filter-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  top: auto;
  width: 320px;
  height: calc(100% - 70px); /* Leave space for header */
  max-height: 90vh;
  max-height: 90dvh; /* Dynamic viewport height for iOS */
  background: white;
  box-shadow: 4px 0 20px rgba(0,0,0,0.15);
  z-index: 2100;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.filter-drawer.active {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 20px;
  border-bottom: 1px solid #e0e0e0;
  flex-shrink: 0;
}

.drawer-header h3 {
  margin: 0;
  font-size: 22px;
  color: #333;
}

.drawer-close {
  background: #f0f0f0;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  transition: all 0.2s ease;
}

.drawer-close:hover {
  background: #e0e0e0;
  color: #333;
}

.drawer-content {
  flex-grow: 1;
  overflow-y: auto;
  padding: 20px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2050;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.drawer-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.drawer-content details {
  margin: 12px 0;
  padding: 12px;
  border-radius: 8px;
  background: #f8f9fa;
  border-left: 4px solid #4daabb;
}

.drawer-content details[open] {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.drawer-content details summary {
  font-weight: 600;
  color: #444;
  font-size: 15px;
  cursor: pointer;
  padding: 4px 0;
  list-style: none;
}

.drawer-content details summary::-webkit-details-marker {
  display: none;
}

.drawer-content label {
  display: block;
  padding: 8px 12px;
  margin: 4px 0;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
  font-size: 15px;
  position: relative;
}

.drawer-content label.selected {
  background: #f4c430;
  color: white;
}

.drawer-content input[type="checkbox"] {
  display: none;
}

.drawer-content label.selected::after {
  content: '✓';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: bold;
  font-size: 16px;
}

/* Standalone filter (Free toggle) */
.standalone-filter {
  margin: 16px 0 12px 0;
  padding: 12px;
  border-radius: 8px;
  background: #f8f9fa;
  border-left: 4px solid #4daabb;
}

.standalone-filter .checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background 0.2s ease;
  font-size: 15px;
  position: relative;
}

.standalone-filter .checkbox-label.selected {
  background: #f4c430;
  color: white;
}

.standalone-filter .standalone-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.standalone-filter .checkbox-text {
  flex: 1;
}

.standalone-filter .checkbox-label.selected::after {
  content: '✓';
  position: absolute;
  right: 16px;
  font-weight: bold;
  font-size: 16px;
}

#reset-btn {
  width: 100%; 
  padding: 12px; 
  background: #4daabb;
  color: white; 
  border: none; 
  border-radius: 8px; 
  cursor: pointer; 
  margin-top: 12px;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  #reset-btn:hover {
    background: #f1d274;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(241, 210, 116, 0.4);
  }
}

/* DESKTOP LOCATION SHEET */
.desktop-sheet {
  position: fixed;
  top: 110px;
  right: 20px;
  width: 420px;
  min-height: 300px;
  max-height: calc(100vh - 170px);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  z-index: 1600;
  transform: translateX(calc(100% + 40px));
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  display: none;
}

.desktop-sheet.active {
  transform: translateX(0);
}

.sheet-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(240, 240, 240, 0.9);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  transition: all 0.2s ease;
  z-index: 10;
}

.sheet-share {
  position: absolute;
  top: 16px;
  right: 60px;
  background: rgba(240, 240, 240, 0.9);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  transition: all 0.2s ease;
  z-index: 10;
}

.sheet-share svg {
  stroke: #666;
}

.sheet-close:hover,
.sheet-share:hover {
  background: rgba(224, 224, 224, 0.95);
  color: #333;
  transform: scale(1.1);
}

.sheet-share:hover svg {
  stroke: #333;
}

.sheet-content {
  padding: 24px;
  padding-top: 60px;
  max-height: 100%;
  overflow-y: auto;
}

.sheet-content h2 {
  margin: 0 0 12px 0;
  font-size: 26px;
  color: #333;
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sheet-content h2 .location-icon-desktop {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  object-fit: contain;
}

.sheet-content .category-badge {
  display: inline-block;
  background: #4daabb;
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}

.sheet-content .description {
  font-size: 15px;
  line-height: 1.6;
  color: #555;
  margin-bottom: 20px;
}

.sheet-content .info-section {
  margin-bottom: 16px;
  background: #f8f9fa;
  padding: 12px;
  border-radius: 8px;
}

.sheet-content .info-section h3 {
  font-size: 12px;
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 0 0 8px 0;
}

.sheet-content .info-item {
  padding: 4px 0;
  font-size: 14px;
  color: #333;
  line-height: 1.5;
}

/* Side-by-side info sections for desktop */
.info-grid-desktop {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 20px;
}

.info-grid-desktop .info-section {
  background: #f8f9fa;
  padding: 10px;
  border-radius: 8px;
}

/* Desktop location links - matching mobile style */
.sheet-content .location-links {
  display: flex;
  gap: 20px;
  margin-top: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.sheet-content .location-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.sheet-content .location-link svg {
  flex-shrink: 0;
  stroke: #333;
}

.sheet-content .location-link:hover {
  opacity: 0.6;
}

/* MOBILE BOTTOM SHEET */
.mobile-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  z-index: 1600;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 52vh;
  display: none;
  flex-direction: column;
  /* Prevent over-scrolling on iOS Chrome */
  overscroll-behavior: contain;
}

.mobile-sheet.active {
  transform: translateY(0);
}

.mobile-sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 16px 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
  gap: 12px;
}

.mobile-sheet-header h2 {
  margin: 0;
  font-size: 18px;
  color: #333;
  line-height: 1.3;
  font-weight: 600;
  flex-grow: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-sheet-header h2 .location-icon-mobile {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  object-fit: contain;
}

.mobile-sheet-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Hide the old icon buttons in header - we've moved them inline */
#mobile-website-btn,
#mobile-maps-btn {
  display: none !important;
}

.sheet-icon-btn {
  width: auto;
  min-width: 36px;
  height: auto;
  border-radius: 8px;
  border: none;
  background: #f8f9fa;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #333;
}

.icon-btn-emoji {
  font-size: 18px;
  line-height: 1;
}

.icon-btn-label {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: #666;
  white-space: nowrap;
}

.sheet-icon-btn svg {
  width: 20px;
  height: 20px;
}

.sheet-icon-btn:active {
  background: #e9ecef;
  transform: scale(0.95);
}

.mobile-sheet-close {
  background: #f0f0f0;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.mobile-sheet-share {
  background: #f0f0f0;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.mobile-sheet-share svg {
  stroke: #666;
}

.mobile-sheet-close:active,
.mobile-sheet-share:active {
  background: #e0e0e0;
  transform: scale(0.95);
}

.sheet-content-mobile {
  padding: 16px;
  overflow-y: auto;
  flex-grow: 1;
  -webkit-overflow-scrolling: touch;
  /* Prevent over-scrolling revealing white space */
  overscroll-behavior: contain;
  /* Ensure proper touch handling on iOS */
  touch-action: pan-y;
}

.sheet-content-mobile .category-badge {
  display: inline-block;
  background: #4daabb;
  color: white;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
}

/* Mobile Location Links - Simple icon + text style */
.sheet-content-mobile .location-links {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.sheet-content-mobile .location-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.sheet-content-mobile .location-link svg {
  flex-shrink: 0;
  stroke: #333;
}

.sheet-content-mobile .location-link:active {
  opacity: 0.6;
}

.sheet-content-mobile .description {
  font-size: 14px;
  line-height: 1.5;
  color: #555;
  margin-bottom: 16px;
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.05);
  transition: background-color 0.15s ease;
  padding: 8px;
  margin-left: -8px;
  margin-right: -8px;
  border-radius: 6px;
}

.sheet-content-mobile .description:active {
  background-color: rgba(0, 0, 0, 0.03);
}

.sheet-content-mobile .description-collapsed {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: calc(1.5em * 3 + 5px); /* 3 lines + 3px buffer for browser differences */
}

.sheet-content-mobile .description-expanded {
  display: block;
}

/* Removed old see-more-btn styles for mobile as we're using inline now */

.sheet-content-mobile .info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.sheet-content-mobile .info-section {
  background: #f8f9fa;
  padding: 10px;
  border-radius: 8px;
}

.sheet-content-mobile .info-section h3 {
  font-size: 11px;
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 6px 0;
}

.sheet-content-mobile .info-item {
  font-size: 13px;
  color: #333;
  line-height: 1.4;
  margin-bottom: 3px;
}

.sheet-content-mobile .info-item:last-child {
  margin-bottom: 0;
}

.sheet-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1550;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  display: none;
}

.sheet-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* LIST VIEW (MOBILE ONLY) */
.list-view {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  top: auto;
  height: calc(100% - 70px); /* Leave space for header */
  max-height: 90vh;
  max-height: 90dvh; /* Dynamic viewport height for iOS */
  background: white;
  z-index: 2200;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: none;
  flex-direction: column;
}

.list-view.active {
  transform: translateX(0);
}

.list-header {
  display: flex;
  flex-direction: column;
  padding: 20px 20px 16px;
  border-bottom: 1px solid #e0e0e0;
  flex-shrink: 0;
  background: white;
}

.list-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.list-header h3 {
  margin: 0;
  font-size: 20px;
  color: #333;
}

.list-count {
  font-size: 13px;
  color: #888;
  font-weight: 500;
  margin-top: 4px;
}

.list-subheader {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.list-filter-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Inactive state (grey) — for Add Filters when no filters active */
.list-filter-indicator.list-pill-inactive {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid #ccc;
  color: #888;
}

.list-filter-indicator.list-pill-inactive svg {
  stroke: #888;
}

/* Active state (teal) — for Add Filters when filters are active */
.list-filter-indicator.list-pill-active {
  background: rgba(77, 170, 187, 0.1);
  border: 1px solid #4daabb;
  color: #4daabb;
}

.list-filter-indicator.list-pill-active svg {
  stroke: #4daabb;
}

.list-filter-indicator:active {
  transform: scale(0.95);
}

/* Saved pill in list subheader */
.list-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.list-pill-inactive {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid #ccc;
  color: #888;
}

.list-pill-inactive svg {
  stroke: #888;
  fill: none;
}

.list-pill-active {
  background: rgba(77, 170, 187, 0.1);
  border: 1px solid #4daabb;
  color: #4daabb;
}

.list-pill-active svg {
  stroke: #4daabb;
}

/* Fill the bookmark icon when saved pill is active */
#list-saved-toggle.list-pill-active svg {
  fill: #e4594e;
  stroke: #e4594e;
}

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

.list-filter-indicator svg {
  width: 14px;
  height: 14px;
}

.list-close {
  background: #f0f0f0;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.list-close:active {
  background: #e0e0e0;
  transform: scale(0.95);
}

/* List header actions container - matches mobile-sheet-actions */
.list-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* List share button - matches mobile-sheet-share exactly */
.list-share-btn {
  background: #f0f0f0;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.list-share-btn svg {
  stroke: #666;
}

.list-share-btn:active,
.list-close:active {
  background: #e0e0e0;
  transform: scale(0.95);
}

.list-items {
  flex-grow: 1;
  overflow-y: auto;
  padding: 16px;
  -webkit-overflow-scrolling: touch;
  background: #f8f9fa;
}

.list-item {
  display: flex;
  flex-direction: column;
  padding: 18px;
  margin-bottom: 12px;
  background: white;
  border: 1px solid #e8e8e8;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.list-item:active {
  background: #f8f9fa;
  transform: scale(0.98);
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.list-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
  gap: 12px;
}

.list-item-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-grow: 1;
  min-width: 0;
}

.list-item-title .location-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  object-fit: contain;
}

.list-item-header h4 {
  margin: 0;
  font-size: 18px;
  color: #333;
  font-weight: 600;
  flex-grow: 1;
  line-height: 1.3;
  min-width: 0;
}

.list-distance {
  font-size: 11px;
  color: #888;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid #ddd;
  padding: 3px 10px;
  border-radius: 14px;
}

.list-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.list-save-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.list-save-btn:active {
  transform: scale(0.85);
}

.list-save-btn.saved svg {
  fill: #e4594e;
  stroke: #e4594e;
}

@keyframes list-save-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.list-save-btn.just-saved {
  animation: list-save-pop 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
  .list-save-btn:hover {
    background: rgba(0, 0, 0, 0.05);
  }
  .list-save-btn:hover svg {
    stroke: #e4594e;
  }
}

.saved-filter-count {
  font-size: 13px;
  color: #999;
  font-weight: 600;
}

.list-item-category {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.list-category-badge {
  display: inline-block;
  font-size: 12px;
  color: white;
  background: #4daabb;
  padding: 4px 12px;
  border-radius: 14px;
  font-weight: 600;
}

.list-description {
  font-size: 14px;
  color: #666;
  line-height: 1.5;
  margin: 0 0 12px 0;
}

.list-item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.list-tag {
  display: inline-block;
  font-size: 12px;
  padding: 4px 10px;
  background: #f0f0f0;
  border-radius: 12px;
  color: #555;
  font-weight: 500;
}

.list-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  display: none;
}

.list-backdrop.active {
  opacity: 1;
  pointer-events: auto;
  display: block;
}

/* Filter toggle button - bottom left (mobile only) */
#filter-toggle {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  cursor: pointer;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  color: #333;
}

#filter-toggle:active {
  transform: scale(0.95);
  box-shadow: 0 1px 5px rgba(0,0,0,0.15);
}

#filter-toggle svg {
  width: 24px;
  height: 24px;
}

/* Active state for filter toggle */
#filter-toggle.active {
  color: #4daabb;
}

#filter-toggle.active svg {
  stroke: #4daabb;
}

/* List toggle button - bottom left next to filter (mobile only) */
#list-toggle {
  position: fixed;
  bottom: 20px;
  left: 88px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  cursor: pointer;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  color: #333;
}

#list-toggle:active {
  transform: scale(0.95);
  box-shadow: 0 1px 5px rgba(0,0,0,0.15);
}

#list-toggle svg {
  width: 24px;
  height: 24px;
}

/* MAPBOX CONTROLS STYLING */
.mapboxgl-ctrl-top-right {
  top: 10px;
  right: 10px;
}

.mapboxgl-ctrl-bottom-right {
  bottom: 10px;
  right: 10px;
}

.mapboxgl-ctrl-bottom-left {
  bottom: 10px;
  left: 10px;
}

/* Hide zoom controls on mobile */
@media (max-width: 600px) {
  .mapboxgl-ctrl-top-right .mapboxgl-ctrl-group {
    display: none;
  }
  
  /* Hide desktop-only buttons and elements on mobile */
  #desktop-filter-btn,
  #desktop-list-btn,
  .header-right {
    display: none !important;
  }
  
  /* Center logo on mobile */
  #header {
    justify-content: center;
  }
}

/* Hide default Mapbox geolocation button - we'll use custom */
.mapboxgl-ctrl-geolocate {
  display: none !important;
}

/* Custom Geolocation Button */
#custom-geolocate-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  cursor: pointer;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

/* Default state - gray icon, white background */
#custom-geolocate-btn svg {
  stroke: #999999;
}

/* Disabled state - red icon, white background */
#custom-geolocate-btn.disabled {
  background: white;
  cursor: not-allowed;
  animation: none;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

#custom-geolocate-btn.disabled svg {
  stroke: #ff4d4d !important;
}

#custom-geolocate-btn.disabled:hover {
  transform: none;
}

/* Pulsing ring animation with halo */
@keyframes pulse-ring {
  0% {
    box-shadow: 0 2px 10px rgba(0,0,0,0.2), 0 0 0 0 rgba(77, 170, 187, 0.5);
  }
  50% {
    box-shadow: 0 2px 10px rgba(0,0,0,0.2), 0 0 0 15px rgba(77, 170, 187, 0);
  }
  100% {
    box-shadow: 0 2px 10px rgba(0,0,0,0.2), 0 0 0 0 rgba(77, 170, 187, 0);
  }
}

/* Apply pulse animation when NOT active, NOT disabled, and NOT stopped */
#custom-geolocate-btn:not(.active):not(.disabled):not(.pulse-stopped) {
  animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Stop pulsing class */
#custom-geolocate-btn.pulse-stopped {
  animation: none;
}

/* Hover state */
@media (hover: hover) and (pointer: fine) {
  #custom-geolocate-btn:hover:not(.disabled) {
    transform: scale(1.08);
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  }
  
  #custom-geolocate-btn:hover:not(.active):not(.disabled) {
    animation: none;
  }
}

/* Active state (click) */
#custom-geolocate-btn:active:not(.disabled) {
  transform: scale(0.95);
}

/* When location is locked - blue icon, white background */
#custom-geolocate-btn.active {
  background: white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  animation: none;
}

/* Icon styling - default state */
#custom-geolocate-btn svg {
  width: 28px;
  height: 28px;
  transition: all 0.2s ease;
}

#custom-geolocate-btn svg circle,
#custom-geolocate-btn svg path {
  transition: all 0.2s ease;
}

/* Active state icon color - blue */
#custom-geolocate-btn.active svg {
  stroke: #4daabb;
}

#custom-geolocate-btn.active svg circle:last-child {
  fill: #4daabb;
}

/* Recentering animation - brief pulse when recentering */
@keyframes recenter-pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
  }
}

#custom-geolocate-btn.recentering {
  animation: recenter-pulse 0.3s ease;
}

/* Error state - red icon, white background */
#custom-geolocate-btn.error {
  background: white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  animation: none;
}

#custom-geolocate-btn.error svg {
  stroke: #ff4d4d;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: white;
  border-top: 1px solid #e0e0e0;
  display: none;
  justify-content: space-around;
  align-items: center;
  z-index: 1500;
  box-shadow: 0 -1px 4px rgba(0,0,0,0.06);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: #666;
  transition: all 0.2s ease;
  height: 100%;
  position: relative;
}

.nav-item:active {
  background: rgba(77, 170, 187, 0.1);
  color: #4daabb;
}

.nav-item svg {
  width: 24px;
  height: 24px;
}

/* Active state for filters */
.nav-item.active {
  color: #4daabb;
}

.nav-item.active svg {
  stroke: #4daabb;
}

.nav-label {
  font-size: 11px;
  font-weight: 600;
  font-family: 'Quicksand', sans-serif;
}

/* Mobile Devices */
@media (max-width: 600px) {
  #header {
    height: 60px;
    padding: 0 12px;
    background: transparent;
    backdrop-filter: none;
  }

  #header img {
    height: 60px;
  }

  /* Hide desktop filter button and feedback button on mobile */
  #desktop-filter-btn,
  #feedback-btn {
    display: none;
  }

  #map {
    top: 0;
    bottom: 70px; /* Make room for bottom nav */
  }

  .mapboxgl-ctrl-top-right {
    top: 10px;
    right: 10px;
  }

  .mapboxgl-ctrl-bottom-left {
    left: 10px;
  }

  .mapboxgl-ctrl-bottom-right {
    right: 10px;
  }

  /* Custom geolocation button positioning on mobile */
  #custom-geolocate-btn {
    bottom: 90px; /* Above bottom nav */
    right: 16px;
  }

  /* Make filter drawer slide from bottom and cover full screen on mobile */
  .filter-drawer {
    bottom: 0;
    top: auto;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    height: calc(100% - 60px); /* Leave space for mobile header (60px) */
    max-height: 90vh;
    max-height: 90dvh; /* Dynamic viewport height for iOS */
    transform: translateY(100%);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  }

  .filter-drawer.active {
    transform: translateY(0);
  }

  /* Make list view consistent - slide from bottom */
  .list-view {
    display: flex;
    bottom: 0;
    top: auto;
    height: calc(100% - 60px); /* Leave space for mobile header (60px) */
    max-height: 90vh;
    max-height: 90dvh; /* Dynamic viewport height for iOS */
    transform: translateY(100%);
    border-radius: 20px 20px 0 0;
    overflow: hidden;
  }

  .list-view.active {
    transform: translateY(0);
  }

  /* Make feedback modal consistent - slide from bottom */
  .feedback-modal {
    position: fixed;
    bottom: 0;
    top: auto;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    height: calc(100% - 60px); /* Leave space for mobile header (60px) */
    max-height: 90vh;
    max-height: 90dvh; /* Dynamic viewport height for iOS */
    transform: translateY(100%);
    border-radius: 20px 20px 0 0;
  }
  
  .feedback-modal.active {
    transform: translateY(0);
  }

  .desktop-sheet {
    display: none !important;
  }

  .mobile-sheet {
    display: flex;
  }

  /* Show bottom navigation on mobile */
  .mobile-bottom-nav {
    display: flex;
  }

  /* Hide old floating buttons */
  #list-toggle,
  #filter-toggle {
    display: none !important;
  }

  .list-backdrop {
    display: block;
  }
}

/* FEEDBACK MODAL */
.feedback-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 90%;
  max-width: 600px;
  height: 85vh; /* Changed from max-height to height */
  max-height: 85vh;
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  z-index: 2300;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  /* Prevent over-scrolling on iOS Chrome */
  overscroll-behavior: contain;
}

.feedback-modal.active {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.feedback-modal-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.feedback-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 24px 20px 24px;
  border-bottom: 1px solid #e0e0e0;
  flex-shrink: 0;
}

.feedback-modal-header h3 {
  margin: 0;
  font-size: 22px;
  color: #333;
}

.feedback-modal-close {
  background: #f0f0f0;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.feedback-modal-close:hover {
  background: #e0e0e0;
  color: #333;
}

.feedback-modal-body {
  flex-grow: 1;
  overflow-y: auto;
  padding: 24px;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
  /* Prevent over-scrolling revealing white space */
  overscroll-behavior: contain;
  /* Ensure proper touch handling on iOS */
  touch-action: pan-y;
}

.feedback-section {
  margin-bottom: 24px;
}

.feedback-section h4 {
  margin: 0 0 16px 0;
  font-size: 18px;
  color: #333;
}

.feedback-description,
.mailing-description {
  font-size: 15px;
  line-height: 1.6;
  color: #555;
  margin-bottom: 16px;
}

.feedback-submit-btn {
  display: block;
  width: 100%;
  padding: 14px 20px;
  background: #4daabb;
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Quicksand', sans-serif;
  text-align: center;
  text-decoration: none;
}

.feedback-submit-btn:hover {
  background: #3d8a99;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(77, 170, 187, 0.3);
}

.feedback-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, #e0e0e0, transparent);
  margin: 32px 0;
}

.mailing-list-section h4 {
  margin: 0 0 12px 0;
  font-size: 18px;
  color: #333;
}

/* Custom Mailchimp Form Styling */
.custom-mailchimp-form {
  width: 100%;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: #333;
  margin-bottom: 8px;
}

.required-asterisk {
  color: #f4c430;
  font-weight: bold;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 15px;
  font-family: 'Quicksand', sans-serif;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
  background: white;
}

.form-input:focus {
  outline: none;
  border-color: #4daabb;
}

.form-input::placeholder {
  color: #999;
}

.form-submit-btn {
  width: 100%;
  padding: 12px 20px;
  background: #4daabb;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Quicksand', sans-serif;
}

.form-submit-btn:hover {
  background: #3d8a99;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(77, 170, 187, 0.3);
}

.form-submit-btn:active {
  transform: translateY(0);
}

.form-messages {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  display: none;
}

.form-messages.success {
  display: block;
  background-color: rgba(77, 170, 187, 0.1);
  color: #4daabb;
}

.form-messages.error {
  display: block;
  background-color: rgba(255, 77, 77, 0.1);
  color: #ff4d4d;
}

.feedback-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2250;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.feedback-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* WELCOME MODAL */
.welcome-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 90%;
  max-width: 500px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  z-index: 2400;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.welcome-modal.active {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.welcome-modal-content {
  display: flex;
  flex-direction: column;
}

.welcome-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid #e0e0e0;
}

.welcome-modal-header h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: #333;
}

.welcome-modal-close {
  background: #f0f0f0;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.welcome-modal-close:hover {
  background: #e0e0e0;
  color: #333;
}

.welcome-modal-body {
  padding: 32px 24px 24px 24px;
}

.welcome-text {
  font-size: 16px;
  line-height: 1.6;
  color: #555;
  margin: 0 0 20px 0;
}

.beta-text {
  font-weight: 600;
  color: #333;
  margin-bottom: 12px !important;
}

.welcome-close-btn {
  display: block;
  width: 100%;
  padding: 14px 20px;
  background: #4daabb;
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Quicksand', sans-serif;
}

.welcome-close-btn:hover {
  background: #3d8a99;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(77, 170, 187, 0.3);
}

.welcome-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2350;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.welcome-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* Mobile adjustments for welcome modal */
@media (max-width: 600px) {
  .welcome-modal {
    width: 95%;
    max-width: none;
  }
  
  .welcome-modal-header h3 {
    font-size: 22px;
  }
  
  .welcome-modal-body {
    padding: 24px 20px 20px 20px;
  }
  
  .welcome-text {
    font-size: 15px;
  }
}

/* Mobile adjustments for feedback modal */
@media (max-width: 600px) {
  .feedback-modal {
    position: fixed;
    bottom: 0;
    top: auto;
    left: 0;
    right: 0;
    transform: translateY(100%);
    width: 100%;
    max-width: 100%;
    height: calc(100% - 60px); /* Leave space for mobile header (60px) */
    max-height: 90vh;
    max-height: 90dvh; /* Dynamic viewport height for iOS */
    border-radius: 20px 20px 0 0;
  }
  
  .feedback-modal.active {
    transform: translateY(0);
  }
  
  .feedback-modal-header {
    padding: 20px 16px 12px 16px;
  }
  
  .feedback-modal-header h3 {
    font-size: 20px;
  }
  
  .feedback-modal-body {
    padding: 16px;
  }
  
  .feedback-submit-btn {
    padding: 12px 16px;
    font-size: 15px;
  }
}

/* Desktop Devices */
@media (min-width: 601px) {
  .mobile-sheet {
    display: none !important;
  }

  .desktop-sheet {
    display: block;
  }

  .sheet-backdrop {
    display: block;
  }

  /* Filter drawer slides from right on desktop */
  .filter-drawer {
    top: 70px;
    bottom: 0;
    left: auto;
    right: 0;
    width: 360px;
    height: auto;
    max-height: none;
    transform: translateX(100%);
    box-shadow: -4px 0 20px rgba(0,0,0,0.15);
  }
  
  .filter-drawer.active {
    transform: translateX(0);
  }

  /* Enable list view on desktop with right-side panel styling */
  .list-view {
    display: flex !important;
    top: 70px;
    bottom: 0;
    left: auto;
    right: 0;
    width: 440px;
    max-width: 440px;
    height: auto;
    max-height: none;
    transform: translateX(100%);
    box-shadow: -4px 0 20px rgba(0,0,0,0.15);
  }
  
  .list-view.active {
    transform: translateX(0);
  }

  /* Hide mobile bottom buttons on desktop */
  #list-toggle,
  #filter-toggle {
    display: none !important;
  }

  .list-backdrop {
    display: block;
  }
  
  .drawer-backdrop {
    display: block;
  }
}

/* ADD LOCATION MODAL */
.add-location-hero {
  text-align: center;
  margin-bottom: 28px;
}

.add-location-hero svg {
  margin-bottom: 12px;
}

.add-location-hero h4 {
  margin: 0 0 10px 0;
  font-size: 20px;
  color: #333;
  font-weight: 700;
}

.add-location-hero p {
  font-size: 15px;
  line-height: 1.6;
  color: #555;
  margin: 0;
}

.add-location-what {
  margin-bottom: 28px;
}

.add-location-what h4 {
  margin: 0 0 14px 0;
  font-size: 16px;
  color: #333;
  font-weight: 700;
}

.add-location-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.add-location-tag {
  display: inline-block;
  font-size: 13px;
  padding: 6px 14px;
  background: #f0f7f9;
  border: 1px solid #d4ecf0;
  border-radius: 20px;
  color: #333;
  font-weight: 500;
}

.add-location-cta {
  display: block;
  margin-bottom: 16px;
}

.add-location-note {
  text-align: center;
  font-size: 13px;
  color: #999;
  margin: 0;
  line-height: 1.5;
}

/* Ensure Add Location modal uses same mobile behavior */
@media (max-width: 600px) {
  #add-location-modal {
    position: fixed;
    bottom: 0;
    top: auto;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    height: calc(100% - 60px);
    max-height: 90vh;
    max-height: 90dvh;
    transform: translateY(100%);
    border-radius: 20px 20px 0 0;
  }
  
  #add-location-modal.active {
    transform: translateY(0);
  }
  
  #add-location-backdrop {
    display: block;
  }
}

/* GDPR Cookie Consent Banner */
.cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  z-index: 3000;
  padding: 24px;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-top: 3px solid #4daabb;
}

.cookie-consent-banner.active {
  transform: translateY(0);
}

.cookie-consent-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.cookie-consent-text-wrapper {
  flex: 1;
}

.cookie-consent-title {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 700;
  color: #333;
}

.cookie-consent-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #666;
}

.cookie-consent-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
  width: 100%;
  max-width: 300px;
}

.cookie-btn {
  padding: 14px 28px;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Quicksand', sans-serif;
  white-space: nowrap;
  width: 100%;
}

.cookie-accept {
  background: #4daabb;
  color: white;
  box-shadow: 0 4px 12px rgba(77, 170, 187, 0.3);
  order: 1;
}

.cookie-accept:hover {
  background: #3d8a99;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(77, 170, 187, 0.4);
}

.cookie-decline {
  background: transparent;
  color: #999;
  border: 1px solid #ddd;
  padding: 12px 24px;
  font-weight: 600;
  font-size: 14px;
  order: 2;
}

.cookie-decline:hover {
  background: #f5f5f5;
  color: #666;
  border-color: #ccc;
}

@media (max-width: 600px) {
  .cookie-consent-banner {
    padding: 20px 16px;
  }
  
  .cookie-consent-content {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  
  .cookie-consent-title {
    font-size: 16px;
  }
  
  .cookie-consent-text {
    font-size: 13px;
  }
  
  .cookie-consent-buttons {
    flex-direction: column;
    max-width: 100%;
  }
  
  .cookie-btn {
    width: 100%;
    padding: 12px 20px;
  }
  
  .cookie-decline {
    padding: 11px 20px;
  }
}