.github-link {
  float:right;
  width: 32px;
  height: 32px;
  background-image: url(../img/github-mark.svg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
}

/* Custom styles fixing bootstrap and leaflet conflicts */
.leaflet-popup-content a.btn {
  display: inline-block;
  padding: 4px 8px;
  margin-top: 8px;
  background-color: #0d6efd;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
}

.leaflet-popup-content a.btn:hover {
  background-color: #0b5ed7;
  color: #fff;
}

.leaflet-popup-content a {
  color: white !important;
}

/* Custom Legend Control Styles */
.leaflet-control-legend {
  background: white;
  border: 2px solid rgba(0,0,0,0.2);
  border-radius: 8px;
  box-shadow: 0 1px 5px rgba(0,0,0,0.4);
  padding: 0;
  min-width: 200px;
  overflow: hidden;
}

.leaflet-control-legend .legend-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  cursor: pointer;
}

.leaflet-control-legend .legend-toggle {
  background: none;
  border: none;
  font-size: 16px;
  font-weight: bold;
  color: #6c757d;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  transition: background-color 0.2s;
}

.leaflet-control-legend .legend-toggle:hover {
  background-color: #e9ecef;
  color: #495057;
}

.leaflet-control-legend .legend-content {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  padding: 8px;
}

.leaflet-control-legend .legend-title {
  font-weight: bold;
  font-size: 14px;
  color: #333;
  margin: 0;
}

.leaflet-control-legend .legend-item {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
  font-size: 12px;
  color: #555;
}

.leaflet-control-legend .legend-item:last-child {
  margin-bottom: 0;
}

.leaflet-control-legend .legend-marker {
  width: 16px;
  height: 26px;
  margin-right: 8px;
  flex-shrink: 0;
}

.leaflet-control-legend .filter-checkbox {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #eee;
}

.leaflet-control-legend .form-check {
  margin: 0;
}

.leaflet-control-legend .form-check-input {
  margin-right: 6px;
}

.leaflet-control-legend .form-check-label {
  font-size: 12px;
  color: #555;
  margin: 0;
  cursor: pointer;
}

/* Pick a Place Section Styles */
.pick-place-section {
  margin-top: 1rem;
  text-align: center;
}

.pick-place-btn {
  background: #28a745;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pick-place-btn:hover {
  background: #218838;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.pick-place-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pick-place-icon {
  font-size: 18px;
}

.pick-place-info {
  margin-top: 1rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #007bff;
  text-align: left;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.picked-place-name {
  font-weight: bold;
  font-size: 16px;
  color: #333;
  margin-bottom: 0.5rem;
}

.picked-place-address {
  font-size: 14px;
  color: #666;
  margin-bottom: 0.5rem;
}

.picked-place-issues {
  font-size: 14px;
  color: #dc3545;
  font-weight: 500;
}

/* Pulsing animation for picked marker */
@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.pulse-marker {
  animation: pulse 2s infinite;
}

/* Collapsed state */
.leaflet-control-legend.legend-collapsed {
  min-width: auto;
}

.leaflet-control-legend.legend-collapsed .legend-header {
  border-bottom: none;
}

/* Custom layout styles */
.app-header {
  display: flex;
  flex-direction: row !important;
  justify-content: space-between;
  align-items: center !important;
  margin-bottom: 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid #dee2e6;
}

.app-title {
  font-size: 2rem;
  font-weight: bold;
  margin: 0;
}

.city-button {
  background-color: #6c757d;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.category-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.category-tab {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  text-decoration: none;
  color: #495057;
  font-weight: 500;
  transition: all 0.2s;
}

.category-tab.active {
  background-color: #0d6efd;
  color: white;
  border-color: #0d6efd;
}

.category-tab:hover {
  background-color: #e9ecef;
  text-decoration: none;
  color: #495057;
}

.category-tab.active:hover {
  background-color: #0b5ed7;
  color: white;
}

.main-content {
  margin-bottom: 2rem;
}

.map-container {
  background-color: #f8f9fa;
  border-radius: 0.5rem;
  overflow: hidden;
  min-height: 500px;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.legend-card {
  background-color: white;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  padding: 1rem;
}

.legend-title {
  font-weight: bold;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.legend-item {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}

.legend-item:last-child {
  margin-bottom: 0;
}

.legend-marker {
  width: 20px;
  height: 32px;
  margin-right: 0.75rem;
}

.filter-checkbox {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #dee2e6;
}

.summary-section {
  background-color: white;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  padding: 1.5rem;
}

.summary-title {
  font-weight: bold;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.quality-bar {
  height: 8px;
  background-color: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 0.25rem;
}

.quality-fill {
  height: 100%;
  transition: width 0.3s ease;
}

.quality-complete {
  background-color: #198754;
}

.quality-partial {
  background-color: #fd7e14;
}

.quality-missing {
  background-color: #dc3545;
}

/* Mobile responsive design */
@media (max-width: 768px) {
  .app-header {
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.5rem !important;
  }

  .app-title {
    font-size: 1.5rem;
  }

  .category-tabs {
    justify-content: center;
  }

  .category-tab {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }

  .map-container {
    min-height: 400px;
  }

  .summary-section {
    padding: 1rem;
  }

  .table-responsive {
    font-size: 0.875rem;
  }

  /* Mobile legend adjustments */
  .leaflet-control-legend {
    min-width: 140px;
  }

  .leaflet-control-legend .legend-header {
    padding: 6px;
  }

  .leaflet-control-legend .legend-title {
    font-size: 12px;
  }

  .leaflet-control-legend .legend-toggle {
    width: 18px;
    height: 18px;
    font-size: 14px;
  }

  .leaflet-control-legend .legend-content {
    padding: 6px;
  }

  .leaflet-control-legend .legend-item {
    font-size: 11px;
    margin-bottom: 4px;
  }

  .leaflet-control-legend .legend-marker {
    width: 14px;
    height: 22px;
    margin-right: 6px;
  }

  .leaflet-control-legend .form-check-label {
    font-size: 11px;
  }

  /* Mobile pick place adjustments */
  .pick-place-btn {
    padding: 10px 20px;
    font-size: 14px;
  }

  .pick-place-icon {
    font-size: 16px;
  }

  .pick-place-info {
    padding: 0.75rem;
    margin: 0.75rem 1rem;
  }

  .picked-place-name {
    font-size: 14px;
  }

  .picked-place-address {
    font-size: 12px;
  }

  .picked-place-issues {
    font-size: 12px;
  }

  /* Auto-collapse legend on very small screens */
  @media (max-width: 480px) {
    .leaflet-control-legend {
      min-width: 120px;
    }
    
    .leaflet-control-legend .legend-header {
      padding: 4px 6px;
    }
    
    .leaflet-control-legend .legend-title {
      font-size: 11px;
    }
  }
}

/* Tablet responsive design */
@media (min-width: 769px) and (max-width: 1024px) {
  .leaflet-control-legend {
    min-width: 180px;
  }
}
