:root {
  --bg: #F8F9F9;
  --navy: #121E36;
  --gold: #C9A84C;
  --muted: rgba(18, 30, 54, 0.55);
  --line: rgba(18, 30, 54, 0.08);
  --shadow-soft: 0 4px 15px rgba(0, 0, 0, 0.05);
  --shadow-strong: 0 -10px 40px rgba(18, 30, 54, 0.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'DM Sans', sans-serif; color: var(--navy); overflow: hidden; background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3, .serif { font-family: 'Playfair Display', serif; }

.app-container { height: 100vh; width: 100vw; position: relative; }

/* --- Map & Custom Markers --- */
.map-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; }
.mapboxgl-ctrl-bottom-left, .mapboxgl-ctrl-bottom-right { display: none !important; }

/* Removed the transition and hover effects so they lock instantly to the map */
.venue-marker { 
  width: 20px; height: 20px; 
  background-color: var(--navy); 
  border: 3px solid #FFF; border-radius: 50%; 
  box-shadow: 0 0 15px rgba(18, 30, 54, 0.5); cursor: pointer; 
}

.place-marker { 
  width: 14px; height: 14px; 
  background-color: var(--gold); 
  border: 2px solid #FFF; border-radius: 50%; 
  box-shadow: 0 0 8px rgba(201, 168, 76, 0.4); cursor: pointer; 
}

/* --- Floating Header (Modernized) --- */
.search-header { 
  position: absolute; 
  top: 50px; /* Pushed down slightly for modern iPhone notches/dynamic islands */
  left: 16px; 
  right: 16px; 
  z-index: 10; 
}
.search-wrapper { 
  display: flex; 
  align-items: center; 
  background: rgba(255, 255, 255, 0.95); 
  backdrop-filter: blur(20px); 
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px; 
  padding: 8px 16px; 
  box-shadow: 0 12px 32px rgba(18, 30, 54, 0.12); 
  border: 1px solid rgba(255, 255, 255, 0.6);
}
.brand-monogram {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--navy); /* Matches your exact brand color */
  margin-right: 12px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
#venueSearch { 
  flex: 1; 
  border: none; 
  background: transparent; 
  padding: 10px 0; 
  font-family: 'DM Sans', sans-serif; 
  font-size: 16px; 
  font-weight: 500;
  outline: none; 
  color: #121E36; 
}
#venueSearch::placeholder { color: rgba(18, 30, 54, 0.4); }

.search-results { 
  position: absolute; 
  top: calc(100% + 12px); 
  left: 0; 
  right: 0; 
  background: rgba(255, 255, 255, 0.95); 
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px; 
  box-shadow: 0 16px 40px rgba(18, 30, 54, 0.15); 
  max-height: 250px; 
  overflow-y: auto; 
  display: none; 
  z-index: 50; 
  border: 1px solid rgba(255, 255, 255, 0.6);
}
.search-results.visible { display: block; }
.search-result-item { 
  padding: 16px 20px; 
  font-size: 15px; 
  font-weight: 500;
  border-bottom: 1px solid rgba(18, 30, 54, 0.06); 
  cursor: pointer; 
  color: #121E36; 
}
.search-result-item:last-child { border-bottom: none; }

/* --- Floating Bottom Sheet --- */
/* --- Floating Bottom Sheet --- */
.bottom-sheet { 
  position: absolute; 
  bottom: 0; 
  left: 0; 
  right: 0; 
  height: 50vh; /* Increased from 45vh */
  max-height: 800px; 
  background: rgba(255, 255, 255, 0.9); 
  backdrop-filter: blur(20px); 
  -webkit-backdrop-filter: blur(20px); 
  border-radius: 32px 32px 0 0; 
  box-shadow: var(--shadow-strong); 
  display: flex; 
  flex-direction: column; 
  z-index: 20; 
  transform: translateY(0); 
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), height 0.4s cubic-bezier(0.16, 1, 0.3, 1); /* Added transition for height */
}

/* NEW: The expanded state */
.bottom-sheet.expanded {
  height: 85vh; /* Expands to take up most of the screen */
}

.bottom-sheet.hidden { transform: translateY(110%); }

