/* The current public product header, shared by Trends and creator campaign pages.
 * Geometry and category states come from styles.css and dashboard-category-navigation.css.
 * The canonical public account dock and all Deposit/Profile styling remain in publicAccountDock.ts and auth.css.
 * The parent owns page width; this component owns only the navigation surface. */
section.mf-product-header.measurement-list-hero {
  position: relative;
  z-index: 70; /* Preserve the existing public header stacking level. */
  width: 100%;
  min-width: 0;
  color: var(--mf-text-primary);
  font-family: var(--mf-font-sans);
  font-size: var(--mf-font-size-body);
  line-height: var(--mf-line-height-body);
  --list-graphite: var(--mf-text-strong);
  --list-ink: var(--mf-text-primary);
  --list-muted: var(--mf-text-secondary);
  --list-faint: var(--mf-text-disabled);
  --list-panel: var(--mf-surface-panel);
  --list-line: var(--mf-border-subtle);
  --list-line-strong: var(--mf-border-default);
  --list-cyan: var(--mf-signal-accent);
  --list-cyan-soft: var(--mf-color-accent-soft);
  --list-sans: var(--mf-font-sans);
  --list-mono: var(--mf-font-mono);
}
section.mf-product-header, section.mf-product-header * { box-sizing: border-box; }
section.mf-product-header [hidden] { display: none !important; }
section.mf-product-header.measurement-list-hero::before { display: none; }
section.mf-product-header .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}


section.mf-product-header .measurement-list-hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-areas:
    "logo tabs actions";
  align-items: center;
  gap: 12px 22px;
  width: 100%;
  max-width: none;
  min-width: 0;
}

section.mf-product-header .measurement-list-logo {
  grid-area: logo;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  width: 188px;
  max-width: 100%;
  border-bottom: 0;
  text-decoration: none;
}

section.mf-product-header .measurement-list-logo img {
  display: block;
  width: 100%;
  height: auto;
}

section.mf-product-header .measurement-list-actions {
  grid-area: actions;
  align-self: center;
  justify-self: end;
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}

section.mf-product-header .measurement-list-hero-inner { width: 100%; max-width: none; }

section.mf-product-header.measurement-list-hero {
  min-height: 92px;
  padding-block: var(--mf-space-6) var(--mf-space-4);
  padding-inline: 0;
}

section.mf-product-header.measurement-list-hero::after {
  content: "";
  position: absolute;
  right: 50%;
  bottom: 0;
  left: 50%;
  width: 100vw;
  height: var(--mf-rule-width);
  background: var(--mf-border-subtle);
  transform: translateX(-50%);
  pointer-events: none;
}

section.mf-product-header .measurement-list-hero-inner {
  grid-template-columns: 188px minmax(0, 1fr) auto;
  gap: var(--mf-space-6);
  min-height: var(--mf-control-height-touch);
}

section.mf-product-header .measurement-list-logo {
  width: 188px;
}

section.mf-product-header .dashboard-trend-nav {
  grid-area: tabs;
  display: flex;
  align-items: center;
  min-width: 0;
}

section.mf-product-header .category-filter-root {
  flex: 0 0 auto;
  font-weight: var(--mf-font-weight-semibold);
}

section.mf-product-header .category-filter-divider {
  flex: 0 0 auto;
  width: var(--mf-rule-width);
  height: 22px;

  margin: 0;
  background: var(--mf-border-subtle);
}

section.mf-product-header .measurement-list-actions {
  max-width: none;
}

section.mf-product-header .category-filter-buttons {
  display: flex;
  flex: 1 1 auto;
  flex-flow: row nowrap;
  align-items: center;
  gap: 22px;
  width: auto;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
}

section.mf-product-header .category-filter-buttons::-webkit-scrollbar {
  display: none;
}

