/* Map fixes: hide OSM attribution flag and default marker icon */
.leaflet-attribution-flag {
  display: none !important;
}

.leaflet-default-icon-path {
  background-image: none !important;
}

/* Ensure custom markers work without Leaflet default icon fallback */
.leaflet-marker-icon.leaflet-zoom-animated {
  background-image: none !important;
}

/* Better tile loading indicator */
.map-tile-status {
  position: absolute;
  bottom: 64px;
  left: 8px;
  right: 8px;
  z-index: 800;
  background: var(--surface, #fff);
  color: var(--text, #182638);
  padding: 8px 12px;
  border-radius: 10px;
  font: 13px system-ui;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  display: none;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.map-tile-status.visible {
  display: flex;
}

.map-tile-status.retrying {
  background: #fff3cd;
  border: 1px solid #ffc107;
}

.map-tile-status.failed {
  background: #f8d7da;
  border: 1px solid #dc3545;
}

.map-tile-status.success {
  background: #d4edda;
  border: 1px solid #28a745;
}

.map-tile-status button {
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border, #ccc);
  background: var(--surface, #fff);
  color: var(--text, #182638);
  font: inherit;
  cursor: pointer;
}

.map-tile-status button:active {
  background: #e8e8e8;
}

html[data-theme="dark"] .map-tile-status {
  background: #1a2230;
  color: #e8edf2;
  border-color: #334052;
}

html[data-theme="dark"] .map-tile-status button {
  background: #1c2534;
  color: #e8edf2;
  border-color: #334052;
}

html[data-theme="dark"] .map-tile-status.retrying {
  background: #3a3310;
  border-color: #eab308;
}

html[data-theme="dark"] .map-tile-status.failed {
  background: #3a1a1a;
  border-color: #dc3545;
}

html[data-theme="dark"] .map-tile-status.success {
  background: #1a3a1a;
  border-color: #28a745;
}