/* ============================================================
   Phone dock (30 Nov). On a phone the monitoring pages were reached
   only through the hamburger drawer: three taps and a 264 px panel to
   go from a plant to its alerts and back. The map already had its own
   tab dock; this is the same idea for every in-app page at 640 px and
   below: Home, Plant, Alerts, Tickets, Map. One glass pill offset
   from the screen edges with a transparent container, so iOS Safari
   does not tint its bottom toolbar from it (docs: light body, no
   viewport-fit=cover, nothing dark at the edges). Hidden on the map
   (it has its own dock), for guests and on wider screens.
   ============================================================ */
.ed-dock { display: none; }
@media (max-width: 640px) {
  :root { --dock-h: 58px; }
  html:not(.edash-fullscreen-page):not([data-edash-guest="1"]) .ed-dock {
    display: flex; position: fixed; z-index: 790; left: 10px; right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px)); height: var(--dock-h);
    padding: 4px; gap: 2px; align-items: stretch; justify-content: space-around;
    background: var(--sg-flat); border: 1px solid var(--pg-edge); border-radius: var(--r-card);
    box-shadow: 0 8px 24px -12px var(--sg-depth, rgba(0, 0, 0, .25));
  }
  .ed-dock a {
    flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    border-radius: var(--r-ctl); color: var(--type-ink); text-decoration: none;
    font-size: var(--type-label-size); font-weight: 600; line-height: 1.1;
  }
  .ed-dock a i { font-size: var(--type-card-title-size); }
  .ed-dock a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ed-dock a[aria-current="page"] { background: var(--pg-action); color: #FFFFFF; }
  /* the floating assistant and the page's last card sit above the dock */
  html:not(.edash-fullscreen-page):not([data-edash-guest="1"]) {
    --fab-b0: calc(var(--fab-edge) + var(--dock-h) + 18px + env(safe-area-inset-bottom, 0px));
  }
}
