/* Load after the map's existing styles. */
.phone-filter-options > summary { display: none; }

/* Only the deleted list scrolls; its title and Close button stay in view. */
.editor-dialog.deleted-orders-dialog { overflow: hidden; }
.deleted-orders-dialog > form {
  display: flex;
  flex-direction: column;
  max-height: calc(88dvh - 48px);
  min-height: 0;
}
.deleted-orders-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #dce4df;
}
.deleted-orders-header h2 { margin: 0; }
.deleted-orders-header button { min-height: 44px; flex-shrink: 0; }
.deleted-orders-content { overflow-y: auto; min-height: 0; overscroll-behavior: contain; }

.map-location-control { position: relative; display: flex; flex-direction: column; gap: 4px; }
.map-location-control button {
  border: 1px solid #bfcfc5;
  border-radius: 7px;
  background: #fff;
  color: #17312d;
  min-height: 44px;
  padding: 8px 10px;
  font: 600 12px Arial, sans-serif;
  box-shadow: 0 2px 7px #13291b22;
}
.map-location-control [aria-pressed="true"] { background: #1769e0; color: white; }
.map-location-control [hidden] { display: none; }
.map-location-status {
  position: absolute;
  right: 0;
  top: calc(100% + 5px);
  width: 175px;
  max-width: calc(100vw - 24px);
  padding: 7px 9px;
  background: #fff;
  color: #17312d;
  border-radius: 7px;
  box-shadow: 0 2px 7px #13291b22;
  font: 12px/1.4 Arial, sans-serif;
}
.live-location-marker span {
  display: block;
  width: 20px;
  height: 20px;
  border: 3px solid white;
  border-radius: 50%;
  background: #1769e0;
  box-shadow: 0 0 0 2px #1769e066, 0 2px 7px #0006;
}

@media (max-width: 700px) {
  /* Let the signed-in toolbar wrap without clipping the title or map. */
  .app { grid-template-rows: auto minmax(0, 1fr); }
  .top { flex-wrap: wrap; gap: 6px; padding: 8px 12px; }
  .brand { width: 100%; min-width: 0; }
  .top h1 { font-size: 18px; line-height: 1.2; }
  .editor-tools { width: 100%; min-width: 0; }
  .editor-tools > span { overflow-wrap: anywhere; }
  .deleted-orders-dialog > form { max-height: calc(88dvh - 36px); }

  .side {
    max-height: var(--phone-panel-height, calc(100% - 81px));
    overscroll-behavior: contain;
  }
  .side .filters { flex: 0 1 auto; min-height: 0; overflow-y: auto; padding: 10px 12px 0; }
  .side .search { position: sticky; top: 0; z-index: 1; background: #fff; }
  .side .search input { font-size: 16px; min-height: 44px; }
  .phone-filter-options > summary {
    display: list-item;
    cursor: pointer;
    min-height: 44px;
    padding: 13px 2px;
    font-size: 13px;
    font-weight: 700;
    color: #126b57;
  }
  .phone-filter-controls { padding-bottom: 12px; }
  .phone-filter-options[open] .phone-filter-controls {
    max-height: min(32dvh, 240px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .side .resultshead { flex: 0 0 auto; padding: 10px 20px 6px; }
  .side .resultlist { flex: 1 0 76px; min-height: 76px; overscroll-behavior: contain; }
  .side .home-row { min-height: 52px; }
  .side .foot { flex: 0 0 auto; padding: 6px 12px; }
}

/* The informational footer is secondary when the keyboard leaves little room. */
@media (max-width: 700px) and (max-height: 600px) {
  .side .foot { display: none; }
}
