/* RXOPD B3-P01 — common responsive HEADER FOUNDATION, 2026-10-23.
 * Scope: visual continuity only; NO auth, SSO, role, module-menu, logo changes.
 * B3-P02/P03 own individual module brand and hamburger content.
 * Use existing markup per module; do not transplant a header between systems.
 */
:root {
  --rx-eco-header-min-height: 68px;
  --rx-eco-header-gap: 12px;
  --rx-eco-header-font: system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
  --rx-eco-header-focus: #147ab7;
}
/* Four module surfaces, scoped to EXISTING named header elements. */
:where(.rx-auth-unified-topbar,.rx-topbar.rx-hanging-header,.rx41-topbar,.rxlab-header-foundation,.rxp-topbar-main){
  box-sizing:border-box;
  min-width:0;
  font-family:var(--rx-eco-header-font);
  -webkit-text-size-adjust:100%;
}
:where(.rx-auth-unified-topbar,.rx-topbar.rx-hanging-header,.rx41-topbar,.rxp-topbar-main){
  min-height:var(--rx-eco-header-min-height);
  gap:var(--rx-eco-header-gap);
}
/* Lab's existing topbar uses .top, which is intentionally scoped via the
 * new class on the header, not generic .top on panels. */
.rxlab-header-foundation{
  min-height:var(--rx-eco-header-min-height);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:var(--rx-eco-header-gap);
}
/* Content can shrink rather than pushing the account menu beyond viewport. */
:where(.rx-auth-unified-topbar,.rx41-topbar,.rxp-topbar-main,.rxlab-header-foundation) > * {min-width:0}
:where(.rx-auth-unified-left,.rx41-topbar-brand,.rxp-logo,.rxlab-header-foundation .brand){min-width:0;flex-shrink:1}
:where(.rx-auth-unified-actions,.rx41-topbar-actions,.rxp-utility-nav){min-width:0;flex-shrink:0}
:where(.rx-auth-unified-topbar,.rx41-topbar,.rxp-topbar-main,.rxlab-header-foundation) img{
  max-width:100%;height:auto;object-fit:contain;
}
:where(.rx-auth-unified-topbar,.rx41-topbar,.rxp-topbar-main,.rxlab-header-foundation) a,
:where(.rx-auth-unified-topbar,.rx41-topbar,.rxp-topbar-main,.rxlab-header-foundation) button{
  -webkit-tap-highlight-color:transparent;
  text-underline-offset:3px;
}
:where(.rx-auth-unified-topbar,.rx41-topbar,.rxp-topbar-main,.rxlab-header-foundation) :is(a,button,input,select):focus-visible{
  outline:3px solid var(--rx-eco-header-focus);
  outline-offset:2px;
}
/* Never globally hide menu actions or change per-module destinations. */
@media(max-width:900px){
  :root{--rx-eco-header-min-height:60px;--rx-eco-header-gap:8px}
  :where(.rx-auth-unified-topbar,.rx41-topbar,.rxp-topbar-main,.rxlab-header-foundation){max-width:100%;}
  :where(.rx-auth-unified-title,.rx41-topbar-brand,.rxp-logo){overflow:hidden;text-overflow:ellipsis;}
  .rxlab-header-foundation nav{display:flex;align-items:center;gap:8px;max-width:65vw;overflow-x:auto;scrollbar-width:thin;}
  .rxlab-header-foundation nav a{white-space:nowrap;flex-shrink:0}
}
@media(max-width:520px){
  :root{--rx-eco-header-min-height:56px;--rx-eco-header-gap:6px}
  :where(.rx-auth-unified-topbar,.rx41-topbar,.rxp-topbar-main,.rxlab-header-foundation){padding-block:max(6px,env(safe-area-inset-top)) 6px;}
  .rxlab-header-foundation .brand{white-space:nowrap}
  .rxlab-header-foundation nav{max-width:56vw;gap:6px}
}
@media(prefers-reduced-motion:reduce){
  :where(.rx-auth-unified-topbar,.rx41-topbar,.rxp-topbar-main,.rxlab-header-foundation) * {scroll-behavior:auto}
}
