/* Navbar Component
   ========================================================================== */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 99;
  transition: background-color 0.3s ease-out;
}

.navbar.scrolled {
  background-color: oklch(var(--lch-white) / 0.6);
  backdrop-filter: blur(5px);
}

.navbar__brand img {
  width: clamp(120px, 25vw, 160px);
  height: auto;
}

/* News indicator dot on hamburger menu */
a.has-news:not(.app-nav__item) {
  position: relative;

  &::after {
    --size: 0.5em;
    content: "";
    position: absolute;
    inset-block-start: 0;
    inset-inline-end: -0.15em;
    inline-size: var(--size);
    aspect-ratio: 1;
    border-radius: 50%;
    background-color: var(--color-blue);
  }
}

/* Logo variants for dark mode */
.navbar__brand .logo-dark {
  display: none;
}

html[data-theme="dark"] .navbar__brand .logo-light {
  display: none;
}

html[data-theme="dark"] .navbar__brand .logo-dark {
  display: inline;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme]) .navbar__brand .logo-light {
    display: none;
  }

  html:not([data-theme]) .navbar__brand .logo-dark {
    display: inline;
  }
}
