/* Enhanced styles for truck details display */
.truck-item {
    background: white;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    border-left: 4px solid #0073aa;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
  }
  
  .truck-item.loading {
    opacity: 0.6;
    pointer-events: none;
  }
  
  .truck-item.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
  }
  
  .truck-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  }
  
  .truck-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
  }
  
  .truck-header h4 {
    margin: 0;
    color: #0073aa;
    font-size: 1.1em;
  }
  
  .truck-number {
    font-weight: normal;
    color: #666;
    font-size: 0.9em;
  }
  
  .truck-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
  }
  
  .truck-status.open {
    background: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #81c784;
  }
  
  .truck-status.closed {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #e57373;
  }
  
  .truck-details p {
    margin: 5px 0;
    color: #555;
    font-size: 0.9em;
  }
  
  .truck-details strong {
    color: #333;
    font-weight: 600;
  }
  
  .truck-details small {
    color: #888;
    font-style: italic;
  }
  
  /* Info window styles */
  .truck-info-window {
    max-width: 300px;
    font-family: Arial, sans-serif;
  }
  
  .truck-info-window h4 {
    margin: 0 0 10px 0;
    color: #0073aa;
    font-size: 1.1em;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
  }
  
  .truck-info-window p {
    margin: 5px 0;
    font-size: 0.9em;
    line-height: 1.4;
  }
  
  .truck-info-window strong {
    color: #333;
  }
  
  /* Responsive design for truck list */
  @media (max-width: 768px) {
    .truck-header {
      flex-direction: column;
      align-items: flex-start;
      gap: 8px;
    }
  
    .truck-status {
      align-self: flex-end;
    }
  
    .truck-details p {
      font-size: 0.85em;
    }
  
    #truck-map {
      min-height: 300px;
      margin-bottom: 15px;
    }
  }
  
  /* Enhanced map container with better responsive design */
  #truck-map {
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 20px;
    min-height: 400px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
  
  /* Improved truck list container */
  #truck-list {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  }
  
  #truck-list h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 1.3em;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
  }
  
  /* Add empty state styling */
  .no-trucks-message {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
  }
  
  .no-trucks-message::before {
    content: "🚛";
    display: block;
    font-size: 3em;
    margin-bottom: 10px;
  }
  
  @keyframes spin {
    0% {
      transform: rotate(0deg);
    }
    100% {
      transform: rotate(360deg);
    }
  }
  
  /* Filter buttons for truck list */
  .truck-filters {
    margin-bottom: 15px;
    text-align: center;
  }
  
  .filter-button {
    padding: 8px 16px;
    margin: 0 5px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
  }
  
  .filter-button:hover,
  .filter-button.active {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
  }

  /* Custom truck marker styles */
  .truck-marker {
    position: relative;
    display: inline-block;
  }

  .truck-marker::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    z-index: -1;
  }

  /* Enhanced info window styles for truck markers */
  .truck-info-window {
    max-width: 300px;
    font-family: Arial, sans-serif;
    line-height: 1.4;
  }

  .truck-info-window h4 {
    margin: 0 0 10px 0;
    color: #0073aa;
    font-size: 1.1em;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 5px;
  }

  .truck-info-window p {
    margin: 8px 0;
    font-size: 0.9em;
    color: #333;
  }

  .truck-info-window strong {
    color: #0073aa;
    font-weight: 600;
  }

  .truck-info-window small {
    color: #666;
    font-style: italic;
  }

  /* Status indicator in info window */
  .truck-info-window .status-indicator {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
  }

  .truck-info-window .status-indicator.open {
    background: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #81c784;
  }

  .truck-info-window .status-indicator.closed {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #e57373;
  }
  