/* Add cursor pointer to let users know it's interactive */
.drag-handle { 
  width: 40px; 
  height: 5px; 
  background: rgba(18, 30, 54, 0.2); 
  border-radius: 5px; 
  margin: 12px auto 0; 
  cursor: pointer; /* Added */
}
.sheet-header { padding: 20px 24px; display: flex; justify-content: space-between; align-items: flex-start; }
.eyebrow { display: block; font-size: 10px; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gold); margin-bottom: 4px; }
#guideVenueName { font-size: 26px; line-height: 1.1; margin-bottom: 4px; color: #121E36; }
#guideVenueLocation { font-size: 14px; color: var(--muted); }
.close-btn { background: rgba(18,30,54,0.05); border: none; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-weight: bold; color: var(--navy); display: grid; place-items: center; }

/* --- Timeline Scroller --- */
.timeline-scroller { display: flex; gap: 10px; overflow-x: auto; padding: 0 24px 15px; scrollbar-width: none; border-bottom: 1px solid var(--line); -webkit-overflow-scrolling: touch; }
.timeline-scroller::-webkit-scrollbar { display: none; }
.timeline-pill { flex: 0 0 auto; background: #FFF; border: 1px solid var(--line); border-radius: 99px; padding: 10px 18px; font-family: inherit; font-size: 14px; font-weight: 600; color: #121E36; cursor: pointer; transition: 0.2s; box-shadow: var(--shadow-soft); }
.timeline-pill.active { background: #121E36 !important; color: #FFFFFF !important; border-color: #121E36 !important; }

/* --- Results List --- */
.results-scroll-area { flex: 1; overflow-y: auto; padding: 20px 24px; }
.place-card { background: #FFF; border-radius: 16px; padding: 16px; margin-bottom: 12px; border: 1px solid var(--line); box-shadow: var(--shadow-soft); cursor: pointer; }
.place-name { font-family: 'Playfair Display', serif; font-size: 18px; margin-bottom: 4px; font-weight: 700; color: #121E36; }
.place-meta { font-size: 13px; color: var(--muted); line-height: 1.5; }
.walk-badge { display: inline-flex; background: rgba(18, 30, 54, 0.05); color: #121E36; padding: 4px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; margin-right: 6px; align-items: center;}

/* --- Top Picks Magazine Style --- */
.top-pick-card { background: #121E36 !important; border: 1px solid #C9A84C !important; padding: 16px !important; }
.top-pick-card .place-name { color: #FFFFFF !important; font-size: 19px !important; margin-bottom: 2px !important; }
.top-pick-card .place-meta { color: rgba(255,255,255,0.85) !important; font-size: 12px !important; }
.top-pick-badge { display: block; color: #C9A84C !important; font-size: 9px !important; font-weight: 800 !important; text-transform: uppercase !important; letter-spacing: 0.1em !important; margin-bottom: 6px !important; }
.top-pick-card .walk-badge { background: rgba(255,255,255,0.15) !important; color: #FFFFFF !important; }
.top-pick-notes { color: rgba(255,255,255,0.6) !important; font-size: 11px !important; font-style: italic; margin-top: 6px !important; line-height: 1.4 !important; }

/* --- Place Details Bottom Sheet (Fixed for Map Visibility) --- */
.details-overlay { 
  position: absolute; bottom: 0; left: 0; right: 0; 
  z-index: 30; 
  transform: translateY(0); 
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); 
  pointer-events: none; /* Allows tapping the map above the card */
}
.details-overlay.hidden { transform: translateY(120%); }

.details-card { 
  width: 100%; height: auto; max-height: 50vh; 
  background: rgba(255, 255, 255, 0.95); 
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-radius: 32px 32px 0 0; 
  padding: 30px 24px 40px; 
  position: relative; 
  box-shadow: var(--shadow-strong); 
  overflow-y: auto;
  pointer-events: auto; /* Re-enables clicking on the card itself */
}

.details-close { position: absolute; top: 24px; right: 24px; }
.details-name { font-size: 28px; line-height: 1.1; margin-bottom: 8px; padding-right: 40px; color: #121E36; }
.details-meta { color: var(--gold); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 12px; }
.details-address { font-size: 15px; color: var(--muted); margin-bottom: 24px; }
.details-actions { display: flex; gap: 10px; margin-bottom: 15px; }
.action-btn { flex: 1; text-align: center; padding: 14px; border-radius: 14px; font-size: 13px; font-weight: 700; text-transform: uppercase; text-decoration: none; color: var(--navy); border: 1px solid var(--line); }
.route-btn { display: block; width: 100%; text-align: center; padding: 18px; border-radius: 16px; background: var(--navy); color: #FFF !important; font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; text-decoration: none; box-shadow: var(--shadow-soft); }

.hidden-pill { display: none !important; }
