/* App only (platform.js sets data-platform; the website never gets android or ios, so none of this reaches it).
   The app draws the page under the transparent status bar. exact-shell.css lays a strip of the header colour,
   as tall as the top safe area, above every layer of the page. A layer that starts at the top edge of the screen
   therefore keeps its header, its title and its close button below that strip.
   --cdx-safe-top is the height of the strip; it is not defined on the website. */
:is(html[data-platform="android"], html[data-platform="ios"]) { --cdx-safe-top: env(safe-area-inset-top, 0px); }

/* Brand and model picker: the header keeps 44 px for the status bar of the mock-up; the real bar can be taller. */
:is(html[data-platform="android"], html[data-platform="ios"]) .exact-vehicle-picker header { height: calc(52px + max(44px, var(--cdx-safe-top))); padding-top: max(44px, var(--cdx-safe-top)); }

/* Photo check screens (document, vehicle registration): the page header is hidden there (no top bar), so its own header starts at the top edge. */
:is(html[data-platform="android"], html[data-platform="ios"]) :is(.exact-doc-capture, .exact-sts) header { padding-top: calc(4px + var(--cdx-safe-top)); }

/* Sheets and dialogs above the on-screen keyboard take all the visible height less 12 px (keyboard-short.css). In the app that
   would put their top under the strip, or over it for a <dialog>, so they stop 12 px below the strip instead. */
:is(html[data-platform="android"], html[data-platform="ios"]) body.cdx-shell-ready.keyboard-open :is(.add-sheet, #cityPickerDialog, .cd-flow-sheet, .picker-dialog, .exact-mileage__sheet, .exact-vehicle-photo-sheet, .exact-plan-sheet > section, .exact-history-sheet > section) { max-height: calc(var(--visual-viewport-height, 100dvh) - 12px - var(--cdx-safe-top)); }
