/* Youpi v141 · polimento (auditoria v141, P2). Loaded last-but-one in <head>; only additive rules. */

/* P2-3 · Admin: the passenger dock (Mapa · Buscar · Comunidade · Bate-papo · Menu) and its Recolher toggle
   floated over the admin panel, which has its own navigation (sidebar / tabs + "Voltar ao aplicativo"). */
html body.map-shell:has(.admin-app:not([hidden])) :is(.map-shell-navigation, .map-shell-dock, #map-shell-dock-toggle, .map-shell-menu-host) {
  display: none !important;
}
/* Without the dock, the admin keeps its own way back: the sidebar "Voltar ao aplicativo" on desktop and the compact
   top button up to 900 px (v138 had hidden it in the map shell because the dock did that job). No dock reserve. */
@media (max-width: 900px) {
  html body.map-shell .admin-app:not([hidden]) .admin-top .admin-exit-compact { display: inline-flex !important; }
}
html body.map-shell[data-map-shell-view="admin"] > .admin-app.product-view .admin-main { padding-bottom: 40px; }

/* P2-5 · Map popups ("Você está aqui", a stop, a meeting point) sit ABOVE the floating map buttons (GPS, Círculo,
   Trânsito: z-index 3 in the same stacking context), so a popup is never covered. The buttons stay visible and
   reachable where the popup is not (v139). Attribution keeps the top spot in the corner. */
html body.map-shell #map .maplibregl-popup { z-index: 4; }
html body.map-shell #map .maplibregl-ctrl-bottom-right { z-index: 5; }

/* P2-2 · Item 13: discreet "Outro sentido" on the first card of a two-way line in "Todas as linhas".
   Small text, 44 px touch target, right column of the "Sentido …" row. */
#arrival-drawer .arrival-card:has(> .arrival-opposite-link) > .arrival-destination { grid-column: 1; align-self: center; }
#arrival-drawer .arrival-card > .arrival-opposite-link {
  grid-column: 2;
  justify-self: end;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 44px;
  min-width: 44px;
  margin: -10px -6px;
  padding: 0 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--night-link, var(--navy));
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}
#arrival-drawer .arrival-card > .arrival-opposite-link svg { width: 16px; height: 16px; flex: 0 0 16px; }
#arrival-drawer .arrival-card > .arrival-opposite-link span { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
#arrival-drawer .arrival-card > .arrival-opposite-link:hover span { text-decoration-thickness: 2px; }
#arrival-drawer .arrival-card > .arrival-opposite-link:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }
#arrival-drawer .arrival-card > .arrival-opposite-link[aria-busy="true"] { opacity: .7; cursor: progress; }
#arrival-drawer .arrival-card.next > .arrival-opposite-link { color: #fff; }
:root[data-theme="dark"] #arrival-drawer .arrival-card:not(.next) > .arrival-opposite-link { color: #9db8ff; }
