/* ═══════════════════════════════════
   BOGAVANTE.AI — STYLES
   ═══════════════════════════════════ */

/* ── Theme tokens ── */
:root {
  --brand:            #DE6E38;
  --brand-dark:       #c45520;
  --brand-light:      #ff9a5c;
  --brand-soft:       rgba(222,110,56,0.10);

  --bg:               #fffdfb;
  --card-bg:          #ffffff;
  --border:           #eee5de;
  --text:             #1f1812;
  --text-muted:       #8a7d72;
  --sidebar-bg:       #fffdfb;
  --search-bg:        #faf6f2;
  --hover-bg:         rgba(222,110,56,0.05);
  --pill-bg:          #ffffff;
  --pill-active-bg:   var(--brand);
  --pill-active-text: #ffffff;
  --modal-bg:         #ffffff;
  --popup-bg:         #ffffff;
  --popup-icon-bg:    var(--brand-soft);
}
.dark {
  --bg:               #14100d;
  --card-bg:          #1d1814;
  --border:           #332a23;
  --text:             #faf6f2;
  --text-muted:       #a89a8e;
  --sidebar-bg:       #14100d;
  --search-bg:        #1d1814;
  --hover-bg:         rgba(255,154,92,0.07);
  --pill-bg:          #1d1814;
  --pill-active-bg:   var(--brand);
  --pill-active-text: #ffffff;
  --modal-bg:         #1d1814;
  --popup-bg:         #221c17;
  --popup-icon-bg:    rgba(222,110,56,0.18);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ═══════════════════════════════════
   MOBILE TOP NAV (hidden on desktop)
   ═══════════════════════════════════ */
#mobileNav {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  height: 52px;
  min-height: 52px;
  background: var(--sidebar-bg);
  border-bottom: 1px solid var(--border);
  z-index: 700;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
  position: relative;
}
.mobile-nav-left {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
}
.mobile-logo-img { height: 40px; width: auto; display: block; }
.mobile-nav-right { display: flex; align-items: center; gap: 2px; margin-left: auto; }

/* ═══════════════════════════════════
   MAIN LAYOUT
   ═══════════════════════════════════ */
#mainLayout {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
}

#sidebarBackdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 550;
}

/* ═══════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════ */
#sidebar {
  width: 390px;
  min-width: 390px;
  height: 100%;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 600;
  transition: background 0.2s, border-color 0.2s, left 0.3s ease;
}

.sidebar-header { padding: 18px 22px 12px; flex-shrink: 0; }
.logo-row {
  display: flex; align-items: center; justify-content: flex-end;
  position: relative;
  margin-bottom: 10px;
  min-height: 62px;
}
.logo-left {
  position: absolute;
  left: 0;
  display: flex;
  align-items: center;
}
.sidebar-logo-img { height: 62px; width: auto; display: block; max-width: 210px; }
.header-btns { display: flex; gap: 4px; align-items: center; margin-left: auto; }

/* Icon button */
.icon-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
}
.icon-btn:hover { background: var(--hover-bg); color: var(--brand); }
.icon-btn svg { display: block; pointer-events: none; }
.lang-btn { font-size: 11px; font-weight: 700; letter-spacing: 0.5px; }

/* ── Auth row ── */
.auth-row { margin-bottom: 10px; }
.auth-signin-btn {
  width: 100%;
  padding: 9px 14px;
  border: 1.5px dashed var(--brand);
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 13px; font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, transform 0.1s;
}
.auth-signin-btn:hover { background: rgba(222,110,56,0.18); }
.auth-signin-btn:active { transform: scale(0.98); }
.user-chip {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--search-bg);
  font-size: 13px; font-weight: 700;
  color: var(--text);
}
.user-chip-emoji { font-size: 15px; }
.signout-btn {
  margin-left: auto;
  border: none; background: transparent;
  color: var(--text-muted);
  font-size: 12px; font-weight: 500;
  cursor: pointer; font-family: inherit;
  padding: 3px 8px; border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.signout-btn:hover { background: var(--hover-bg); color: var(--brand); }

/* Search */
.search-wrap { position: relative; }
.search-icon {
  position: absolute; left: 10px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted); pointer-events: none; display: flex;
}
.search-input {
  width: 100%;
  padding: 9px 12px 9px 34px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--search-bg);
  color: var(--text);
  font-size: 14px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s, background 0.2s;
}
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus { border-color: var(--brand); }

