/* Reset and base styles */
body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', Arial, sans-serif;
  background-color: #f8f9fa;
}

/* Layout */
#wrapper {
  display: flex;
  height: 100vh;
}

#sidebar-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 300px;
  height: 100%;
  background-color: #ffffff;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 1000;
  padding: 20px;
  box-shadow: 2px 0 5px rgba(0,0,0,0.1);
  overflow-y: auto;
}

#wrapper.sidebar-open #sidebar-wrapper {
  transform: translateX(0);
}

#page-content-wrapper {
  flex: 1;
  transition: margin-left 0.3s ease;
}

#map {
  height: 100%;
  width: 100%;
}

/* Logo */
#logo {
  margin-bottom: 20px;
  text-align: center;
}

#logo img {
  width: 150px;
  height: auto;
}

/* Typography */
h2 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: #333;
}

/* Filter section */
.filter {
  margin-bottom: 20px;
}

#filter-input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
}

#filter-input:focus {
  outline: none;
  border-color: #1e90ff;
}

.checkboxes label {
  display: block;
  margin: 5px 0;
}

.checkboxes input[type="checkbox"] {
  margin-right: 8px;
}

/* Buttons */
button {
  padding: 10px;
  background-color: #1e90ff;
  color: #0f0f0f;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s;
}

button:hover {
  background-color: #007bff;
}

/* Legend and Date Range */
#legend, #date-range {
  margin: 20px 0;
  padding: 15px;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
}

#legend h4 {
  margin-bottom: 10px;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 5px;
}

.legend-dot.green { background-color: green; }
.legend-dot.yellow { background-color: yellow; }
.legend-dot.orange { background-color: orange; }
.legend-dot.red { background-color: red; }

#date-range label {
  display: block;
  margin: 10px 0;
}

#date-range input[type="datetime-local"] {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
}

#date-range input[type="datetime-local"]:focus {
  outline: none;
  border-color: #1e90ff;
}

/* Vehicle List */
#vehicle-list {
  list-style: none;
  padding: 0;
}

#vehicle-list li {
  padding: 10px;
  border-bottom: 1px solid #ddd;
  cursor: pointer;
  transition: background-color 0.3s;
  display: flex;
  align-items: center;
}

#vehicle-list li:hover {
  background-color: #e0e0e0;
}

#vehicle-list input[type="checkbox"] {
  margin-right: 8px;
}

/* Phase 1: Connectivity Status Dots */
.connectivity-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 8px;
  border: 2px solid #fff;
  box-shadow: 0 0 3px rgba(0,0,0,0.3);
}

.connectivity-dot.green {
  background-color: #28a745; /* Online - green dot */
}

.connectivity-dot.red {
  background-color: #dc3545; /* Offline > 12 hours - red dot */
}

.connectivity-dot.grey {
  background-color: #6c757d; /* Offline < 12 hours - grey dot */
}

.vehicle-info {
  flex: 1;
  font-size: 0.9rem;
  line-height: 1.3;
}

/* Menu Toggle */
#menu-toggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1001;
}

/* Desktop styles */
@media (min-width: 769px) {
  #sidebar-wrapper {
    transform: translateX(0);
  }
  #wrapper.sidebar-open #page-content-wrapper {
    margin-left: 300px;
  }
  #wrapper.sidebar-closed #page-content-wrapper {
    margin-left: 0;
  }
  #wrapper.sidebar-closed #sidebar-wrapper {
    transform: translateX(-100%);
  }
}

/* Mobile styles */
@media (max-width: 768px) {
  #sidebar-wrapper {
    width: 80vw;
  }
  h2 {
    font-size: 1.2rem;
  }
  button, input {
    font-size: 0.9rem;
  }
  #vehicle-list li {
    padding: 8px;
  }
  #page-content-wrapper {
    margin-left: 0;
  }
}
