/* ==============================================================================
   maps.css — Interactive Maps Platform for motorschadens-ankauf.de
   Google Maps Advanced Marker & Geolocation Engine Styles
   ============================================================================== */

:root {
  --map-primary: #1e3a8a;
  --map-primary-hover: #172554;
  --map-accent: #0284c7;
  --map-accent-hover: #0369a1;
  --map-accent-light: #e0f2fe;
  --map-red: #ea4335;
  --map-red-dark: #c5221f;
  --map-red-light: #fee2e2;
  --map-success: #16a34a;
  --map-success-light: #dcfce7;
  --map-warning: #f59e0b;
  --map-warning-light: #fef3c7;
  --map-bg: #f8fafc;
  --map-card-bg: #ffffff;
  --map-border: #e2e8f0;
  --map-border-focus: #38bdf8;
  --map-text-main: #0f172a;
  --map-text-muted: #64748b;
  --map-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
  --map-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --map-shadow-lg: 0 12px 30px -4px rgba(15, 23, 42, 0.14), 0 4px 12px -2px rgba(15, 23, 42, 0.06);
  --map-radius: 16px;
  --map-radius-sm: 10px;
}

/* Map Instruction Bar */
.map-instruction-bar {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #ffffff;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 25;
}

.map-instruction-bar .instruction-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.map-instruction-bar .instruction-text {
  flex: 1;
  line-height: 1.45;
  color: #e2e8f0;
}

.map-instruction-bar .instruction-text strong {
  color: #38bdf8;
}

.map-instruction-bar .instruction-close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  transition: all 0.2s ease;
}

.map-instruction-bar .instruction-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Map Platform Container */
.maps-platform-wrapper {
  position: relative;
  background: var(--map-card-bg);
  border: 1px solid var(--map-border);
  border-radius: var(--map-radius);
  overflow: hidden;
  box-shadow: var(--map-shadow-lg);
  margin-bottom: 40px;
}

.maps-platform-wrapper:fullscreen,
.maps-platform-wrapper:-webkit-full-screen {
  border-radius: 0;
  border: none;
  margin-bottom: 0;
  width: 100vw;
  height: 100vh;
}

.maps-layout {
  display: flex;
  height: 780px;
  position: relative;
}

.maps-platform-wrapper:fullscreen .maps-layout,
.maps-platform-wrapper:-webkit-full-screen .maps-layout {
  height: 100vh;
}

/* Sidebar (Desktop) */
.maps-sidebar {
  width: 400px;
  min-width: 360px;
  background: #ffffff;
  border-right: 1px solid var(--map-border);
  display: flex;
  flex-direction: column;
  z-index: 20;
  height: 100%;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-drag-handle {
  display: none;
  width: 100%;
  padding: 10px 0 6px 0;
  justify-content: center;
  cursor: grab;
  touch-action: none;
}

.mobile-drag-handle .drag-bar {
  width: 44px;
  height: 5px;
  background: #cbd5e1;
  border-radius: 10px;
}

.maps-sidebar-header {
  padding: 16px 18px 14px 18px;
  border-bottom: 1px solid var(--map-border);
  background: #ffffff;
}

.sidebar-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.sidebar-title-row h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--map-text-main);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.total-locations-badge {
  font-size: 11px;
  font-weight: 700;
  color: #0284c7;
  background: #e0f2fe;
  padding: 3px 8px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

/* Search Box */
.maps-search-box {
  position: relative;
  margin-bottom: 12px;
}

.maps-search-input {
  width: 100%;
  padding: 11px 38px 11px 14px;
  border: 1.5px solid var(--map-border);
  border-radius: var(--map-radius-sm);
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
  background: #f8fafc;
  box-sizing: border-box;
}

.maps-search-input:focus {
  border-color: var(--map-accent);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.maps-search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--map-text-muted);
  font-size: 15px;
  pointer-events: none;
}

/* Search Dropdown */
.maps-search-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid var(--map-border);
  border-radius: var(--map-radius-sm);
  box-shadow: var(--map-shadow-lg);
  max-height: 280px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
}

.maps-search-dropdown.active {
  display: block;
}

