/* ================================================================
   map-themes.css — Let's Ride Expo Event Map Theme Overrides
   ================================================================ */

/* ---- Base map container ---------------------------------------- */
#map-container {
  width: 100%;
  height: 100%;
  min-height: 400px;
}

/* ---- Booth marker icon ----------------------------------------- */
.booth-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 40px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease;
}
.booth-marker:hover {
  transform: rotate(-45deg) scale(1.15);
}
.booth-marker i {
  transform: rotate(45deg);
  color: #fff;
  font-size: 16px;
}

/* ---- Booth popup ----------------------------------------------- */
.booth-popup-wrap .leaflet-popup-content-wrapper {
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
}
.booth-popup-wrap .leaflet-popup-content {
  margin: 0;
  min-width: 220px;
}
.booth-popup {
  padding: 14px 16px;
  font-family: Montserrat, sans-serif;
}
.booth-popup .popup-logo {
  max-width: 80px;
  max-height: 50px;
  object-fit: contain;
  margin-bottom: 8px;
  display: block;
}
.booth-popup .popup-photo {
  width: 100%;
  max-height: 140px;
  object-fit: cover;
  display: block;
  margin-bottom: 10px;
}
.booth-popup .popup-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.booth-popup h4 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 4px 0;
  color: #2c3e50;
}
.booth-popup .popup-booth-num {
  font-size: 12px;
  color: #666;
  margin: 0 0 6px;
}
.booth-popup .popup-desc {
  font-size: 13px;
  color: #444;
  margin: 0 0 8px;
  line-height: 1.5;
}
.booth-popup .badge,
.booth-popup .popup-category {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  color: #fff;
  margin-bottom: 10px;
}
.booth-popup .popup-social {
  margin: 6px 0;
  font-size: 18px;
}
.booth-popup .popup-social a {
  color: #4ca1af;
  margin-right: 8px;
}
.booth-popup .popup-website {
  display: inline-block;
  margin-top: 6px;
  padding: 5px 12px;
  background: #4ca1af;
  color: #fff;
  border-radius: 4px;
  font-size: 12px;
  text-decoration: none;
}
.btn-detail {
  margin-top: 8px;
  background: #4ca1af;
  color: #fff;
  border: none;
  padding: 5px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-family: Montserrat, sans-serif;
}
.btn-detail:hover { background: #3a8a97; }

/* ---- Feature tooltip ------------------------------------------ */
.feature-tooltip {
  font-family: Montserrat, sans-serif;
  font-size: 13px;
  background: rgba(44, 62, 80, 0.88);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 4px 10px;
}

/* ---- Theme switcher control ------------------------------------ */
.theme-switcher {
  background: #fff;
  border-radius: 6px !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2) !important;
}
.theme-btn {
  display: block;
  width: 90px;
  padding: 6px 10px;
  font-size: 12px;
  font-family: Montserrat, sans-serif;
  font-weight: 500;
  text-align: left;
  background: #fff;
  border: none;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  color: #2c3e50;
  transition: background 0.15s;
}
.theme-btn:last-child { border-bottom: none; }
.theme-btn:hover { background: #f0f4f5; }
.theme-btn.active {
  background: #4ca1af;
  color: #fff;
}

/* ================================================================
   Theme: Professional (default — CartoDB Positron)
   ================================================================ */
.theme-professional {
  /* No additional overrides needed */
}

/* ================================================================
   Theme: Classic / Paper — sepia filter on the map tile layer
   ================================================================ */
body.theme-paper .leaflet-layer,
body.theme-paper .leaflet-tile-pane {
  filter: sepia(60%) contrast(0.9) brightness(1.05);
}
.theme-switcher .theme-btn[data-theme="carto_light"]::before {
  content: "📋 ";
}

/* ================================================================
   Theme: Rugged / Outdoors (OpenTopoMap — earthy tones)
   ================================================================ */
body.theme-rugged .booth-popup-wrap .leaflet-popup-content-wrapper {
  border: 2px solid #8b6914;
}
body.theme-rugged .btn-detail { background: #8b6914; }
body.theme-rugged .btn-detail:hover { background: #6d5210; }

/* ================================================================
   Theme: Night / Dark (CartoDB Dark Matter)
   ================================================================ */
body.theme-night {
  background: #1a1a2e;
}
body.theme-night .map-sidebar {
  background: #1e1e2e;
  color: #cdd6f4;
  border-color: #313244;
}
body.theme-night .vendor-item {
  border-color: #313244;
  color: #cdd6f4;
}
body.theme-night .vendor-item:hover,
body.theme-night .vendor-item.active {
  background: #313244;
}
body.theme-night #vendor-search {
  background: #2a2a3e;
  color: #cdd6f4;
  border-color: #444;
}
body.theme-night .booth-popup h4 { color: #cdd6f4; }
body.theme-night .booth-popup-wrap .leaflet-popup-content-wrapper {
  background: #1e1e2e;
  color: #cdd6f4;
}
body.theme-night .booth-popup .popup-desc { color: #a6adc8; }
body.theme-night .leaflet-popup-tip { background: #1e1e2e; }

/* ================================================================
   Theme: Satellite (Esri World Imagery)
   ================================================================ */
body.theme-satellite .booth-marker {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255,255,255,0.4);
}

/* ================================================================
   Sidebar styles
   ================================================================ */
.map-sidebar {
  height: calc(100vh - 80px);
  overflow-y: auto;
  background: #fff;
  border-right: 1px solid #e8edf0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sidebar-title {
  font-family: "Playfair Display", serif;
  font-size: 20px;
  color: #2c3e50;
  margin: 0 0 4px;
}
.sidebar-subtitle {
  font-size: 12px;
  color: #888;
  margin: 0 0 12px;
}
#vendor-search {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #dde3e7;
  border-radius: 4px;
  font-size: 13px;
  font-family: Montserrat, sans-serif;
  outline: none;
}
#vendor-search:focus { border-color: #4ca1af; }

#category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}
.chip {
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid #d0d7dd;
  background: #f7f9fa;
  font-size: 11px;
  font-family: Montserrat, sans-serif;
  cursor: pointer;
  color: #2c3e50;
  transition: all 0.15s;
}
.chip.active,
.chip:hover {
  background: #4ca1af;
  border-color: #4ca1af;
  color: #fff;
}
#result-count {
  font-size: 12px;
  color: #888;
  padding-bottom: 4px;
  border-bottom: 1px solid #eee;
}
#vendor-list {
  flex: 1;
  overflow-y: auto;
}
.vendor-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 6px;
  border-bottom: 1px solid #f0f3f5;
  cursor: pointer;
  transition: background 0.15s;
  border-radius: 4px;
}
.vendor-item:hover,
.vendor-item.active {
  background: #f0f8fa;
}
.sidebar-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
  border: 1px solid #eee;
}
.sidebar-logo-placeholder {
  width: 44px;
  height: 44px;
  border-radius: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
}
.vendor-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.vendor-info strong { font-size: 13px; color: #2c3e50; }
.booth-num { font-size: 11px; color: #888; }
.cat-badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 10px;
  color: #fff;
}
.no-vendors,
.map-no-event,
.map-error {
  text-align: center;
  padding: 40px 20px;
  color: #888;
  font-size: 14px;
}

/* Map full height in map column */
.map-col {
  padding: 0 !important;
  position: relative;
}
.map-col #map-container {
  height: calc(100vh - 80px);
}

@media (max-width: 991px) {
  .map-sidebar {
    height: 300px;
  }
  .map-col #map-container {
    height: 60vh;
  }
}
