/* Font imports removed - now using centralized font system */

/* Design system variables now imported from /shared/css/design-system.css */

/* Font family now handled by centralized font system */

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-secondary);
  padding-top: 53px;
  /* Account for fixed navbar */
}

/* Navigation styles removed - now using unified navigation.css */

#map {
  flex: 1;
  width: 100%;
}

/* Custom styles for the popup content */
.custom-popup {
  max-width: 300px;
  padding: 16px;
  border-radius: 12px;
  background-color: var(--bg-primary);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
}

.popup-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.popup-attribute {
  margin-bottom: 6px;
  color: var(--text-secondary);
  font-size: 14px;
}

/* Button styles now centralized in design-system.css */

/* Add your custom CSS styles for the legend here */
.legend {
  padding: 16px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
  background-color: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  box-shadow: var(--shadow-base);
}

.legend-point {
  display: flex;
  padding-top: 10px;
  width: 12px;
  height: 12px;
  border: 1px solid var(--color-gray-600);
  background-color: var(--color-gray-600);
  border-radius: 50%;
  margin-right: auto;
  margin-left: auto;
}

.legend-title {
  font-weight: bold;
  margin-bottom: 5px;
}

/* Remove outline color when clicking on the buttons */
.btn-secundary:active,
.btn-secundary:focus {
  outline-color: transparent !important;
}

/* Remove outline color when clicking on the "Download CSV" and "Download GeoJSON" button */
.btn.btn-secondary:active,
.btn.btn-secondary:focus {
  outline-color: transparent !important;
}

/* CSS for the upload panel */
#uploadPanel {
  position: fixed;
  top: 15.625rem;
  right: 1.25rem;
  z-index: 1000;
  background-color: var(--bg-primary);
  padding: 1.25rem;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  max-width: 18.75rem;
}

/* CSS for the panel title */
#uploadPanel h2 {
  text-align: center;
  margin-bottom: 1rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

#uploadButton {
  display: block;
  margin: 0.625rem auto;
}

#fileInput {
  display: none;
}

/* CSS styles for the filter icon */
#filterIcon {
  position: fixed;
  top: 270px;
  left: 10px;
  height: 40px;
  width: 40px;
  z-index: 1001;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-base);
}

#filterIcon:hover {
  background-color: var(--color-gray-50);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

#filterIcon .fa-filter {
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

#filterIcon:hover .fa-filter {
  color: var(--color-accent);
}

/* CSS styles for the filter panel - Modernized */
.filter-panel {
  display: none;
  position: absolute;
  top: 40%;
  left: 10%;
  z-index: 1000;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  width: 360px;
  text-align: center;
  box-shadow: var(--shadow-elevated);
  backdrop-filter: blur(8px);
}

.filter-panel table {
  width: 100%;
  border-spacing: 0;
}

.filter-panel table td {
  padding: 0.75rem 0.5rem;
  vertical-align: middle;
}

.filter-panel label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--transition-fast);
}

.filter-panel label:hover {
  color: var(--text-primary);
}

.filter-panel input[type="checkbox"] {
  width: 1.125rem;
  height: 1.125rem;
  border: 2px solid var(--color-gray-300);
  border-radius: var(--radius-xs);
  appearance: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.filter-panel input[type="checkbox"]:checked {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
}

.filter-panel input[type="checkbox"]:checked::after {
  content: '✓';
  color: var(--color-white);
  font-size: 0.75rem;
  font-weight: bold;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.filter-panel button {
  margin: 8px 4px;
}

/* Style the specific td with a different background color */
.special-td {
  padding: 8px;
  border-bottom: 1px solid var(--border-light);
}

.btn-no-shadow {
  box-shadow: none !important;
}

#applyFilterBtn {
  margin: 0.75rem 0.5rem;
}

#removeFilterBtn {
  margin: 0.75rem 0.5rem;
}

#downloadGeoJsonBtn {
  margin: 0.75rem 0.5rem;
}

/* Loading indicator styles */
.loading-control {
  background: var(--bg-primary);
  padding: 0.625rem 0.9375rem;
  border-radius: 8px;
  box-shadow: var(--shadow-base);
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 3px solid var(--color-gray-200);
  border-top: 3px solid var(--color-info);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: inline-block;
}

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

  100% {
    transform: rotate(360deg);
  }
}

/* Enhanced Loading & Error States */
.map-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(249, 250, 251, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(2px);
}

.map-loading-content {
  background: var(--bg-primary);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  text-align: center;
  border: 1px solid var(--border-light);
}

.map-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--color-gray-200);
  border-top: 4px solid var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

.map-loading-text {
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.map-loading-subtext {
  color: var(--text-tertiary);
  font-size: 0.875rem;
}

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

  100% {
    transform: rotate(360deg);
  }
}

/* Enhanced Error States */
.error-message {
  z-index: 1000;
}

.error-message .alert {
  margin: 0.625rem;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow-base);
  border-left: 4px solid var(--color-error);
  background: var(--bg-primary);
}

.error-message .alert-warning {
  border-left-color: var(--color-warning);
}

.error-message strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: 0.5rem;
}

/* Filter panel loading states */
.filter-loading {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}

.filter-loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Progress indicators */
.progress-bar {
  width: 100%;
  height: 4px;
  background: var(--color-gray-200);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 1rem;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* Accessibility Enhancements */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--color-primary);
  color: var(--color-white);
  padding: 8px 16px;
  text-decoration: none;
  border-radius: 0 0 8px 8px;
  font-weight: 500;
  z-index: 1100;
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 0;
  color: var(--color-white);
  text-decoration: none;
}

/* Enhanced Focus Indicators */
.btn:focus,
button:focus,
input:focus,
select:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(190, 15, 46, 0.1);
}

/* Screen Reader Support */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Mobile navigation styles removed - now using unified navigation.css */