/**
 * @file
 * Drops Drupal's admin-toolbar page offsets on the front end.
 *
 * `css/ccn.css` hides the toolbar outright on tripin-rendered pages:
 *
 *   #toolbar-administration { display: none; }
 *
 * but nothing removed the space Drupal reserves FOR that toolbar, so logged-in
 * editors paid for a chrome they could not see:
 *
 *   - Vertical mode (`toolbar.module.css`) offsets the page with a pure-CSS
 *     `margin-inline-start: 15rem`. The toolbar flips to vertical below 61em
 *     (~976px), so on any narrower viewport the site was shoved 240px to the
 *     right, leaving a dead white strip on the left and pushing 240px of
 *     content off the right edge. This is the "site doesn't display on smaller
 *     screens" report.
 *   - The pre-paint anti-flicker rules add the same inline-start offset on
 *     <html> plus a `padding-top` on <body>, applied before toolbar.js has
 *     had a chance to measure anything.
 *
 * Horizontal mode needs no rule here: that offset is written as an inline
 * `padding-top` by toolbar.js from the measured bar height, which is already 0
 * for a `display: none` toolbar.
 *
 * Scope: this file ships with `tripin/main`, which only loads on pages themed
 * by tripin. Admin routes render in Claro and keep core's offsets untouched.
 *
 * Each selector adds one element or class over the core rule it overrides, so
 * the cascade resolves on specificity alone — no `!important` needed.
 */

/* Vertical toolbar: core's `.toolbar-tray-open.toolbar-vertical.toolbar-fixed`
 * carries no element qualifier, so it targets <html> and <body> alike. */
html.toolbar-tray-open.toolbar-vertical.toolbar-fixed,
body.toolbar-tray-open.toolbar-vertical.toolbar-fixed {
  margin-inline-start: 0;
}

/* Pre-paint anti-flicker reservations for the toolbar bar itself. */
html.toolbar-anti-flicker.toolbar-loading.toolbar-fixed body,
html.toolbar-anti-flicker.toolbar-loading.toolbar-fixed.toolbar-horizontal.toolbar-tray-open body {
  padding-top: 0;
}
