/* Global nav: logo-as-home (top-left) + search bubble (top-right), included
   on every page except the search results page itself (see search.html,
   which omits these <link>/<script> tags entirely rather than hiding this
   markup with CSS). Not a real persistent SPA mount (this project has no
   client-side router - every page is a separate full load), but identical
   markup/behavior on every page reads as one consistent, always-there nav.
   The two pieces are independently position:fixed (same pattern as
   .chrome-brand/.chrome-search used to be in the reader) rather than one
   positioned wrapper, so they can sit in opposite corners. */

#global-nav {
  /* Non-visual wrapper only - see comment above. */
}

#global-nav a {
  position: fixed;
  z-index: 9999; /* above every other z-index in this project (highest existing is 11) */
  outline-offset: 3px;
}

#global-nav-logo {
  top: 16px;
  left: 16px;
  display: block;
}

#global-nav-logo img {
  display: block;
  height: 40px;
  width: auto;
  opacity: 1;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
  transition: transform 0.15s ease;
}

#global-nav-logo:hover img,
#global-nav-logo:focus-visible img {
  transform: scale(1.04);
}

/* Shared small-circular-icon-button treatment - used by the search bubble
   above and by the (page-specific, not part of this shared nav) Bookshelf/
   MagazineStand view-toggle button on home.html, so the two sit
   pixel-identical next to each other despite living in different files. */
.nav-icon-btn {
  top: 16px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f2ead8;
  background: rgba(20, 20, 20, 0.55);
  opacity: 0.35;
  transition: opacity 0.15s ease, background 0.15s ease;
  /* Reset in case this class ends up on a <button> instead of an <a>. */
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.nav-icon-btn:hover,
.nav-icon-btn:focus-visible {
  opacity: 1;
  background: rgba(20, 20, 20, 0.75);
}

.nav-icon-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

#global-nav-search {
  right: 16px;
}

#global-nav a:focus-visible,
.nav-icon-btn:focus-visible {
  outline: 2px solid #c69d1d;
}
