/* ==========================================================================
   SHARED MAP STYLES - Common across City and Media Maps
   ========================================================================== */

/* ==========================================================================
   ZOOM INSTRUCTION OVERLAY - Shared Implementation
   ========================================================================== */

.zoom-instruction {
  position: absolute;
  bottom: 25%;
  right: 50%;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 12px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1000;
  font-weight: 500;
}

/* ==========================================================================
   POPUP STYLES - Shared Layout & Styling
   ========================================================================== */

/* Base popup container */
.location-popup {
  width: 100%;
  height: 100%;
}

/* Flexible popup layout - supports both single and dual column layouts */
.popup-layout {
  display: flex;
  gap: 15px;
  min-height: 200px;
}

.popup-info-section {
  flex: 1;
  line-height: 1.5;
  min-width: 250px;
}

.popup-images-section {
  flex: 1;
  max-height: 300px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 5px;
}

.popup-images-section img {
  display: block;
  margin-bottom: 10px;
  width: 100%;
  height: auto;
}

/* Leaflet popup customization - shared base */
.custom-popup .leaflet-popup-content-wrapper {
  background: white;
  color: #000;
  font-size: 14px;
  line-height: 22px;
}

.custom-popup .leaflet-popup-content {
  max-height: 400px;
  max-width: max-content;
  margin: 1.5rem 0 0;
  padding: 0.5rem 1rem 1rem;
  overflow-x: hidden;
  overflow-y: auto;
}

/* ==========================================================================
   MAP CONTROLS - Shared Base Styles
   ========================================================================== */

/* Base info control styling */
.info {
  padding: 6px 8px;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
  border-radius: 5px;
}

.info h4 {
  margin: 0 0 5px;
  color: #777;
}

.info.is-hidden {
  display: none;
}

/* ==========================================================================
   LEAFLET CUSTOMIZATIONS - Shared Overrides
   ========================================================================== */

/* Attribution positioning */
.leaflet-control-attribution {
  background: rgba(255, 255, 255, 0.8);
  font-size: 11px;
}

/* Leaflet control containers */
.leaflet-bar {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  border-radius: 6px;
  overflow: hidden;
}

.leaflet-bar a {
  background: white;
  color: #333;
  border-bottom: 1px solid #ddd;
}

.leaflet-bar a:hover {
  background: #f4f4f4;
}

/* ==========================================================================
   SCROLLBAR STYLING - Scoped to Map Container
   ========================================================================== */

#map *::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

#map *::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

#map *::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

#map *::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Firefox scrollbar */
#map * {
  scrollbar-width: thin;
  scrollbar-color: #888 #f1f1f1;
}

/* ==========================================================================
   RESPONSIVE ADJUSTMENTS - Shared Mobile Optimizations
   ========================================================================== */

@media (max-width: 768px) {
  .popup-layout {
    flex-direction: column;
    gap: 10px;
  }
  
  .popup-info-section {
    min-width: auto;
  }
  
  .zoom-instruction {
    bottom: 20%;
    right: 40%;
    font-size: 11px;
    padding: 6px 10px;
  }
}

@media (max-width: 480px) {
  .custom-popup .leaflet-popup-content {
    margin: 1rem 0 0;
    padding: 0.5rem;
  }
  
  .popup-layout {
    min-height: 150px;
  }
}
