/* Animated top menu (desktop): a glass pill track, a gradient pill that springs in behind the hovered item,
   a glowing active item, and dropdowns that fade and slide in with their links staggered. Loaded after the other shell styles. */
:root{--rw-menu-pill:linear-gradient(115deg,#0065c9 0%,#0a86d8 45%,#00a9b4 100%);--rw-menu-glow:0 10px 22px -8px rgba(0,121,200,.7)}

@media (min-width:1151px){
  .shell-header .shell-navigation{position:relative;flex:0 1 auto;align-self:center;gap:4px;padding:5px;margin-right:12px;border-radius:999px;
    background:linear-gradient(180deg,rgba(255,255,255,.85),rgba(234,243,253,.85));
    box-shadow:inset 0 0 0 1px #d4e3f3,inset 0 1px 0 #fff,0 12px 28px -18px rgba(11,59,122,.55);backdrop-filter:blur(8px)}

  .shell-header .shell-navigation > .shell-tab,
  .shell-header .shell-group > summary{position:relative;z-index:0;min-height:46px;padding:5px 15px 5px 6px;border-radius:999px;
    color:#1b3a5c!important;background:transparent!important;box-shadow:none!important;transition:color .25s ease,transform .25s ease}
  .shell-header .shell-navigation > .shell-tab::before,
  .shell-header .shell-group > summary::before{content:"";position:absolute;inset:0;z-index:-1;border-radius:inherit;background:var(--rw-menu-pill);
    background-size:200% 100%;box-shadow:var(--rw-menu-glow);transform:scale(.6);opacity:0;
    transition:transform .38s cubic-bezier(.34,1.56,.64,1),opacity .25s ease}

  /* Icons sit in a soft round badge that tilts up on hover. */
  .shell-header .shell-navigation > .shell-tab > svg,
  .shell-header .shell-group > summary > svg{width:34px;height:34px;padding:7px;border-radius:50%;background:#e3eefb!important;color:#0a63c9;
    transition:transform .4s cubic-bezier(.34,1.56,.64,1),background-color .25s ease,color .25s ease}
  .shell-header .shell-group[data-shell-group="payroll"] > summary > svg{padding:6px}
  .shell-header .shell-group[data-shell-group="payroll"] > summary > svg > rect{fill:none;stroke:currentColor}
  .shell-header .shell-group[data-shell-group="payroll"] > summary > svg > path{stroke:currentColor;stroke-width:2}

  /* Hover and open: the pill grows in and the text turns white. */
  .shell-header .shell-navigation > .shell-tab:hover,
  .shell-header .shell-group > summary:hover,
  .shell-header .shell-group[open] > summary{color:#fff!important}
  .shell-header .shell-navigation > .shell-tab:hover::before,
  .shell-header .shell-group > summary:hover::before,
  .shell-header .shell-group[open] > summary::before{transform:scale(1);opacity:1}
  .shell-header .shell-navigation > .shell-tab:hover > svg,
  .shell-header .shell-group > summary:hover > svg,
  .shell-header .shell-group[open] > summary > svg{background:rgba(255,255,255,.2)!important;color:#fff;transform:translateY(-1px) rotate(-8deg) scale(1.06)}

  /* Current section: the pill stays on, with a slow shimmer; hovering it turns it white like the reference. */
  .shell-header .shell-navigation > .shell-tab.is-active,
  .shell-header .shell-group.is-active > summary{color:#fff!important}
  .shell-header .shell-navigation > .shell-tab.is-active::before,
  .shell-header .shell-group.is-active > summary::before{transform:scale(1);opacity:1;animation:rwMenuShimmer 6s ease-in-out infinite}
  .shell-header .shell-navigation > .shell-tab.is-active > svg,
  .shell-header .shell-group.is-active > summary > svg{background:rgba(255,255,255,.22)!important;color:#fff}
  .shell-header .shell-navigation > .shell-tab.is-active:hover,
  .shell-header .shell-group.is-active:not([open]) > summary:hover{color:#0a63c9!important}
  .shell-header .shell-navigation > .shell-tab.is-active:hover::before,
  .shell-header .shell-group.is-active:not([open]) > summary:hover::before{background:#fff;box-shadow:0 10px 24px -8px rgba(11,59,122,.45),inset 0 0 0 1px #cfe0f2}
  .shell-header .shell-navigation > .shell-tab.is-active:hover > svg,
  .shell-header .shell-group.is-active:not([open]) > summary:hover > svg{background:var(--rw-menu-pill)!important;color:#fff}

  .shell-header .shell-group > summary .shell-chevron{transition:transform .3s ease}
  .shell-header .shell-group[open] > summary .shell-chevron{transform:rotate(180deg) translateY(-2px)}

  /* Dropdown panel and its links. */
  .shell-header .shell-group[open] > .shell-menu{top:calc(100% + 10px);transform-origin:top left;
    box-shadow:0 22px 44px -18px rgba(11,59,122,.45),0 0 0 1px #d4e3f3;animation:rwMenuIn .3s cubic-bezier(.2,.8,.2,1) both}
  .shell-header .shell-group:last-child[open] > .shell-menu{transform-origin:top right}
  .shell-header .shell-group[open] > .shell-menu a{position:relative;transition:background-color .2s ease,color .2s ease,transform .25s ease;animation:rwMenuItem .34s cubic-bezier(.2,.8,.2,1) both}
  .shell-header .shell-group[open] > .shell-menu a:nth-child(2){animation-delay:.03s}
  .shell-header .shell-group[open] > .shell-menu a:nth-child(3){animation-delay:.06s}
  .shell-header .shell-group[open] > .shell-menu a:nth-child(4){animation-delay:.09s}
  .shell-header .shell-group[open] > .shell-menu a:nth-child(5){animation-delay:.12s}
  .shell-header .shell-group[open] > .shell-menu a:nth-child(6){animation-delay:.15s}
  .shell-header .shell-group[open] > .shell-menu a:nth-child(7){animation-delay:.18s}
  .shell-header .shell-group[open] > .shell-menu a:nth-child(n+8){animation-delay:.21s}
  .shell-header .shell-menu a svg{transition:transform .3s cubic-bezier(.34,1.56,.64,1),color .2s ease}
  .shell-header .shell-menu a:hover{transform:translateX(4px);background:linear-gradient(90deg,#e6f1fd,#eefaf9);color:#0a63c9}
  .shell-header .shell-menu a:hover svg{color:#00a0ab;transform:scale(1.15)}
  .shell-header .shell-menu a[aria-current]{background:linear-gradient(90deg,#e3effc,#f2f8fe);box-shadow:none}
  .shell-header .shell-menu a[aria-current]::before{content:"";position:absolute;left:0;top:7px;bottom:7px;width:3px;border-radius:3px;background:var(--rw-menu-pill)}

  html[data-theme="dark"] .shell-header .shell-navigation{background:rgba(19,33,49,.85);box-shadow:inset 0 0 0 1px #2a3d55,0 12px 28px -18px #000}
  html[data-theme="dark"] .shell-header .shell-navigation > .shell-tab:not(.is-active):not(:hover),
  html[data-theme="dark"] .shell-header .shell-group:not(.is-active):not([open]) > summary:not(:hover){color:#d8e7ff!important}
  html[data-theme="dark"] .shell-header .shell-navigation > .shell-tab > svg,
  html[data-theme="dark"] .shell-header .shell-group > summary > svg{background:#1c3048!important;color:#9bc9ff}
  html[data-theme="dark"] .shell-header .shell-menu a:hover,
  html[data-theme="dark"] .shell-header .shell-menu a[aria-current]{background:#1c3048;color:#9bc9ff}
}

@keyframes rwMenuShimmer{0%,100%{background-position:0% 50%}50%{background-position:100% 50%}}
@keyframes rwMenuIn{from{opacity:0;transform:translateY(-8px) scale(.97)}to{opacity:1;transform:none}}
@keyframes rwMenuItem{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}

@media (prefers-reduced-motion:reduce){
  .shell-header .shell-navigation *,.shell-header .shell-navigation *::before{animation:none!important;transition:none!important}
}

/* With Company Setup the menu has up to seven groups. Between 1151px and 1750px the header makes room instead of letting the
   menu overflow onto the search: search becomes a round icon, the account shows its avatar only, and the pills tighten.
   Measured at 1750, 1536, 1366, 1280 and 1160px with seven groups. */
@media (min-width:1151px) and (max-width:1750px){
  .shell-header .shell-search{width:44px;height:44px;padding:0;justify-content:center;gap:0;border-radius:50%!important}
  .shell-header .shell-search > span{display:none}
  .shell-header .shell-identity{display:none}
  .shell-header .shell-account{padding-left:10px;margin-left:0}
  .shell-header .shell-account > summary{gap:4px}
  .shell-header .shell-actions{gap:4px}
  .shell-header .shell-navigation{gap:2px;padding:4px;margin-right:6px}
  .shell-header .shell-navigation > .shell-tab,
  .shell-header .shell-group > summary{padding:4px 10px 4px 4px;gap:5px;min-height:44px;font-size:14px!important}
  .shell-header .shell-navigation > .shell-tab > svg,
  .shell-header .shell-group > summary > svg{width:32px;height:32px;padding:7px}
}
@media (min-width:1151px) and (max-width:1450px){
  .shell-header .shell-brand > span:last-child{display:none}
  .shell-header .shell-brand{padding-right:10px}
  .shell-header .shell-navigation > .shell-tab,
  .shell-header .shell-group > summary{padding:4px 8px 4px 4px;font-size:13.5px!important}
  .shell-header .shell-navigation > .shell-tab > svg,
  .shell-header .shell-group > summary > svg{width:28px;height:28px;padding:6px}
}
@media (min-width:1151px) and (max-width:1260px){
  .shell-header .shell-navigation > .shell-dashboard{padding:4px}
  .shell-header .shell-navigation > .shell-dashboard > span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .shell-header .shell-navigation > .shell-tab,
  .shell-header .shell-group > summary{padding-right:7px}
}
