/*
 * App-wide styles. Tailwind handles most of the work via inline classes;
 * this file is for the few cases where third-party widgets need overriding.
 */

/* Self-hosted IBM Plex (served from our box, not Google/unpkg, so a cold load
   from Ghana isn't waiting on external round-trips). Sans ships as one variable
   file, weights 100-700. Mono has no variable build, so its weights are separate
   static faces: the app renders mono at 400 (default), 600 and 700, with 500
   kept for completeness. Propshaft fingerprints the url()s. font-display: swap
   so text paints in the system fallback and swaps when the font arrives. */
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/IBMPlexSans-Variable-bf0c3289.woff2") format("woff2");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/IBMPlexMono-400-d803141a.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/IBMPlexMono-500-3f7bbac1.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/IBMPlexMono-600-b71798d4.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/IBMPlexMono-700-e35453d6.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Lokkate marker tooltips — strip Leaflet's default white box so our
   dark glass tooltip can render cleanly. */
.leaflet-tooltip.lokkate-marker-tooltip {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  white-space: nowrap;
}
.leaflet-tooltip.lokkate-marker-tooltip::before {
  display: none;
}

/* Collapsed sidebar — nav items center their lone visible child (icon). */
.is-collapsed nav a {
  padding-left: 0 !important;
  padding-right: 0 !important;
  justify-content: center;
}

/* Admin chrome — sidebar sticks to viewport top, body scrolls normally so the
   page_header's sticky positioning continues to work against the viewport.
   Aside has its own internal vertical scroll if the nav list overflows; never
   horizontal. The visible scrollbar is hidden because in the collapsed (64px)
   rail it would steal layout width and visibly shift the centered toggle off
   true center. Scrolling still works via wheel / trackpad / keyboard. */
body.admin-shell aside[data-controller="sidebar"] {
  position: sticky;
  top: 0;
  height: 100vh;
  align-self: flex-start;
  overflow: hidden;
}

/* Trips dropdown chevron rotates when the <details> panel is open. */
details.lk-trips[open] .lk-trips-chevron {
  transform: rotate(180deg);
}
