/**
 * Pico CSS v2.1.1 — loaded, UNMODIFIED, into the cascade layer `pico`.
 *
 * css/pico.min.css is the genuine upstream file (MIT). Importing it into a
 * layer means every unlayered rule — css/style.css, Drupal core, the admin
 * toolbar — beats Pico regardless of specificity, so the theme can override it
 * with plain selectors (no !important, no specificity arms race).
 *
 * This file must stay separate and un-aggregated (see debtsunset.libraries.yml:
 * `preprocess: false`), because @import is only valid at the top of its own file.
 */
@import url("pico.min.css") layer(pico);

/**
 * Keep Pico out of Drupal's own admin UI.
 *
 * Layering only lowers Pico's priority; where the toolbar's own CSS doesn't set
 * a property (e.g. `display` on its <nav>/<ul>), Pico's `nav { display: flex }`
 * would still apply and turn the dropdown menus sideways. So inside the `pico`
 * layer we roll Pico's declarations back for these islands; Drupal's unlayered
 * toolbar CSS then decides. This UNDOES Pico there — it does not restyle the
 * toolbar. Selectors use attribute form (no ID selectors).
 */
@layer pico {
  [id="toolbar-administration"],
  [id="toolbar-administration"] *,
  [id="toolbar-administration"] *::before,
  [id="toolbar-administration"] *::after,
  .contextual,
  .contextual *,
  .ui-dialog,
  .ui-dialog * {
    all: revert-layer;
  }

  /* The previous placeholder applied border-box everywhere; the admin UI was
     tuned under that, so keep it. */
  [id="toolbar-administration"],
  [id="toolbar-administration"] *,
  [id="toolbar-administration"] *::before,
  [id="toolbar-administration"] *::after,
  .contextual,
  .contextual *,
  .ui-dialog,
  .ui-dialog * {
    box-sizing: border-box;
  }
}
