/* Shared desktop navigation: the same menu on the homepage and inner pages.
 * Mobile navigation (900px and below) keeps the existing theme behaviour.
 */
@media(min-width:901px){
  body .eb-header{height:auto;min-height:65px}
  body .eb-header .eb-header-inner{width:min(1240px,calc(100% - 36px));height:auto;min-height:64px;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px}
  body .eb-header .eb-logo,body .eb-header .custom-logo-link{grid-column:1;grid-row:1;flex:none;white-space:nowrap}
  body .eb-header #eb-nav{grid-column:2;grid-row:1;display:block;position:static;inset:auto;margin:0;min-width:0;max-height:none;padding:0;overflow:visible;background:transparent;border:0}
  body .eb-header #eb-nav>ul{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;column-gap:14px;row-gap:0;white-space:normal}
  body .eb-header #eb-nav>ul>li{flex:0 0 auto}
  body .eb-header #eb-nav>ul>li>a{font-size:12px;font-weight:600;white-space:nowrap;padding:20px 0}
  body .eb-header #eb-nav .current-menu-item>a:after{display:block;bottom:10px}
  body .eb-header #eb-nav .sub-menu{display:none;position:absolute;top:100%;left:-14px;right:auto;min-width:180px;margin:0;padding:10px 15px;background:#170d21;border:1px solid var(--line);border-radius:10px;white-space:normal;z-index:2}
  body .eb-header #eb-nav .sub-menu a{padding:8px 0}
  body .eb-header #eb-nav li:hover>.sub-menu,body .eb-header #eb-nav li:focus-within>.sub-menu{display:block}
  body .eb-header .eb-header-actions{grid-column:3;grid-row:1;margin-left:0;min-width:0;gap:8px;justify-self:end;flex:none}
  body .eb-header .eb-header-actions>.eb-icon-button{flex:0 0 auto}
  body .eb-header .eb-header-actions .eb-small{padding-inline:14px;white-space:nowrap}
  body .eb-header .eb-account{flex:0 0 auto}
  body .eb-header .eb-account>summary{white-space:nowrap}
  body .eb-header .eb-menu-toggle{display:none}
}
@media(min-width:901px) and (max-width:1199px){
  body .eb-header .eb-header-inner{grid-template-columns:minmax(0,1fr) auto;column-gap:12px;row-gap:0;padding-top:12px}
  body .eb-header .eb-logo,body .eb-header .custom-logo-link{grid-column:1;grid-row:1;justify-self:start}
  body .eb-header .eb-header-actions{grid-column:2;grid-row:1}
  body .eb-header #eb-nav{grid-column:1/-1;grid-row:2;padding-top:6px}
  body .eb-header #eb-nav>ul{column-gap:24px}
  body .eb-header #eb-nav>ul>li>a{padding:12px 0}
  body .eb-header #eb-nav .current-menu-item>a:after{bottom:6px}
}
/* Profile pages have an additional member-search form; give it its own track. */
@media(min-width:1281px){
  body.eb-profile-v2-page .eb-header .eb-header-inner{width:min(1780px,calc(100% - 36px));grid-template-columns:auto minmax(150px,220px) minmax(0,1fr) auto}
  body.eb-profile-v2-page .eb-header .eb-profile-header-search{grid-column:2;grid-row:1;min-width:0;max-width:220px;width:100%;margin-left:0}
  body.eb-profile-v2-page .eb-header #eb-nav{grid-column:3}
  body.eb-profile-v2-page .eb-header .eb-header-actions{grid-column:4}
}
/* The full-screen chat used to hide the site header. Keep one shared desktop
 * menu while retaining the chat's search, notifications and moderation controls.
 * Its existing mobile app navigation remains untouched.
 */
@media(min-width:901px){
  body.eb-chat-app-page>header.eb-header{display:block!important}
  body.eb-chat-app-page .eb-chat-topbar{position:static}
  body.eb-chat-app-page .eb-chat-topbar .eb-chat-brand,
  body.eb-chat-app-page .eb-chat-topbar .eb-chat-topnav{display:none}
  body.eb-chat-app-page .eb-chat-topbar .eb-chat-top-actions{margin-left:auto}
}
