/*
 * 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.
 */

/* 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;
}

/* "LIVE" pulse — green dot that softly heartbeats. Used everywhere a map
   shows the current state of an asset/fleet so users know it's real-time. */
@keyframes lokkate-live-pulse {
  0%   { box-shadow: 0 0 0 0   rgba(0, 200, 83, 0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(0, 200, 83, 0);    }
  100% { box-shadow: 0 0 0 0   rgba(0, 200, 83, 0);    }
}
.lokkate-live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00C853;
  animation: lokkate-live-pulse 1.6s ease-out infinite;
}

/* 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);
}
