/* Vehicle Preview Panel Styles */
.vehicle-preview-panel {
  position: fixed;
  left: 20px;
  top: 100px;
  width: 380px;
  max-height: calc(100vh - 120px);
  background: white;
  border: 2px solid #00555F;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.vehicle-preview-header {
  padding: 16px 20px;
  border-bottom: 2px solid #00555F;
  background: #00555F;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.vehicle-preview-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: white;
}

.vehicle-preview-close {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.2s;
}

.vehicle-preview-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.vehicle-preview-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 15px;
  overflow-y: auto;
  flex: 1;
}

/* Scrollbar styling */
.vehicle-preview-container::-webkit-scrollbar {
  height: 8px;
}

.vehicle-preview-container::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.vehicle-preview-container::-webkit-scrollbar-thumb {
  background: #00555F;
  border-radius: 4px;
}

.vehicle-preview-container::-webkit-scrollbar-thumb:hover {
  background: #003d45;
}

/* Vehicle Container */
.vehicle-container {
  background: #f8f9fa;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.vehicle-container:hover {
  border-color: #00555F;
  box-shadow: 0 2px 8px rgba(0, 85, 95, 0.2);
  background: white;
}


.vehicle-container.active {
  border-color: #00555F;
  background: #e8f4f5;
}

/* Video Player Wrapper */
.vehicle-video-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.vehicle-video {
  width: 120px;
  height: 80px;
  position: relative;
  background: #000;
  border-radius: 6px 6px 0 0;
  overflow: hidden;
}

.vehicle-video-player {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 6px;
  z-index: 2;
  object-fit: cover;
}

/* Video Placeholder Image */
.video-placeholder-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  display: block;
  pointer-events: none;
  border-radius: 6px;
}

.video-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #2c3e50;
  color: white;
}

.video-placeholder i {
  font-size: 32px;
  margin-bottom: 8px;
  opacity: 0.7;
}

.video-placeholder p {
  margin: 0 0 4px 0;
  font-size: 14px;
  font-weight: 600;
}

.video-placeholder small {
  font-size: 11px;
  opacity: 0.7;
}

/* Vehicle Info */
.vehicle-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vehicle-info-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.vehicle-id {
  font-size: 14px;
  font-weight: 700;
  color: #00555F;
}

.vehicle-status {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  background: #4caf50;
  color: white;
  font-weight: 600;
}

.vehicle-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  gap: 8px;
}

.vehicle-label {
  font-weight: 600;
  color: #666;
  min-width: 60px;
}

.vehicle-value {
  color: #00555F;
  font-weight: 500;
  text-align: right;
  flex: 1;
}

/* Vehicle Actions */
.vehicle-actions {
  display: flex;
  gap: 4px;
  justify-content: flex-start;
}

.vehicle-action-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  background: white;
  color: #00555F;
  border: 2px solid #00555F;
  border-radius: 6px;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.vehicle-action-btn:hover {
  background: #00555F;
  color: white;
  transform: scale(1.05);
  box-shadow: 0 2px 6px rgba(0, 85, 95, 0.3);
}

.vehicle-action-btn.edit-btn {
  background: #00555F;
  color: white;
}

.vehicle-action-btn.edit-btn:hover {
  background: #003d45;
  box-shadow: 0 2px 6px rgba(0, 85, 95, 0.4);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .vehicle-preview-panel {
    width: 340px;
    top: 100px;
    max-height: calc(100vh - 120px);
  }
}

@media (max-width: 900px) {
  .vehicle-preview-panel {
    width: 320px;
  }
}

@media (max-width: 768px) {
  .vehicle-preview-panel {
    left: 10px;
    top: 100px;
    width: calc(100% - 20px);
    max-width: 380px;
    max-height: calc(100vh - 120px);
  }

  .vehicle-video {
    width: 100px;
    height: 65px;
  }

  .vehicle-info-row {
    font-size: 10px;
  }
}

@media (max-width: 600px) {
  .vehicle-preview-panel {
    top: 100px;
    max-height: calc(100vh - 120px);
  }
}

@media (max-width: 480px) {
  .vehicle-preview-panel {
    width: calc(100% - 20px);
    max-width: none;
  }
  
  .vehicle-container {
    flex-direction: column;
    align-items: stretch;
  }
  
  .vehicle-video-wrapper {
    width: 100%;
  }
  
  .vehicle-video {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
  }
  
  .vehicle-actions {
    justify-content: center;
  }
}
