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

@keyframes pulse {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }

  100% {
    opacity: 1;
  }
}

.detailed-stage-info {
  font-style: italic;
  color: #adb5bd;
  font-size: 0.9em;
  margin-top: 5px;
}

.stats-info {
  font-size: 0.9em;
}

.stats-info small {
  color: #ced4da;
}

.stats-info .text-info {
  color: #3db9d5 !important;
}

.stats-info .text-success {
  color: #4caf50 !important;
}

.stats-info .text-primary {
  color: #59a6ff !important;
}

.map-info-panel {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1000;
  background: rgb(40 40 40 / 90%);
  color: white;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 12px;
  pointer-events: none;
  box-shadow: 0 2px 10px rgb(0 0 0 / 40%);
  max-width: 250px;
  border-left: 3px solid #007bff;
  display: none;
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
}

.map-info-panel strong {
  color: #fff;
}

.map-info-panel .text-success {
  color: #4caf50 !important;
}

.map-info-panel .text-danger {
  color: #ff5252 !important;
}

.map-info-panel .text-info {
  color: #17a2b8 !important;
}

.map-info-panel .text-warning {
  color: #ffc107 !important;
}

.map-info-panel .text-muted {
  color: #adb5bd !important;
}

.map-info-panel hr.panel-divider {
  border-top: 1px solid rgb(255 255 255 / 20%);
  margin: 5px 0;
}

.coverage-summary-control {
  background: rgb(40 40 40 / 90%);
  color: white;
  padding: 10px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgb(0 0 0 / 30%);
  border: 1px solid rgb(255 255 255 / 10%) !important;
  min-width: 150px;
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
}

.summary-title {
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 5px;
  color: #ccc;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.summary-percentage {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 5px;
  color: #fff;
  transition: all 0.3s ease;
}

.summary-progress {
  margin-bottom: 8px;
}

.summary-details {
  font-size: 11px;
  color: #ccc;
  text-align: right;
}

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

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-5px);
  }

  75% {
    transform: translateX(5px);
  }
}

/* Enhanced hover states */
.location-name-link {
  transition: all 0.2s ease;
}

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

/* Smooth transitions for all interactive elements */
.btn,
.form-control,
.form-select,
.progress-bar {
  transition: all 0.2s ease;
}

/* Enhanced focus states */
.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible {
  outline: 2px solid #59a6ff;
  outline-offset: 2px;
}

/* Loading pulse animation */
.loading-pulse {
  animation: loadingPulse 1.5s ease-in-out infinite;
}

@keyframes loadingPulse {
  0%,
  100% {
    opacity: 0.6;
  }

  50% {
    opacity: 1;
  }
}

/* Skeleton loading enhancement */
.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;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* CSS for the efficient streets panel */
.efficient-streets-panel-overlay {
  position: absolute;
  top: 80px;
  right: 10px;
  width: 350px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 2px 10px rgb(0 0 0 / 30%);
}

.efficient-street-item {
  background: rgb(60 60 60 / 80%);
  border-radius: 4px;
  transition: background 0.2s;
}

.efficient-street-item:hover {
  background: rgb(80 80 80 / 90%);
}

.efficient-street-marker-mapbox {
  cursor: pointer;
  transition: transform 0.2s;
}

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

.efficiency-metrics {
  margin: 8px 0;
}

.efficiency-metrics div {
  margin: 4px 0;
}

/* Drawing Interface Styles */
.drawing-interface {
  margin-top: 1rem;
}

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

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

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

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

/* Custom draw controls styling */
.mapboxgl-ctrl-draw {
  background: rgb(40 40 40 / 90%) !important;
  border-radius: 4px !important;
  box-shadow: 0 2px 8px rgb(0 0 0 / 30%) !important;
}

.mapboxgl-ctrl-draw button {
  background-color: transparent !important;
  border: none !important;
  color: #fff !important;
  font-size: 16px !important;
  padding: 8px !important;
  margin: 2px !important;
  border-radius: 4px !important;
  transition: all 0.2s ease !important;
}

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

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

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

/* Drawing validation styling */
#drawing-validation-result {
  animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Custom area form styling */
#custom-area-name {
  font-weight: 500;
}

#custom-area-name:focus {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.2rem rgb(var(--bs-primary-rgb), 0.25);
}

/* Drawing instructions styling */
.alert-info {
  background-color: rgb(13 202 240 / 10%);
  border-color: rgb(13 202 240 / 20%);
  color: #0dcaf0;
}

/* 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: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgb(0 0 0 / 10%);
}

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

.drawing-info {
  font-size: 0.875rem;
  color: var(--bs-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 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(--bs-info);
}