.search-item {
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background 0.15s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.search-item:last-child {
  border-bottom: none;
}

.search-item:hover,
.search-item.selected {
  background: #f1f5f9;
}

.search-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.search-item-name {
  font-weight: 600;
  color: var(--map-text-main);
  font-size: 13.5px;
}

.search-item-meta {
  font-size: 11.5px;
  color: var(--map-text-muted);
}

.search-item-action {
  color: var(--map-red);
  font-weight: 700;
  font-size: 12px;
  white-space: nowrap;
}

/* Quick Action Buttons */
.map-quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.map-quick-actions .btn-action-accent {
  grid-column: 1 / -1;
}

.btn-action-primary,
.btn-action-secondary,
.btn-action-accent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  outline: none;
}

.btn-action-primary {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

.btn-action-primary:hover {
  background: #0369a1;
}

.btn-action-primary.loading,
.map-control-btn.loading {
  background: #64748b !important;
  color: #ffffff !important;
  cursor: wait;
  opacity: 0.85;
}

.btn-action-primary.loading .btn-icon,
.map-control-btn.loading .ctrl-icon {
  display: inline-block;
  animation: spin 1s infinite linear;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.btn-action-secondary {
  background: #f1f5f9;
  color: var(--map-text-main);
  border-color: var(--map-border);
}

.btn-action-secondary:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

.btn-action-accent {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.btn-action-accent:hover {
  background: #d1fae5;
}

.hidden {
  display: none !important;
}

/* Geolocation Status Banner */
.map-geo-status {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 10px;
  animation: fadeInDown 0.3s ease;
}

.map-geo-status.status-error {
  background: #fef2f2;
  border-color: #fecaca;
}

.map-geo-status.status-warning {
  background: #fffbeb;
  border-color: #fde68a;
}

.geo-status-inner {
  display: flex;
  align-items: center;
  gap: 8px;
}

.geo-status-icon {
  font-size: 16px;
}

.geo-status-text {
  flex: 1;
  min-width: 0;
}

.geo-status-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #166534;
}

.map-geo-status.status-error .geo-status-title {
  color: #991b1b;
}

.map-geo-status.status-warning .geo-status-title {
  color: #92400e;
}

.geo-status-accuracy {
  font-size: 11.5px;
  color: #374151;
  margin-top: 1px;
}

.geo-status-close {
  background: transparent;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  font-size: 12px;
  padding: 4px;
}

.geo-status-close:hover {
  color: #4b5563;
}

/* Live Tracking Toggle */
.tracking-toggle-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
}

.tracking-toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: var(--map-text-main);
  user-select: none;
}

.tracking-toggle-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.tracking-toggle-slider {
  position: relative;
  display: inline-block;
  width: 32px;
  height: 18px;
  background-color: #cbd5e1;
  border-radius: 20px;
  transition: all 0.25s ease;
}

.tracking-toggle-slider::before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  border-radius: 50%;
  transition: all 0.25s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.tracking-toggle-input:checked + .tracking-toggle-slider {
  background-color: #10b981;
}

.tracking-toggle-input:checked + .tracking-toggle-slider::before {
  transform: translateX(14px);
}

/* Filter Controls */
.maps-filters {
  padding: 10px 18px;
  border-bottom: 1px solid var(--map-border);
  background: #fcfdfe;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.maps-select {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--map-border);
  border-radius: 8px;
  font-size: 12.5px;
  font-family: inherit;
  color: var(--map-text-main);
  background: #ffffff;
  outline: none;
  cursor: pointer;
  box-sizing: border-box;
}

.maps-select:focus {
  border-color: var(--map-accent);
}

.filter-checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--map-text-muted);
  cursor: pointer;
}

/* List Tabs */
.maps-list-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #f1f5f9;
  border-bottom: 1px solid var(--map-border);
}

