/* INFO: fc 23aug26 every image carries width and height, and only auto lets CSS width drive the ratio */
img {
  height: auto;
}

/* INFO: RR 08aug26 the brand makes the fixed navbar 3.5rem tall at every width, content offsets must match. */
:root {
  --navbar-height: 3.5rem;
}
.navbar {
  min-height: var(--navbar-height);
}
.navbar-margin {
  margin-top: var(--navbar-height);
}
section {
  scroll-margin-top: var(--navbar-height);
}

/* INFO: fc 24oct26 own rules, not d-lg-* utilities: system tests run without Bootstrap's CSS and would see both menus */
.navbar-inline {
  display: none;
}
@media (min-width: 992px) {
  .navbar-inline {
    display: flex;
  }
}
.navbar-panel {
  position: fixed;
  inset: 0 0 0 auto;
  width: 12rem;
  max-width: 100%;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-inline-start: var(--bs-border-width) solid var(--bs-border-color-translucent);
  color: inherit;
  translate: 100%;

  @media (prefers-reduced-motion: no-preference) {
    transition: translate 0.3s ease-in-out, display 0.3s allow-discrete, overlay 0.3s allow-discrete;

    &[open] {
      animation: navbar-panel-slide-in 0.3s ease-in-out;
    }

    &[open]::backdrop {
      animation: navbar-panel-fade-in 0.15s linear;
    }
  }
}
/* INFO: fc 24oct26 flat, not nested: Safari 15.4 to 16.4 opens a dialog but drops nested rules, and would leave it invisible and the page inert */
.navbar-panel[open] {
  display: flex;
  flex-direction: column;
  translate: 0;
}
.navbar-panel::backdrop {
  background-color: rgba(var(--bs-black-rgb, 0, 0, 0), 0.5);
}
.navbar-panel-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: var(--navbar-height);
  padding-inline-end: calc(var(--bs-gutter-x) * 0.5);
}
.navbar-panel-body {
  flex-grow: 1;
  padding: 0 1rem 1rem;
  overflow-y: auto;
}
body:has(.navbar-panel:modal) {
  overflow: hidden;
}

@keyframes navbar-panel-slide-in {
  from {
    translate: 100%;
  }
}

@keyframes navbar-panel-fade-in {
  from {
    opacity: 0;
  }
}

/* INFO: rr 09sep26 sand over sand: the bar needs an edge, and only once the page has travelled under it */
.navbar-edge::after {
  content: "";
  position: absolute;
  inset-block-start: 100%;
  inset-inline: 0;
  height: 0.625rem;
  pointer-events: none;
  background: linear-gradient(rgb(60 40 20 / 0.1), rgb(60 40 20 / 0.035) 35%, rgb(60 40 20 / 0));

  @supports (animation-timeline: scroll()) {
    animation: navbar-shadow linear both;
    animation-timeline: scroll(root block);
    animation-range: 0 var(--navbar-height);
  }
}

@keyframes navbar-shadow {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.navbar .dropdown-header {
  font-size: 0.75rem;
}
.nav-link-green-bright {
  --bs-nav-link-color: var(--color-green-bright);
  --bs-nav-link-hover-color: var(--color-green-brighter);
  --bs-navbar-active-color: var(--color-green-brighter);
}

/* INFO: rr 08sep26 centered on the window rather than on the room left between the brand and the buttons */
@media (min-width: 1200px) {
  .navbar-centered {
    position: absolute;
    inset-inline-start: 50%;
    transform: translateX(-50%);
  }
}
.btn-close:focus:not(:focus-visible) {
  box-shadow: none;
}
