/*
 * hyd-map-cleanup.css - caption line for the player location window.
 *
 * Owns: the small caption line (#route-content > small) under the location map, and the phone
 * grid row for it. hyd-world.js fills the line from HydRecordings.locationPresentation, which
 * gives every memory with a map a caption (area view, estimated, illustrative, filming spot or
 * GPS); it is hidden only when there is no map.
 * Reads: --ui-font, which no stylesheet defines, so the Lucida Grande, Tahoma, sans-serif
 * fallback is what applies today.
 * Cascade: linked after hyd-uturns.css and before hyd-desktop-refinement.css.
 * Dormant code: the phone rules target #mobile-route-slot, which is no longer in
 * hyd-world.html or any script (the location window now sits in #player-location-dock and is
 * laid out by hyd-player-layout.css). They are kept in place.
 */

/* A small hint for area-only memories; exact pin views keep their uncluttered frame. */
/* Stale: pin views (filming spot or GPS location) also show a caption today (6 Oct 2026). */
html[data-theme] #world #cinema .route-window #route-content > small:not([hidden]) {
  display: block;
  padding: 3px 8px 6px;
  margin: 0;
  font: calc(10 * var(--px))/1.4 var(--ui-font,Lucida Grande,Tahoma,sans-serif);
  color: #bec7cc;
  background: #1a2229;
}

/* Phones: while the caption shows, the location window grows from 110 px (hyd-classic-desktop.css)
   to 125 px and gains a third 28 px row for it. Dormant: #mobile-route-slot is gone (see header). */
@media (max-width: 820px) {
  /* Taller window with a third row for the caption. */
  html[data-theme]
    #world
    #cinema
    #mobile-route-slot
    .route-window:has(#route-content:not([hidden]) > small:not([hidden])) {
    grid-template-rows: 35px minmax(0, 1fr) 28px;
    height: 125px;
  }

  /* The map spans all three rows. !important: hyd-own-media.css and hyd-classic-desktop.css also force
     the map height with !important (110 px in the phone slot), so overriding it needs !important plus
     a more specific selector. */
  html[data-theme]
    #world
    #cinema
    #mobile-route-slot
    .route-window:has(#route-content:not([hidden]) > small:not([hidden]))
    #journey-map {
    grid-row: 1/4;
    height: 125px !important;
  }

  /* Caption in the right-hand column of the third row. */
  html[data-theme]
    #world
    #cinema
    #mobile-route-slot
    .route-window
    #route-content
    > small:not([hidden]) {
    display: block;
    grid-column: 2;
    grid-row: 3;
    padding: 2px 10px 5px;
    font-size: calc(9 * var(--px));
    background: transparent;
  }
}
