/* Vehicle Path Popup Styles */
.vehicle-path-popup {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.vehicle-path-content {
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 1200px;
  height: 90%;
  max-height: 800px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Header */
.vehicle-path-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 2px solid #00555F;
  background: #f8f9fa;
}

.vehicle-path-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #00555F;
}

.close-btn {
  background: none;
  border: none;
  font-size: 32px;
  color: #666;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.close-btn:hover {
  background: #e0e0e0;
  color: #00555F;
}

/* Map Container */
.vehicle-path-map {
  flex: 1;
  min-height: 400px;
  background: #e8e8e8;
  position: relative;
}

/* Toolbar */
.vehicle-path-toolbar {
  display: flex;
  gap: 10px;
  padding: 16px 24px;
  background: white;
  border-top: 1px solid #e0e0e0;
  flex-wrap: wrap;
}

.vehicle-path-toolbar button {
  padding: 10px 20px;
  background: white;
  color: #00555F;
  border: 2px solid #00555F;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.vehicle-path-toolbar button:hover {
  background: #00555F;
  color: white;
}

.vehicle-path-toolbar button:active {
  transform: scale(0.98);
}

.vehicle-path-toolbar button#savePathBtn {
  background: #4caf50;
  border-color: #4caf50;
  color: white;
}

.vehicle-path-toolbar button#savePathBtn:hover {
  background: #45a049;
  border-color: #45a049;
}

.vehicle-path-toolbar button#deletePathBtn {
  background: #f44336;
  border-color: #f44336;
  color: white;
}

.vehicle-path-toolbar button#deletePathBtn:hover {
  background: #da190b;
  border-color: #da190b;
}

.vehicle-path-toolbar button#cancelPathBtn {
  background: #9e9e9e;
  border-color: #9e9e9e;
  color: white;
}

.vehicle-path-toolbar button#cancelPathBtn:hover {
  background: #757575;
  border-color: #757575;
}

/* Animation Controls */
.vehicle-path-animation {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 16px 24px;
  background: #f8f9fa;
  border-top: 1px solid #e0e0e0;
}

.vehicle-path-animation button {
  padding: 10px 24px;
  background: #00555F;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 80px;
}

.vehicle-path-animation button:hover {
  background: #003d45;
}

.vehicle-path-animation button:active {
  transform: scale(0.98);
}

.vehicle-path-animation input[type="range"] {
  flex: 1;
  max-width: 300px;
  height: 6px;
  border-radius: 3px;
  background: #e0e0e0;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.vehicle-path-animation input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #00555F;
  cursor: pointer;
  transition: all 0.2s;
}

.vehicle-path-animation input[type="range"]::-webkit-slider-thumb:hover {
  background: #003d45;
  transform: scale(1.1);
}

.vehicle-path-animation input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #00555F;
  cursor: pointer;
  border: none;
}

.vehicle-path-animation span {
  font-size: 14px;
  color: #666;
  white-space: nowrap;
}

.vehicle-path-animation span #speedValue {
  font-weight: 600;
  color: #00555F;
}

/* Path Legend */
.vehicle-path-legend {
  display: flex;
  gap: 24px;
  padding: 12px 24px;
  background: white;
  border-top: 1px solid #e0e0e0;
  font-size: 13px;
}

.vehicle-path-legend > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vehicle-path-legend span[class^="legend-"] {
  display: inline-block;
  width: 32px;
  height: 4px;
  border-radius: 2px;
}

.legend-historical {
  background: #2196f3;
}

.legend-planned {
  background: #4caf50;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .vehicle-path-content {
    width: 95%;
    height: 95%;
  }
  
  .vehicle-path-toolbar {
    justify-content: center;
  }
  
  .vehicle-path-toolbar button {
    flex: 1;
    min-width: 100px;
  }
}

@media (max-width: 768px) {
  .vehicle-path-popup {
    padding: 10px;
  }
  
  .vehicle-path-content {
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
  }
  
  .vehicle-path-header {
    padding: 15px;
  }
  
  .vehicle-path-header h3 {
    font-size: 18px;
  }
  
  .vehicle-path-toolbar {
    padding: 12px;
    gap: 8px;
    flex-wrap: wrap;
  }
  
  .vehicle-path-toolbar button {
    padding: 10px 14px;
    font-size: 13px;
    flex: 1 1 calc(50% - 4px);
    min-width: 100px;
    min-height: 44px;
  }
  
  .vehicle-path-animation {
    flex-wrap: wrap;
    padding: 12px;
    gap: 10px;
  }
  
  .vehicle-path-animation button {
    min-height: 44px;
    padding: 10px 16px;
  }
  
  .vehicle-path-animation input[type="range"] {
    width: 100%;
    max-width: none;
    min-height: 44px;
  }
  
  .vehicle-path-legend {
    flex-direction: column;
    gap: 8px;
    padding: 10px;
  }
}

@media (max-width: 480px) {
  .vehicle-path-toolbar button {
    flex: 1 1 100%;
    min-width: 100%;
    margin-bottom: 4px;
  }
  
  .vehicle-path-animation {
    flex-direction: column;
  }
  
  .vehicle-path-animation button,
  .vehicle-path-animation input[type="range"],
  .vehicle-path-animation span {
    width: 100%;
  }
}

/* Utility Classes */
.hidden {
  display: none !important;
}

.disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* Animations */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(76, 175, 80, 0);
  }
}
