.activity-indicator.pulsing {
  animation: pulse 1.5s infinite;
}

/* Note: pulse animation moved to animations.css */

.detailed-stage-info {
  font-style: italic;
  color: var(--text-tertiary);
  font-size: var(--font-size-sm);
  margin-top: var(--space-2);
}

.stats-info {
  font-size: var(--font-size-sm);
}

.stats-info small {
  color: var(--text-secondary);
}

.stats-info .text-info {
  color: var(--info) !important;
}

.stats-info .text-success {
  color: var(--success) !important;
}

.stats-info .text-primary {
  color: var(--primary) !important;
}

.map-info-panel {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  z-index: var(--z-dropdown);
  background: var(--surface-glass);
  color: var(--text-on-dark);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  pointer-events: none;
  box-shadow: var(--shadow-lg);
  max-width: 250px;
  border-left: 3px solid var(--info);
  display: none;
  backdrop-filter: blur(10px);
  transition: var(--transition-fast);
}

.map-info-panel strong {
  color: var(--text-on-dark);
}

.map-info-panel .text-success {
  color: var(--success) !important;
}

.map-info-panel .text-danger {
  color: var(--danger) !important;
}

.map-info-panel .text-info {
  color: var(--info) !important;
}

.map-info-panel .text-warning {
  color: var(--warning) !important;
}

.map-info-panel .text-muted {
  color: var(--text-tertiary) !important;
}

.map-info-panel hr.panel-divider {
  border-top: 1px solid var(--border-color);
  margin: var(--space-2) 0;
}

.coverage-summary-control {
  background: var(--surface-glass);
  color: var(--text-on-dark);
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color) !important;
  min-width: 150px;
  backdrop-filter: blur(10px);
  transition: var(--transition-fast);
}

.summary-title {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-2);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.summary-percentage {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-2);
  color: var(--text-on-dark);
  transition: var(--transition-normal);
}

.summary-progress {
  margin-bottom: var(--space-2);
}

.summary-details {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  text-align: right;
}

/* Enhanced animations - keyframes moved to animations.css */
.fade-in-up {
  animation: fadeInUp 0.3s ease forwards;
  opacity: 0;
}

.shake-animation {
  animation: shake 0.3s ease;
}

/* Enhanced hover states */
.location-name-link {
  transition: var(--transition-fast);
}

.location-name-link:hover {
  transform: translateX(2px);
}

/* Smooth transitions for all interactive elements */
.btn,
.form-control,
.form-select,
.progress-bar {
  transition: var(--transition-fast);
}

/* Enhanced focus states */
.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Loading pulse animation - keyframe moved to animations.css */
.loading-pulse {
  animation: loadingPulse 1.5s ease-in-out infinite;
}

/* Skeleton loading enhancement - keyframe moved to animations.css */
.skeleton-shimmer {
  background: linear-gradient(
    90deg,
    rgb(255 255 255 / 5%) 0%,
    rgb(255 255 255 / 10%) 50%,
    rgb(255 255 255 / 5%) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

/* CSS for the efficient streets panel */
.efficient-streets-panel-overlay {
  position: absolute;
  top: 80px;
  right: var(--space-3);
  width: 350px;
  max-height: 400px;
  overflow-y: auto;
  z-index: var(--z-dropdown);
  box-shadow: var(--shadow-lg);
}

.efficient-street-item {
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.efficient-street-item:hover {
  background: var(--surface-3);
}

.efficient-street-marker-mapbox {
  cursor: pointer;
  transition: var(--transition-fast);
}

.efficient-street-marker-mapbox:hover {
  transform: scale(1.1);
}

.efficiency-metrics {
  margin: var(--space-2) 0;
}

.efficiency-metrics div {
  margin: var(--space-1) 0;
}

/* Drawing Interface Styles */
.drawing-interface {
  margin-top: var(--space-4);
}

#drawing-map {
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.mapboxgl-ctrl-draw-btn {
  background-color: var(--primary) !important;
  color: var(--text-on-primary) !important;
}

.mapboxgl-ctrl-draw-btn:hover {
  background-color: var(--primary-light) !important;
}

.mapboxgl-ctrl-draw-btn.active {
  background-color: var(--success) !important;
}

/* Custom draw controls styling */
.mapboxgl-ctrl-draw {
  background: var(--surface-glass) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: var(--shadow-md) !important;
}

.mapboxgl-ctrl-draw button {
  background-color: transparent !important;
  border: none !important;
  color: var(--text-on-dark) !important;
  font-size: var(--font-size-md) !important;
  padding: var(--space-2) !important;
  margin: var(--space-1) !important;
  border-radius: var(--radius-sm) !important;
  transition: var(--transition-fast) !important;
}

.mapboxgl-ctrl-draw button:hover {
  background-color: rgb(255 255 255 / 10%) !important;
}

.mapboxgl-ctrl-draw button.active {
  background-color: var(--primary) !important;
  color: var(--text-on-primary) !important;
}

/* Area type selection */
.btn-check:checked + .btn-outline-primary {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--text-on-primary);
}

/* Drawing validation styling - keyframe moved to animations.css */
#drawing-validation-result {
  animation: slideInUp 0.3s ease-out;
}

/* Custom area form styling */
#custom-area-name {
  font-weight: var(--font-weight-medium);
}

#custom-area-name:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgb(var(--primary-rgb) / 25%);
}

/* Drawing instructions styling */
.alert-info {
  background-color: rgb(var(--info-rgb) / 12%);
  border-color: rgb(var(--info-rgb) / 24%);
  color: var(--info);
}

/* Modal size adjustment for drawing interface */
.modal-lg {
  max-width: 900px;
}

/* Ensure drawing map container has proper styling */
.drawing-map-container {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

/* Drawing tools styling */
.drawing-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-2) 0;
  border-top: 1px solid var(--border-color);
  margin-top: var(--space-2);
}

.drawing-info {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Responsive adjustments */
@media (width <= 768px) {
  .modal-lg {
    max-width: 95vw;
    margin: 1rem auto;
  }

  #drawing-map {
    height: 300px;
  }

  .drawing-tools {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }

  .drawing-info {
    justify-content: center;
  }
}

/* Smooth update animation for dashboard stats */
.value-updated {
  transition:
    transform 0.4s ease,
    color 0.4s ease;
  transform: scale(1.15);
  color: var(--info);
}
