html,body,#map{height:100%;margin:0}

/* legend */
.legend{
    position:absolute;
    bottom:20px; left:10px;
    background:#fff;
    padding:6px 10px;
    font:14px/1.3 sans-serif;
    border-radius:4px;
    box-shadow:0 1px 4px rgba(0,0,0,.3);
    font-family: "Inconsolata", monospace;
}

.legend div{
    display:flex;align-items:center;margin-bottom:4px
}
.legend div:last-child{
    margin-bottom:0
}
.swatch {
    width:12px;height:12px;border-radius:50%;margin-right:6px
}
/* use the same colors you set in tickets.js */
.swatch.bike {background:#ff5500}   /* BIKE  */
.swatch.ebike{background:#0077ff}   /* EBIKE */

#controls-div {
    position:absolute; top:6px; left:12px;
    z-index:3;
}

.control-btn {
    display: block;
    padding:6px 12px;
    font:20px sans-serif; border:none; border-radius:4px;
    background:#fff; 
    box-shadow:0 1px 4px rgba(0,0,0,.3);
    font-family: "Inconsolata", monospace;
    margin: 6px;
}

.control-btn:hover {
    cursor: pointer;
    box-shadow:0 1px 4px rgba(0,0,0,.8);    

}

/* Drawer */
#filter-drawer{
    font-family: "Inconsolata", monospace;
    position:fixed; inset:0 0 0 auto;          /* right‑hand off‑canvas */
    width:80vw; max-width:320px;               /* comfortable on phones */
    background:#fafaf8e0; box-shadow:-2px 0 8px rgba(0,0,0,.3);
    transform:translateX(100%); transition:.1s transform;
    display:flex; flex-direction:column; gap:12px;
    padding:16px 20px; z-index:4;
}

body.show-filters #filter-drawer{transform:none}

#filter-drawer header{
    display:flex; justify-content:space-between; align-items:center;
    margin-bottom:8px;
}
#filter-drawer h2{margin:0; font:18px/1.2 monospace}
#close-drawer{background:none;border:none;font-size:20px}
#filter-panel label{display:flex;align-items:center;gap:6px;margin:4px 0}

.filter-group[open] summary::after {
    transform: rotate(90deg);
}

.filter-body {
    padding: 6px 8px 8px;
}

.filter-group summary {
    padding: 8px;
}

.toggle-all {
    background-color: #fff;
    border: 1px solid black;
    margin-bottom: 6px;
    font-family: "Inconsolata", monospace;
}

.filter-fieldset {
    max-height: 400px;
    overflow-y: scroll;
}

.maplibregl-popup-content {
    background : #f2f5f1cd;
    color      : #273e2e;
    padding    : 5px 8px;
    border-radius: 3px;
    font-size  : 11px;
    line-height: 1.0;
    box-shadow : 0 0 4px rgba(0,0,0,.35);
  }
  
  .maplibregl-popup {
    padding-bottom: 0;
  }
  
  .maplibregl-popup-tip {
    border-width: 1px;
  }


  .hour-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.hour-item {
  display: flex;
  align-items: center;
  font-size: 0.9em;
  white-space: nowrap;
}

.hour-item input[type="checkbox"] {
  margin-right: 6px;
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.month-item {
  display: flex;
  align-items: center;
  font-size: 0.9em;
}

.month-item input[type="checkbox"] {
  margin-right: 6px;
}

.pinkslip-item {
  display: flex;
  align-items: center;
  margin: 8px 0;
  font-size: 0.9em;
}

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

.legend {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: rgba(255, 255, 255, 0.9);
  padding: 12px;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  font-size: 14px;
}

.legend div {
  display: flex;
  align-items: center;
  margin: 4px 0;
}

.swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  margin-right: 8px;
  display: inline-block;
}

.swatch.orange {
  background-color: #ff5500;
}

.swatch.blue {
  background-color: #0077ff;
}

.swatch.pink {
  background-color: #ff1493;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hour-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .month-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .hour-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .month-grid {
    grid-template-columns: 1fr;
  }
}  