.map-summary-footer {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2px 12px;
  min-width: 0;
  padding: 0 4px;
}

.map-route-summary .metric small[hidden] { display: none; }

.full-trip-calculations-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  max-width: 100%;
  margin: 0;
  padding: 3px 2px;
  color: #335f58;
  font-size: 10px;
  line-height: 1.4;
  cursor: pointer;
  user-select: none;
}

.full-trip-calculations-toggle input {
  flex: none;
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #0d766c;
  cursor: pointer;
}

.full-trip-calculations-toggle input:focus-visible {
  outline: 2px solid #0d766c;
  outline-offset: 3px;
}

.map-summary-footer .map-route-coverage {
  flex: 1 1 160px;
  min-width: 0;
  margin: 0;
  padding: 2px 0;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .map-summary-footer { gap: 0 8px; padding: 0 2px; }
  .full-trip-calculations-toggle { min-height: 32px; font-size: 9px; }
  .map-summary-footer .map-route-coverage { flex-basis: 130px; font-size: 8px; }
}

.map-area { container-type: inline-size; }

.map-toolbar {
  position: absolute;
  z-index: 600;
  top: 20px;
  left: 20px;
  right: 40px;
  display: grid;
  grid-template-columns: 94px minmax(0, 620px) minmax(200px, 290px);
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  pointer-events: none;
}

.sidebar-collapsed .map-toolbar { right: 76px; }

.map-toolbar .map-location-button,
.map-toolbar > .map-route-summary,
.workspace .map-toolbar > .map-search {
  position: relative;
  top: auto;
  bottom: auto;
  left: auto;
  right: auto;
  width: 100%;
  min-width: 0;
  margin: 0;
  transform: none;
  pointer-events: auto;
}

.map-toolbar .map-location-button { justify-content: center; padding: 0 8px; }
.map-toolbar > .map-route-summary { z-index: 1; }
.map-toolbar > .map-search { z-index: 2; }

@container (max-width: 1000px) {
  .map-toolbar { grid-template-columns: 94px minmax(0, 1fr) 190px; gap: 10px; }
}

@container (max-width: 820px) {
  .map-toolbar { grid-template-columns: 94px minmax(0, 1fr); }
  .map-toolbar > .map-route-summary { grid-column: 1 / -1; grid-row: 2; max-width: 620px; justify-self: center; }
  .workspace .map-toolbar > .map-search { grid-column: 2; grid-row: 1; max-width: 290px; justify-self: end; }
}

@media (max-width: 760px) {
  .workspace .map-toolbar { top: 11px; left: 11px; right: 11px; }
  .workspace .sidebar-toggle { top: 11px; }
  .workspace .map-toolbar > .map-search { width: calc(100% - 56px); justify-self: start; }
}