/* Filters */
.filters {
  padding: 4px 22px 12px;
  display: flex; flex-direction: column; gap: 8px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.filter-row { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--pill-bg);
  color: var(--text);
  font-size: 12px; font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  user-select: none;
  min-height: 28px;
  font-family: inherit;
}
.pill:hover { transform: scale(1.05); box-shadow: 0 1px 4px rgba(222,110,56,0.18); border-color: var(--brand-light); }
.pill:active { transform: scale(0.96); }
.pill.active {
  background: var(--pill-active-bg);
  color: var(--pill-active-text);
  border-color: var(--pill-active-bg);
}
.pill-count { font-weight: 400; opacity: 0.7; }

/* Toolbar: count + sort */
.list-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 22px 6px;
  flex-shrink: 0;
  gap: 10px;
}
.spots-count { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.sort-select {
  border: 1px solid var(--border);
  background: var(--search-bg);
  color: var(--text-muted);
  border-radius: 8px;
  font-size: 12px; font-weight: 600;
  padding: 5px 8px;
  outline: none;
  cursor: pointer;
  font-family: inherit;
  max-width: 190px;
}
.sort-select:focus { border-color: var(--brand); }

/* List */
.spots-list { flex: 1; overflow-y: auto; padding: 4px 12px 12px; }
.spots-list::-webkit-scrollbar { width: 4px; }
.spots-list::-webkit-scrollbar-track { background: transparent; }
.spots-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.empty-state {
  text-align: center;
  padding: 36px 20px;
  color: var(--text-muted);
  font-size: 14px;
}
.empty-state .empty-emoji { font-size: 34px; display: block; margin-bottom: 10px; }

/* Loading spinner */
.loader {
  width: 30px; height: 30px;
  margin: 0 auto 12px;
  border-radius: 50%;
  border: 3px solid var(--brand-soft);
  border-top-color: var(--brand);
  animation: spin 0.7s linear infinite;
}

/* Cards */
.spot-card {
  padding: 12px 14px; border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  touch-action: manipulation;
}
.spot-card:hover { background: var(--hover-bg); border-color: var(--brand-light); }
.spot-card.selected { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.card-top { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.card-icon { font-size: 26px; flex-shrink: 0; margin-top: 1px; }
.card-body { flex: 1; min-width: 0; }
.card-name-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 3px; }
.card-name { font-size: 15px; font-weight: 700; color: var(--text); }
.card-price { font-size: 14px; font-weight: 700; flex-shrink: 0; }
.price-1 { color: #16a34a; }
.price-2 { color: #d97706; }
.price-3 { color: #ea580c; }
.card-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; line-height: 1.45; }
.card-meta-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.card-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 11.5px; color: var(--text); font-weight: 500;
}
.author-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 999px;
  background: var(--brand-soft);
  border: 1px solid transparent;
  font-size: 11.5px; color: var(--brand); font-weight: 700;
}
.rating-badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 12px; font-weight: 700; color: var(--brand);
}
.rating-badge .rating-count { font-weight: 400; color: var(--text-muted); }
.card-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; }
.card-time { font-size: 12px; color: var(--text-muted); }
.directions-link {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 600; color: var(--brand);
  text-decoration: none; padding: 4px 8px; border-radius: 6px;
  transition: background 0.15s; border: none; background: transparent; cursor: pointer;
}
.directions-link:hover { background: var(--brand-soft); }
.dir-full { display: inline; }
.dir-short { display: none; }

/* ═══════════════════════════════════
   MAP CONTAINER
   ═══════════════════════════════════ */
/* z-index:0 creates a stacking context so map overlays (zoom, AI bar,
   add-spot) can never paint over the sidebar or modals */
#mapContainer { flex: 1; position: relative; overflow: hidden; z-index: 0; }
#map { width: 100%; height: 100%; }
#map.picking { cursor: crosshair; }

.leaflet-control-attribution { display: none !important; }