section.mf-product-header .category-filter-button {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 0;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border: 0;
  border-radius: var(--mf-radius-none);
  background: transparent;
  color: var(--mf-text-secondary);
  box-shadow: none;
  font-family: var(--mf-font-sans);
  font-size: var(--mf-font-size-body-sm);
  font-weight: var(--mf-font-weight-medium);
  letter-spacing: 0;
  line-height: 1;

  font-variant-numeric: normal;
  text-align: center;
  text-decoration: none;
  transform: none;
  transition:
    color var(--mf-duration-fast) var(--mf-ease-standard),
    font-weight var(--mf-duration-fast) var(--mf-ease-standard);
}

section.mf-product-header .category-filter-button::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  background: var(--mf-signal-accent);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity var(--mf-duration-fast) var(--mf-ease-standard),
    transform var(--mf-duration-standard) var(--mf-ease-standard);
}

section.mf-product-header .category-filter-button::after {
  left: 0;
  height: 2px;
  transform: scaleX(0.45);
  transform-origin: right center;
}

section.mf-product-header .category-filter-button.active {
  border: 0;
  background: transparent;
  color: var(--mf-text-strong);
  box-shadow: none;
  font-weight: var(--mf-font-weight-semibold);
}

section.mf-product-header .category-filter-button.active::after {
  opacity: 1;
  transform: scale(1);
}

section.mf-product-header .category-filter-button .category-filter-count {
  display: none;
}

section.mf-product-header .category-filter-button:active {
  color: var(--mf-text-strong);
  transform: none;
}

section.mf-product-header .category-filter-button:disabled {
  color: var(--mf-text-disabled);
  cursor: not-allowed;
  opacity: 0.72;
}

@media (hover: hover) and (pointer: fine) {
section.mf-product-header .category-filter-button:not(.active):hover,
section.mf-product-header .category-filter-button.active:hover {
    border: 0;
    background: transparent;
    color: var(--mf-text-strong);
  }
}

section.mf-product-header .category-filter-button:focus-visible {
  outline: none;
  box-shadow: var(--mf-focus-ring);
}

@media (max-width: 1100px) {
section.mf-product-header.measurement-list-hero {
    min-height: 0;
    padding-block: var(--mf-space-3) 7px;
    padding-inline: 0;
  }

section.mf-product-header .measurement-list-hero-inner {
    grid-template-columns: 188px minmax(0, 1fr);
    grid-template-areas:
      "logo actions"
      "tabs tabs";
    gap: var(--mf-space-1) var(--mf-space-6);
  }

section.mf-product-header .dashboard-trend-nav {
    width: 100%;
  }
}

@media (max-width: 820px) {
section.mf-product-header .measurement-list-hero-inner {
    grid-template-columns: 174px minmax(0, 1fr);
  }

section.mf-product-header .measurement-list-logo {
    width: 174px;
  }
}

@media (max-width: 640px) {
section.mf-product-header .category-filter-buttons {
    margin-inline: calc(var(--mf-space-3) * -1);
    padding-inline: var(--mf-space-3);
    scroll-padding-inline: var(--mf-space-3);
    scroll-snap-type: x proximity;
  }

section.mf-product-header .category-filter-button {
    scroll-snap-align: start;
  }

section.mf-product-header .category-filter-buttons {
    gap: var(--mf-space-5);
  }

section.mf-product-header .category-filter-button {
    height: var(--mf-control-height-touch);
    min-height: var(--mf-control-height-touch);
  }

section.mf-product-header .category-filter-button::after {
    bottom: 9px;
  }
}

@media (max-width: 520px) {
section.mf-product-header .measurement-list-hero-inner {
    grid-template-columns: 142px minmax(0, 1fr);
  }

section.mf-product-header .measurement-list-logo {
    width: 142px;
  }
}

@media (forced-colors: active) {
section.mf-product-header .category-filter-button.active {
    outline: 2px solid Highlight;
    outline-offset: -2px;
  }

section.mf-product-header .category-filter-button.active::after {
    background: Highlight;
  }
}

@media (prefers-reduced-motion: reduce) {
section.mf-product-header .category-filter-button,
section.mf-product-header .category-filter-button::after {
    transition-duration: 0.01ms;
  }
}
