/* Keep the brand legible when the device requests a dark header. */
.header-logo {
  display: contents;
}

.site-header .brand-link-home,
.top-bar .brand-link-home {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  height: auto;
  text-decoration: none;
}

.brand-tagline {
  color: #334155;
  font: 600 10px/1.3 Arial, sans-serif;
  white-space: nowrap;
}

.site-header .utility-bar {
  justify-content: flex-end;
}

/* Match the filled primary action regardless of generic account-link rules. */
.site-header .status-bar-right a.login-link {
  background: #1f5f9f;
  border-color: #1f5f9f;
  color: #fff;
}

.site-header .status-bar-right a.login-link:hover,
.site-header .status-bar-right a.login-link:focus-visible {
  background: #17466f;
  border-color: #17466f;
  color: #fff;
}

/* Employee work links are always visible within the navigation. */
.menu-bar .employee-tools {
  list-style: none;
  min-width: 0;
}

.menu-bar .employee-tools-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  position: static;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar .menu-bar .employee-tools-links {
  display: grid;
}

.employee-menu-heading {
  display: none;
}

@media (max-width: 900px) {
  /* Keep the employee drawer separate from the logo and header layout. */
  .employee-view .brand-row .site-navigation {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(320px, 88vw);
    height: 100dvh;
    max-height: 100dvh;
    box-sizing: border-box;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 64px 16px 24px;
    border: 0;
    border-radius: 0;
    background: #fff;
    color: #172033;
    z-index: 1000;
    box-shadow: -12px 0 36px #0f172a26;
  }

  body.employee-view.nav-open {
    overflow: hidden;
  }

  .employee-view .mobile-nav-close {
    top: 16px;
    right: 16px;
  }

  .employee-view .site-navigation .menu-bar > ul {
    display: grid;
    gap: 8px;
  }

  .employee-view .employee-menu-heading {
    display: block;
    padding: 16px 12px 8px;
    border-top: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
  }

  .site-navigation .menu-bar .employee-tools-links {
    display: grid;
    gap: 4px;
  }

  .employee-view .employee-tools-links a,
  .employee-view .employee-tools-links .staff-training-placeholder {
    display: flex;
    align-items: center;
    min-height: 46px;
    box-sizing: border-box;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.4;
    white-space: normal;
  }

  .employee-view .employee-tools-links a {
    color: #172033;
  }

  .employee-view .employee-tools-links a:hover,
  .employee-view .employee-tools-links a:focus-visible {
    background: #eef4fb;
  }
}

@media screen and (prefers-color-scheme: dark) {
  .top-bar,
  .site-header {
    color-scheme: dark;
    background: #111827;
    color: #f8fafc;
    border-bottom-color: #374151;
  }

  .top-bar .welcome,
  .site-header .welcome,
  .site-header .search-bar > label {
    color: #d8e0ea;
  }

  .brand-tagline {
    color: #d8e0ea;
  }

  .top-bar .menu-btn,
  .top-bar .shelf-label-bell,
  .site-header .mobile-menu-toggle,
  .site-header .shelf-label-bell {
    background: #1f2937;
    color: #f8fafc;
    border-color: #4b5563;
  }

  .site-header .mobile-menu-toggle span {
    background: #f8fafc;
  }

  .site-header .site-navigation {
    color-scheme: light;
    color: #172033;
  }

  /* Only the brand artwork changes; product photos keep their own colors. */
  .header-logo > img.logo {
    filter: brightness(0) invert(1);
  }

  @media (min-width: 901px) {
    .site-header .menu-bar > ul > li > a,
    .site-header .menu-bar > ul > li > button {
      color: #f8fafc;
    }

    .site-header .employee-tools-links a {
      color: #f8fafc;
    }

    .site-header .employee-tools-links a:hover,
    .site-header .employee-tools-links a:focus-visible {
      background: #374151;
    }

    .site-header .menu-bar > ul > li > a:hover,
    .site-header .menu-bar > ul > li > button:hover {
      background: #374151;
    }
  }
}