.leaflet-control-zoom {
  border: none !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18) !important;
  border-radius: 8px !important;
  overflow: hidden;
}
.leaflet-control-zoom a {
  width: 36px !important; height: 36px !important;
  line-height: 36px !important; font-size: 18px !important;
  color: #374151 !important; background: white !important;
  border: none !important; border-bottom: 1px solid #e5e7eb !important;
  transition: background 0.15s !important;
}
.leaflet-control-zoom a:last-child { border-bottom: none !important; }
.leaflet-control-zoom a:hover { background: #f3f4f6 !important; }
.dark .leaflet-control-zoom a { background: #1d1814 !important; color: #faf6f2 !important; border-bottom-color: #332a23 !important; }
.dark .leaflet-control-zoom a:hover { background: #26201a !important; }

.locate-btn {
  width: 36px; height: 36px;
  background: white; border: 2px solid rgba(0,0,0,0.2);
  border-radius: 4px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #374151; transition: background 0.15s;
  box-shadow: 0 1px 5px rgba(0,0,0,0.2);
}
.locate-btn:hover { background: #f3f4f6; }
.dark .locate-btn { background: #1d1814; border-color: rgba(255,255,255,0.15); color: #faf6f2; }
.dark .locate-btn:hover { background: #26201a; }

/* ═══════════════════════════════════
   ADD SPOT BUTTON (over map)
   ═══════════════════════════════════ */
#addSpotBtn {
  position: absolute;
  top: 14px; left: 14px;
  z-index: 900;
  display: flex; align-items: center; gap: 6px;
  padding: 9px 16px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, var(--brand-light) 0%, var(--brand) 55%, var(--brand-dark) 100%);
  color: white;
  font-size: 13px; font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 14px rgba(222,110,56,0.45);
  transition: transform 0.12s, filter 0.2s;
  white-space: nowrap;
}
#addSpotBtn:hover { filter: brightness(1.08); transform: translateY(-1px); }
#addSpotBtn:active { transform: scale(0.96); }

/* Pick-location banner */
#pickBanner {
  position: absolute;
  top: 14px; left: 50%;
  transform: translateX(-50%);
  z-index: 950;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--modal-bg);
  color: var(--text);
  font-size: 13px; font-weight: 600;
  box-shadow: 0 6px 24px rgba(0,0,0,0.2);
  max-width: calc(100vw - 28px);
  flex-wrap: wrap;
  justify-content: center;
}
#pickBanner button {
  border: none; border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px; font-weight: 700;
  cursor: pointer; font-family: inherit;
  transition: filter 0.15s;
}
#pickConfirmBtn { background: var(--brand); color: white; }
#pickConfirmBtn:hover { filter: brightness(1.1); }
#pickCancelBtn { background: var(--search-bg); color: var(--text-muted); border: 1px solid var(--border) !important; }

/* ═══════════════════════════════════
   ABOUT BUTTON
   ═══════════════════════════════════ */
#aboutBtn {
  position: absolute;
  bottom: 20px; right: 14px;
  z-index: 900;
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  border: none;
  background: #f6efe9;
  box-shadow: 3px 3px 7px rgba(0,0,0,0.12), -1px -1px 3px rgba(255,255,255,0.9);
  color: #8a7d72;
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
#aboutBtn:hover { background: #eee4db; color: #4b4038; }
.dark #aboutBtn {
  background: #2b241e;
  box-shadow: 3px 3px 7px rgba(0,0,0,0.4), -1px -1px 3px rgba(255,255,255,0.04);
  color: #a89a8e;
}
.dark #aboutBtn:hover { background: #332b24; color: #d6c9bd; }

/* ═══════════════════════════════════
   CUSTOM LEAFLET POPUP
   ═══════════════════════════════════ */
.spot-popup .leaflet-popup-content-wrapper {
  padding: 0;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.14), 0 2px 8px rgba(0,0,0,0.08);
  border: none;
  overflow: hidden;
  background: var(--popup-bg);
  min-width: 280px;
}
.spot-popup .leaflet-popup-content { margin: 0 !important; width: auto !important; }
.spot-popup .leaflet-popup-close-button { display: none; }
.spot-popup .leaflet-popup-tip { background: var(--popup-bg); box-shadow: none; }

.popup-card {
  background: var(--popup-bg);
  padding: 16px 18px;
  min-width: 280px;
  max-width: 320px;
  position: relative;
  font-family: 'Outfit', sans-serif;
}
.popup-close-btn {
  position: absolute; top: 14px; right: 14px;
  width: 26px; height: 26px;
  border-radius: 50%; border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 18px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.popup-close-btn:hover { background: var(--hover-bg); color: var(--text); }
.popup-header {
  display: flex; align-items: flex-start; gap: 12px;
  margin-bottom: 10px; padding-right: 24px;
}
.popup-icon-box {
  width: 50px; height: 50px; flex-shrink: 0;
  border-radius: 12px;
  background: var(--popup-icon-bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
}
.popup-header-info { flex: 1; min-width: 0; }
.popup-name-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 6px;
}
.popup-name { font-size: 16px; font-weight: 800; color: var(--text); }
.popup-price { font-size: 15px; font-weight: 700; flex-shrink: 0; }
.popup-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.popup-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px;
  background: var(--search-bg);
  border: 1px solid var(--border);
  font-size: 12px; font-weight: 500; color: var(--text);
}
.popup-desc { font-size: 14px; color: var(--text-muted); line-height: 1.4; margin-bottom: 10px; }

