/* ============================================================
   Shared dark top brand bar + the cross-chrome hex home-link
   ============================================================

   The dark "hex logo + Wargame Construction Set" bar for pages outside any
   single app's own chrome.js-rendered shell -- the root launcher, the auth
   pages. Component Designer/Document Designer's own `.topbar` (app-chrome.css)
   is a different, app-scoped shell, but links THIS file too, for one thing
   only: .wcs-topbar-icon-link/.wcs-topbar-icon below, so the hex mark is
   the exact same size and box position (28px hit target, 20px icon,
   centered) whether it sits in this dark bar or that light topbar --
   matching height (--topbar-height, 40px) and left inset (8px) across both
   is what makes the icon land at the identical screen position as a user
   moves between the launcher/login and any app, rather than drifting
   per-page in a way that reads as accidental instead of intentional.

   Extracted from frontend/desings/{login,player,admin}/ -- all three
   converged on the same brand-bar pattern independently, which is what
   made this worth pulling into one shared definition rather than three
   copies.

   Markup this expects:

     <header class="brand-bar" aria-label="Wargame Construction Set">
       <a class="brand-lockup" href="/" aria-label="Wargame Construction Set home">
         <span class="wcs-topbar-icon-link">
           <img class="wcs-topbar-icon" src="/hex.svg" alt="">
         </span>
         <span class="brand-name">Wargame Construction Set</span>
       </a>
       <div class="brand-bar-actions">
         <span class="account-name">…</span>
         <button class="sign-out-link" type="button">Log out</button>
       </div>
     </header>

   ...and inside an app's own `.topbar-main` (app-chrome.css):

     <a class="wcs-topbar-icon-link" href="/" aria-label="Wargame Construction Set home">
       <img class="wcs-topbar-icon" src="/hex.svg" alt="">
     </a>

   Bar colors are deliberately hardcoded (not --wcs-status-card-* tokens) --
   this dark bar is always the same regardless of app theme, matching the
   design concepts it was ported from. The icon-link geometry has no color
   of its own (transparent by default) so it can drop into either chrome;
   each context below sets its own hover tint. */

.brand-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  height: var(--topbar-height, 40px);
  min-height: var(--topbar-height, 40px);
  padding: 0 8px;
  color: #fffaf0;
  background: rgba(14, 14, 26, 0.94);
  border-bottom: 1px solid #2a2a3e;
  box-shadow: 0 3px 12px rgba(14, 14, 26, 0.18);
}

.wcs-topbar-icon-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 4px;
}

.brand-bar .wcs-topbar-icon-link:hover {
  background: rgba(255, 255, 255, 0.12);
}

.topbar .wcs-topbar-icon-link:hover {
  background: var(--surfaceActive);
}

.wcs-topbar-icon {
  width: 20px;
  height: 20px;
}

.brand-bar .wcs-topbar-icon {
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.2));
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.brand-name {
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-bar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.brand-bar-actions .account-name {
  color: #aaa;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-bar-actions .sign-out-link {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 8px;
  border: 1px solid #3a3a4e;
  border-radius: 5px;
  color: #fffaf0;
  background: transparent;
  text-decoration: none;
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.brand-bar-actions .sign-out-link:hover {
  background: #1e1e30;
}

.brand-bar-actions .sign-out-link:focus-visible {
  outline: 3px solid rgba(122, 72, 32, 0.22);
  outline-offset: 2px;
}
