/**
 * Shared top bar — loaded by map (map.html) + catalog (Projects / Map).
 * Colors: themes.css (--dc-header-surface, --dc-text-*, --dc-primary, …)
 */

.dc-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--dc-header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 0 24px;
  background: var(--dc-header-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--dc-header-border);
}

.dc-header__left {
  display: flex;
  align-items: center;
  gap: 32px;
  min-width: 0;
}

/* Text wordmark fallback (optional if no logo image) */
.dc-wordmark {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  color: var(--dc-wordmark);
  white-space: nowrap;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
}

.dc-wordmark-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
  flex-shrink: 0;
}

.dc-wordmark-img {
  height: 28px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  object-position: left center;
  display: block;
}

/* Two stacked assets: blue for default/dark/system-dark; light for `html[data-theme="light"]` only.
   Visibility is CSS-only so it cannot drift from the theme tokens (no JS src swapping). */
.dc-wordmark-stack {
  display: grid;
  grid-template: 1fr / 1fr;
  align-items: center;
  height: 28px;
  flex-shrink: 0;
}

.dc-wordmark-stack .dc-wordmark-img--brand {
  grid-area: 1 / 1;
  max-width: 180px;
}

.dc-wordmark--theme-light {
  display: none;
}

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

html[data-theme="light"] .dc-wordmark--theme-light {
  display: block;
}

/* Themed PNG/SVG wordmark from `resources/logo_{blue|light}.png` */
.dc-wordmark-img--brand {
  flex-shrink: 0;
}

.dc-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.dc-nav__link {
  color: var(--dc-text-muted);
  text-decoration: none;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 0.95rem;
  line-height: 1.25;
  border-bottom: 2px solid transparent;
  padding-bottom: 4px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.dc-nav__link:hover {
  color: var(--dc-text-main);
}

.dc-nav__link[aria-current="page"],
.dc-nav__link.is-active {
  color: var(--dc-nav-active, var(--dc-primary));
  border-bottom-color: var(--dc-nav-active, var(--dc-primary));
}

.dc-account-menu {
  position: fixed;
  z-index: 120;
  min-width: 132px;
  background: var(--dc-account-menu-bg);
  border: 1px solid var(--dc-account-menu-border);
  border-radius: 10px;
  box-shadow: var(--dc-account-menu-shadow);
  padding: 6px;
}

.dc-account-menu__header {
  color: var(--dc-account-menu-header-color);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 500;
  padding: 6px 10px 7px;
  border-bottom: 1px solid var(--dc-account-menu-header-border);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dc-account-menu__item {
  appearance: none;
  width: 100%;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--dc-account-menu-item-color);
  text-align: left;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  padding: 8px 10px;
  cursor: pointer;
}

.dc-account-menu__item:hover {
  background: var(--dc-account-menu-item-hover);
}