/* Rating stars in popup */
.popup-rating {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 10px;
}
.star-row { display: flex; gap: 1px; }
.star-btn {
  border: none; background: transparent;
  font-size: 19px; line-height: 1;
  cursor: pointer;
  padding: 1px;
  filter: grayscale(1); opacity: 0.3;
  transition: filter 0.12s, opacity 0.12s, transform 0.12s;
}
.star-btn.lit { filter: none; opacity: 1; }
.star-btn:hover { transform: scale(1.2); }
.popup-rating-info { font-size: 12px; color: var(--text-muted); font-weight: 500; }

.popup-divider { border: none; border-top: 1px solid var(--border); margin-bottom: 10px; }
.popup-footer { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.popup-time { font-size: 12.5px; color: var(--text-muted); }
.popup-actions { display: flex; align-items: center; gap: 2px; }
.popup-dir, .popup-share {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 700; color: var(--brand);
  text-decoration: none; padding: 4px 8px; border-radius: 6px;
  transition: background 0.15s;
  border: none; background: transparent; cursor: pointer;
  font-family: inherit;
}
.popup-dir:hover, .popup-share:hover { background: var(--brand-soft); }
/* beat Leaflet's default .leaflet-container a color */
.leaflet-container a.popup-dir { color: var(--brand); }

/* ═══════════════════════════════════
   ABOUT MODAL
   ═══════════════════════════════════ */
#aboutOverlay {
  display: none;
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: center; justify-content: center;
  padding: 20px;
}
#aboutOverlay.open { display: flex; }
#aboutModal {
  background: var(--modal-bg);
  border-radius: 20px;
  padding: 24px;
  max-width: 400px; width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  position: relative;
}
.modal-header { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.modal-header-emoji { font-size: 22px; }
.modal-header h2 { font-size: 18px; font-weight: 700; color: var(--text); }
.modal-close-x {
  position: absolute; top: 18px; right: 18px;
  width: 28px; height: 28px; border-radius: 50%; border: none;
  background: transparent; color: var(--text-muted);
  font-size: 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.modal-close-x:hover { background: var(--hover-bg); }
.modal-body { font-size: 15px; color: var(--text-muted); line-height: 1.6; margin-bottom: 20px; }
.modal-body strong { color: var(--text); }
.modal-body a { color: var(--brand); font-weight: 700; text-decoration: none; }
.modal-body a:hover { text-decoration: underline; }
.modal-close-btn {
  width: 100%; padding: 14px;
  border: none; border-radius: 12px;
  background: var(--brand); color: white;
  font-size: 16px; font-weight: 700;
  cursor: pointer; transition: background 0.15s;
  font-family: inherit;
}
.modal-close-btn:hover { background: var(--brand-dark); }

/* Refresh spin */
@keyframes spin { to { transform: rotate(360deg); } }
.spinning { animation: spin 0.6s linear; }

/* ═══════════════════════════════════
   MODALS (auth / add-spot)
   ═══════════════════════════════════ */
.ai-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  align-items: center; justify-content: center;
  padding: 20px;
}
.ai-overlay.open { display: flex; }

.ai-modal {
  background: var(--modal-bg);
  border-radius: 24px;
  padding: 32px 28px 28px;
  max-width: 380px; width: 100%;
  box-shadow: 0 24px 70px rgba(0,0,0,0.22);
  position: relative;
  text-align: center;
  animation: modalPop 0.22s ease;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}
@keyframes modalPop {
  from { opacity: 0; transform: scale(0.92) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.ai-modal-emoji { font-size: 40px; margin-bottom: 14px; }
.ai-modal h3 {
  font-size: 20px; font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.3;
}
.ai-modal p {
  font-size: 14px; color: var(--text-muted);
  line-height: 1.6; margin-bottom: 22px;
}
.ai-modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 28px; height: 28px; border-radius: 50%; border: none;
  background: transparent; color: var(--text-muted);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
  z-index: 2;
}
.ai-modal-close:hover { background: var(--hover-bg); color: var(--text); }

.btn-pro {
  width: 100%; padding: 14px;
  border: none; border-radius: 14px;
  background: var(--brand); color: white;
  font-size: 16px; font-weight: 700;
  cursor: pointer; transition: background 0.15s, opacity 0.15s;
  font-family: inherit;
}
.btn-pro:hover { background: var(--brand-dark); }
.btn-pro:disabled { opacity: 0.55; cursor: wait; }

.link-btn {
  display: block;
  margin: 12px auto 0;
  border: none; background: transparent;
  color: var(--text-muted);
  font-size: 13px; font-weight: 500;
  cursor: pointer; font-family: inherit;
  text-decoration: underline;
}
.link-btn:hover { color: var(--brand); }

.waitlist-input {
  width: 100%; padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--search-bg);
  color: var(--text);
  font-size: 15px; font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
  margin-bottom: 12px;
  text-align: left;
}
.waitlist-input:focus { border-color: var(--brand); }
.waitlist-input::placeholder { color: var(--text-muted); }

.auth-error {
  display: none;
  margin-top: 12px;
  font-size: 13px; font-weight: 600;
  color: #dc2626;
  line-height: 1.4;
}
.auth-error.visible { display: block; }

/* Add spot form */
.add-spot-modal { text-align: left; }
.add-spot-modal .ai-modal-emoji, .add-spot-modal h3 { text-align: center; }
.form-label {
  display: block;
  font-size: 12px; font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.6px;
  margin: 2px 2px 6px;
}
.spot-textarea { resize: none; height: 70px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
select.waitlist-input { cursor: pointer; }

.pick-location-btn {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 12px;
  border: 1.5px dashed var(--brand);
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 14px; font-weight: 700;
  cursor: pointer; font-family: inherit;
  margin-bottom: 14px;
  transition: background 0.15s;
}
.pick-location-btn:hover { background: rgba(222,110,56,0.18); }
.pick-location-btn.picked { border-style: solid; background: rgba(22,163,74,0.08); border-color: #16a34a; color: #16a34a; }

/* Toast */
#toast {
  position: fixed;
  bottom: 40px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 2000;
  background: #1f1812;
  color: #fff;
  font-size: 14px; font-weight: 600;
  padding: 12px 22px;
  border-radius: 999px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  max-width: calc(100vw - 40px);
  text-align: center;
}
#toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ═══════════════════════════════════
   RESPONSIVE — MOBILE (< 640px)
   ═══════════════════════════════════ */
@media (max-width: 639px) {
  #mobileNav { display: flex; }

  #sidebar {
    position: fixed;
    top: 52px;
    left: -110%;
    width: min(88vw, 380px);
    height: calc(100vh - 52px);
    height: calc(100dvh - 52px);
    z-index: 600;
    box-shadow: 4px 0 16px rgba(0,0,0,0.12);
  }
  #sidebar.open { left: 0; }
  #sidebarBackdrop.open { display: block; }

  .sidebar-logo-row { display: none; }
  .sidebar-header { padding: 14px 16px 10px; }
  .filters { padding: 4px 16px 10px; }
  .list-toolbar { padding: 8px 16px 4px; }

  .dir-full { display: none; }
  .dir-short { display: inline; }

  .spot-card { padding: 10px 12px; }
  .card-name { font-size: 14px; }
  .card-desc { font-size: 12px; }

  #aboutBtn { bottom: 16px; right: 10px; padding: 7px 12px; font-size: 12px; }
  #addSpotBtn { top: 10px; left: 10px; padding: 8px 14px; font-size: 12px; }

  .spot-popup .leaflet-popup-content-wrapper { min-width: 260px !important; }
  .popup-card { min-width: 260px; max-width: calc(100vw - 40px); }

  .ai-modal { padding: 28px 20px 22px; border-radius: 20px; }
  .ai-modal h3 { font-size: 18px; }
}

/* ═══════════════════════════════════
   RESPONSIVE — TABLET (640–1023px)
   ═══════════════════════════════════ */
@media (min-width: 640px) and (max-width: 1023px) {
  #sidebar { width: 310px; min-width: 310px; }
  body { overflow: hidden; height: 100vh; }
  #mainLayout { height: 100%; overflow: hidden; }
  #mapContainer { overflow: hidden; }
}
@media (min-width: 640px) and (max-width: 1023px) and (orientation: landscape) {
  #sidebar { width: 270px; min-width: 270px; }
  .sidebar-logo-img { height: 54px; }
  .sidebar-header { padding: 12px 16px 10px; }
  .spot-card { padding: 8px 10px; margin-bottom: 6px; }
  .card-name { font-size: 13px; }
  .card-desc { font-size: 11px; margin-bottom: 5px; }
}
