/* Freeway Direction Pressure Heatmap v1.8.1
   Ordering upgrade: stable corridor order + subtle corridor separators. */

.direction-heatmap-section { margin-top: 2rem; }
.direction-heatmap-intro { max-width: 78rem; }
.direction-heatmap-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: .75rem 1rem;
  margin: 1rem 0;
}
.direction-heatmap-toolbar label {
  display: grid;
  gap: .3rem;
  font-size: .86rem;
}
.direction-heatmap-toolbar select {
  min-height: 40px;
  padding: .45rem .7rem;
  border: 1px solid rgba(127,127,127,.35);
  border-radius: 8px;
  background: inherit;
  color: inherit;
}
.direction-heatmap-status {
  margin-left: auto;
  text-align: right;
}
.direction-heatmap-wrap {
  overflow-x: auto;
  border: 1px solid rgba(127,127,127,.25);
  border-radius: 14px;
  background: rgba(127,127,127,.025);
}
.direction-heatmap-grid {
  display: grid;
  grid-template-columns: 230px repeat(72, 12px);
  gap: 2px;
  width: max-content;
  min-width: 100%;
  padding: .75rem;
  align-items: center;
}
.direction-heatmap-corner,
.direction-heatmap-time,
.direction-heatmap-row-label {
  color: inherit;
}
.direction-heatmap-corner {
  position: sticky;
  left: 0;
  z-index: 5;
  background: var(--background, #fff);
  font-weight: 700;
  padding-right: .5rem;
}
.direction-heatmap-time {
  height: 36px;
  position: relative;
  font-size: .72rem;
  color: #697386;
}
.direction-heatmap-time span {
  position: absolute;
  transform: rotate(-55deg);
  transform-origin: left bottom;
  white-space: nowrap;
  bottom: 1px;
  left: 4px;
}
.direction-heatmap-row-label {
  position: sticky;
  left: 0;
  z-index: 4;
  min-height: 20px;
  display: flex;
  align-items: center;
  background: var(--background, #fff);
  padding-right: .6rem;
  font-size: .82rem;
  line-height: 1.15;
  font-weight: 650;
}
.direction-heatmap-cell {
  width: 12px;
  height: 20px;
  border: 0;
  border-radius: 2px;
  padding: 0;
  cursor: pointer;
  outline-offset: 2px;
}
.direction-heatmap-row-label.group-start,
.direction-heatmap-cell.group-start {
  margin-top: 6px;
  box-shadow: 0 -4px 0 rgba(127,127,127,.12);
}
.direction-heatmap-cell.governed {
  box-shadow: inset 0 0 0 1px rgba(17,24,39,.28);
}
.direction-heatmap-cell.group-start.governed {
  box-shadow: 0 -4px 0 rgba(127,127,127,.12), inset 0 0 0 1px rgba(17,24,39,.28);
}
.direction-heatmap-cell.missing {
  background: repeating-linear-gradient(135deg, rgba(127,127,127,.18) 0 2px, transparent 2px 4px);
}
.direction-heatmap-cell.bin0 { background: #edf3f0; }
.direction-heatmap-cell.bin1 { background: #cae2d5; }
.direction-heatmap-cell.bin2 { background: #f0e4a6; }
.direction-heatmap-cell.bin3 { background: #efbd75; }
.direction-heatmap-cell.bin4 { background: #e4836d; }
.direction-heatmap-cell.bin5 { background: #bd3f46; }
.direction-heatmap-cell.selected { outline: 2px solid #172554; }
.direction-heatmap-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  align-items: center;
  margin-top: .75rem;
  font-size: .82rem;
}
.direction-heatmap-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.direction-heatmap-legend i {
  width: 18px;
  height: 12px;
  border-radius: 2px;
  display: inline-block;
}
.direction-heatmap-detail {
  margin-top: .9rem;
  padding: .85rem 1rem;
  border: 1px solid rgba(127,127,127,.25);
  border-radius: 10px;
  min-height: 3.2rem;
}
.direction-heatmap-detail strong { display: block; margin-bottom: .2rem; }
.direction-heatmap-error {
  margin: .8rem 0;
  padding: .8rem 1rem;
  border: 1px solid rgba(180,80,80,.45);
  border-radius: 10px;
}
@media (max-width: 900px) {
  .direction-heatmap-status { margin-left: 0; text-align: left; width: 100%; }
}
