/* Shared by every src/parking/<id>.html page that has live occupancy
   tracking - same weekly day/hour grid already used in the main app's
   detail panel (see heatmapGridHtml() in tel-aviv-parking.html), just at
   slightly larger type since these pages are read standalone, not squeezed
   into a narrow sidebar. */
:root {
  --gray-bg: #f3f4f6;
}
@media (prefers-color-scheme: dark) {
  :root {
    --gray-bg: #262a33;
  }
}

.spots-line { font-size: 0.95rem; font-weight: 600; margin: 0 0 12px; }
.busy-summary { font-size: 0.95rem; margin: 0 0 16px; }

.heatmap-wrap { margin-top: 4px; }
.heatmap-title { font-size: 12px; color: var(--text-dim); margin-bottom: 6px; }
.heatmap-grid {
  direction: ltr;
  display: grid;
  grid-template-columns: 24px repeat(24, 1fr);
  gap: 1px;
}
.heatmap-daylabel {
  font-size: 10px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-inline-end: 3px;
}
.heatmap-cell { aspect-ratio: 1 / 1.2; border-radius: 2px; }
.heatmap-hourlabels {
  direction: ltr;
  display: grid;
  grid-template-columns: 24px repeat(24, 1fr);
  gap: 1px;
  margin-top: 2px;
}
.heatmap-hourlabels span { font-size: 9px; color: var(--text-dim); text-align: center; }
.heatmap-legend { direction: ltr; display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 11px; color: var(--text-dim); }
.heatmap-legend .bar {
  width: 90px;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(to right, #00ce43, #6bb500, #8a9600, #8e7100, #854c00, #7b2300, #96241c, #64001b);
}
@media (prefers-color-scheme: dark) {
  .heatmap-legend .bar {
    background: linear-gradient(to right, #00ec4f, #7cd500, #a9b500, #b89000, #bb6500, #c22b00, #d1291f, #af003b);
  }
}
.heatmap-legend .swatch {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--gray-bg);
  border: 1px solid var(--border);
}
/* Diagonal hatch instead of the "no data" swatch's flat gray - a closed
   hour is a known fact (from the lot's data-operating-hours attribute), not
   missing data, so it needs its own distinct look. */
.heatmap-cell.closed, .heatmap-legend .swatch.closed {
  background: repeating-linear-gradient(45deg, var(--gray-bg), var(--gray-bg) 2px, var(--border) 2px, var(--border) 4px);
}
.lot-note { font-size: 12px; color: var(--text-dim); line-height: 1.5; margin: 0; }

/* "Last 28 days" by-date grid, collapsed under the weekly map. One row per
   date, so cells are short fixed-height bars instead of the weekly grid's
   taller aspect-ratio cells (28 rows would otherwise run ~900px tall). */
.heatmap-daily-details { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 10px; }
.heatmap-daily-details > summary {
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 4px 0;
}
.heatmap-daily-body { margin-top: 8px; }
.heatmap-grid.daily, .heatmap-hourlabels.daily { grid-template-columns: 52px repeat(24, 1fr); }
.heatmap-grid.daily .heatmap-cell { aspect-ratio: auto; height: 12px; }
.heatmap-grid.daily .heatmap-daylabel { white-space: nowrap; }