.list-tab-btn {
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  color: var(--map-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.list-tab-btn:hover {
  color: var(--map-text-main);
}

.list-tab-btn.active {
  background: #ffffff;
  color: var(--map-primary);
  border-bottom-color: var(--map-primary);
}

.tab-badge {
  background: #e2e8f0;
  color: #475569;
  padding: 1px 7px;
  border-radius: 12px;
  font-size: 11px;
}

.list-tab-btn.active .tab-badge {
  background: #e0f2fe;
  color: #0284c7;
}

/* Location List */
.maps-location-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px 14px;
}

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

.location-item-card {
  background: #ffffff;
  border: 1px solid var(--map-border);
  border-radius: 10px;
  padding: 11px 13px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.location-item-card:hover {
  border-color: var(--map-accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.12);
}

.location-item-card.is-nearest {
  border-left: 3px solid #10b981;
}

.location-item-icon {
  width: 32px;
  height: 32px;
  background: #ea4335;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(234, 67, 53, 0.25);
}

.location-item-card.is-nearest .location-item-icon {
  background: #10b981;
  box-shadow: 0 2px 5px rgba(16, 185, 129, 0.3);
}

.location-item-details {
  flex: 1;
  min-width: 0;
}

.location-item-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.location-item-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--map-text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.location-distance-badge {
  font-size: 11px;
  font-weight: 700;
  color: #047857;
  background: #ecfdf5;
  padding: 2px 6px;
  border-radius: 6px;
  white-space: nowrap;
}

.location-item-meta {
  font-size: 11.5px;
  color: var(--map-text-muted);
  display: flex;
  justify-content: space-between;
  margin-top: 2px;
}

.location-item-meta .link-hint {
  color: #ea4335;
  font-weight: 700;
}

/* Empty List State */
.list-empty-state {
  text-align: center;
  padding: 30px 15px;
  color: var(--map-text-muted);
}

.list-empty-state .empty-icon {
  font-size: 36px;
  margin-bottom: 10px;
}

.list-empty-state h4 {
  font-size: 15px;
  color: var(--map-text-main);
  margin: 0 0 6px 0;
}

.list-empty-state p {
  font-size: 12.5px;
  line-height: 1.5;
  margin: 0 0 16px 0;
}

.btn-empty-locate {
  background: #0284c7;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

/* Right Map Canvas */
.maps-canvas-wrapper {
  flex: 1;
  position: relative;
  height: 100%;
  background: #f1f5f9;
}

.map-container {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
}

/* Custom Floating Controls */
.map-custom-controls {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 15;
}

.map-control-btn {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  color: #1e293b;
  box-shadow: var(--map-shadow);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}

.map-control-btn:hover {
  background: #f8fafc;
  color: #0284c7;
  border-color: #0284c7;
  transform: translateY(-1px);
  box-shadow: var(--map-shadow-lg);
}

.map-control-btn:active {
  transform: translateY(0);
}

/* Mobile Toggle Button */
.maps-mobile-toggle {
  display: none;
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #1e3a8a;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 12px 22px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  z-index: 15;
  cursor: pointer;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

/* Marker Styles (Google POI & Advanced Marker) */
.custom-poi-marker,
.google-poi-marker-container {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.google-poi-marker-container:hover {
  transform: scale(1.1) translateY(-2px);
  z-index: 999;
}

.google-poi-pin {
  width: 28px;
  height: 28px;
  background: #ea4335;
  border: 2px solid #ffffff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.google-poi-pin-icon {
  transform: rotate(45deg);
  font-size: 13px;
  color: #fff;
}

.google-poi-label {
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  font-weight: 700;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  white-space: nowrap;
}

/* User Live Location Marker (Pulsing Blue Dot) */
.user-location-marker {
  position: relative;
  width: 22px;
  height: 22px;
}

.user-marker-pulse {
  position: absolute;
  top: -9px;
  left: -9px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.4);
  animation: userMarkerPulseAnim 2s infinite cubic-bezier(0.25, 1, 0.5, 1);
}

.user-marker-dot {
  position: absolute;
  top: 0;
  left: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #2563eb;
  border: 3px solid #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-marker-inner {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
}

@keyframes userMarkerPulseAnim {
  0% {
    transform: scale(0.5);
    opacity: 0.9;
  }
  70% {
    transform: scale(1.6);
    opacity: 0;
  }
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

/* Clicked Map Pin (Reverse Geocoded Location) */
.clicked-pin-marker {
  width: 30px;
  height: 30px;
  background: #7c3aed;
  border: 2px solid #ffffff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(124, 58, 237, 0.5);
  animation: bounceDown 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.clicked-pin-icon {
  transform: rotate(45deg);
  font-size: 14px;
}

@keyframes bounceDown {
  0% {
    transform: translateY(-20px) rotate(-45deg);
    opacity: 0;
  }
  100% {
    transform: translateY(0) rotate(-45deg);
    opacity: 1;
  }
}

/* Custom InfoWindow Card (Google Maps & Leaflet) */
.map-infowindow-card {
  max-width: 310px;
  padding: 4px;
  font-family: inherit;
}

.map-iw-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.map-iw-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--map-text-main);
  margin: 0;
}

.map-iw-badge {
  font-size: 10px;
  font-weight: 700;
  color: #15803d;
  background: #dcfce7;
  padding: 2px 6px;
  border-radius: 10px;
  white-space: nowrap;
}

.map-iw-state {
  font-size: 12px;
  color: var(--map-text-muted);
  margin-bottom: 6px;
}

.map-iw-rating {
  font-size: 12px;
  color: #f59e0b;
  font-weight: 700;
  margin-bottom: 8px;
}

.map-iw-rating span {
  color: var(--map-text-main);
}

.map-iw-desc {
  font-size: 12px;
  line-height: 1.45;
  color: #475569;
  margin-bottom: 12px;
  background: #f8fafc;
  padding: 6px 10px;
  border-radius: 6px;
}

.map-iw-address-box {
  background: #f8fafc;
  border: 1px solid var(--map-border);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 10px;
  font-size: 12px;
  color: #334155;
  line-height: 1.4;
}

.map-iw-address-row {
  display: flex;
  margin-bottom: 2px;
}

.map-iw-address-label {
  font-weight: 700;
  width: 80px;
  color: #64748b;
  flex-shrink: 0;
}

.map-iw-buttons {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.map-iw-btn-primary {
  display: block;
  background: #ea4335;
  color: #ffffff !important;
  text-decoration: none;
  font-weight: 700;
  font-size: 12.5px;
  padding: 8px 12px;
  border-radius: 6px;
  text-align: center;
  transition: background 0.2s ease;
}

.map-iw-btn-primary:hover {
  background: #c5221f;
}

.map-iw-btn-secondary {
  display: block;
  background: #f1f5f9;
  color: var(--map-text-main) !important;
  text-decoration: none;
  font-weight: 600;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 6px;
  text-align: center;
}

.map-iw-btn-secondary:hover {
  background: #e2e8f0;
}

/* Cluster Markers */
.marker-cluster-custom {
  background-clip: padding-box;
  border-radius: 20px;
}

.marker-cluster-custom div {
  width: 36px;
  height: 36px;
  margin-left: 2px;
  margin-top: 2px;
  text-align: center;
  border-radius: 50%;
  font-weight: 700;
  font-size: 12px;
  background: #1e3a8a;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(30, 58, 138, 0.4);
  border: 2px solid #ffffff;
}

/* Bundesländer Grid Cards */
.state-grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.state-grid-card {
  background: #ffffff;
  border: 1px solid var(--map-border);
  border-radius: 10px;
  padding: 16px;
  text-decoration: none;
  transition: all 0.2s ease;
  display: block;
}

.state-grid-card:hover {
  border-color: var(--map-accent);
  transform: translateY(-2px);
  box-shadow: var(--map-shadow);
}

.state-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--map-primary);
  margin-bottom: 6px;
}

.state-card-subtitle {
  font-size: 13px;
  color: var(--map-text-muted);
}

/* State Border Tooltips */
.state-border-tooltip {
  background: #1e3a8a !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  border-radius: 6px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  padding: 5px 12px !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25) !important;
}

.state-border-tooltip:before {
  display: none !important;
}

/* ==============================================================================
   Responsive & Mobile Bottom Drawer (375px, 390px, 412px, 768px, 1024px)
   ============================================================================== */

@media (max-width: 991px) {
  .maps-layout {
    height: 640px;
  }

  .maps-sidebar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 75%;
    max-height: 80%;
    border-right: none;
    border-top: 1px solid var(--map-border);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(calc(100% - 60px));
    z-index: 30;
  }

  .mobile-drag-handle {
    display: flex;
  }

  .maps-sidebar.drawer-open {
    transform: translateY(0);
  }

  .maps-mobile-toggle {
    display: inline-flex;
  }

  .map-custom-controls {
    top: 10px;
    right: 10px;
  }

  .map-control-btn .ctrl-text {
    display: none;
  }

  .map-control-btn {
    padding: 8px 10px;
  }
}

@media (max-width: 576px) {
  .maps-layout {
    height: 560px;
  }

  .filter-row {
    grid-template-columns: 1fr;
  }

  .map-instruction-bar {
    font-size: 12px;
    padding: 8px 12px;
  }
}

/* Leaflet Popup Resets */
.leaflet-popup-content-wrapper {
  padding: 0 !important;
  border-radius: 12px !important;
  box-shadow: var(--map-shadow-lg) !important;
  overflow: hidden;
}

.leaflet-popup-content {
  margin: 12px 14px !important;
  line-height: 1.4 !important;
}

/* Animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}