@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700;800&display=swap');

html, body {
  height: 100%;
  height: 100dvh;
  margin: 0;
  font-family: 'Inter', sans-serif;
  overflow: hidden;
}

.page {
  display: none;
  height: 100vh;
  height: 100dvh;
  width: 100%;
}

.page.active {
  display: flex;
  flex-direction: column;
}

/* Allow scrolling ONLY where needed */
#dashboard {
  overflow-y: auto;
}

#planner {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
}

#planner .flex-1 {
  overflow: hidden;
}

/* Planner sidebar scroll only */
#planner .md\:w-96 {
  overflow-y: auto;
}

/* Map sizing */
#map {
  width: 100%;
  height: 100%;
  min-height: 400px;
}

/* --------- Custom map markers --------- */
.marker-bubble {
  width: 34px;
  height: 34px;
  border-radius: 9999px;
  display: grid;
  place-items: center;
  color: white;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(0,0,0,0.25);
  border: 2px solid rgba(255,255,255,0.85);
}

.marker-reservation { background: #0f172a; }   /* black-ish */
.marker-accommodation { background: #ef4444; } /* red */
.marker-attraction { background: #22c55e; }    /* green */
.marker-want { background: #3b82f6; }          /* blue */
.marker-transport { background: #8b5cf6; }     /* purple */

/* Remove Leaflet's default divIcon styling box */
.leaflet-div-icon {
  background: transparent;
  border: none;
}

/* Day filter dropdown: scroll if too tall for the screen */
#day-filter-menu {
  max-height: min(60vh, 420px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#day-filter-menu button {
  flex-shrink: 0;
}

/* --------- Bottom sheet (mobile modal) --------- */
.bottom-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 2000;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.bottom-sheet-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.bottom-sheet {
  width: 100%;
  background: white;
  border-radius: 20px 20px 0 0;
  padding: 24px 20px 40px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  max-height: 90vh;
  overflow-y: auto;
}

.bottom-sheet-overlay.active .bottom-sheet {
  transform: translateY(0);
}

.bottom-sheet-handle {
  width: 40px;
  height: 4px;
  background: #e2e8f0;
  border-radius: 99px;
  margin: 0 auto 20px;
}

/* --------- Fix time inputs on iOS --------- */
@media (max-width: 768px) {
  #field-time-range,
  #field-time-both .grid {
    overflow: hidden;
  }

  #start-time,
  #end-time,
  #single-time,
  #arrival-time,
  #departure-time {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    font-size: 14px;
  }
}

/* --------- Toast notification --------- */
#toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #0f172a;
  color: white;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
  z-index: 9999;
}

#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Pulsing location dot */
.location-dot-outer {
  width: 20px;
  height: 20px;
  background: rgba(99, 102, 241, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse-ring 1.5s ease-out infinite;
}

.location-dot-inner {
  width: 10px;
  height: 10px;
  background: #6366f1;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 0 4px rgba(0,0,0,0.3);
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(99, 102, 241, 0); }
  100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

.locate-btn-active {
  background: #eef2ff !important;
  border-color: #6366f1 !important;
}