/* The NOW Software Solutions umbrella elements: the thin bar above the site
   header (the reserved app-switcher slot) and the attribution strip under the
   footer. This file ships unchanged in every NOW repo, so it uses its own
   neutral tokens and a system font rather than any one site's brand, and it is
   unlayered with prefixed class names so no site's styles collide with it.
   docs/ecosystem/umbrella-and-app-switcher.md */

:root {
  --umbrella-bar-height: 2rem;
  --umbrella-bg: #0b0b0f;
  --umbrella-fg: #e8e8ee;
  --umbrella-muted: #a0a0ad;
  --umbrella-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.umbrella-bar {
  position: relative;
  z-index: 200;
  height: var(--umbrella-bar-height);
  background-color: var(--umbrella-bg);
  color: var(--umbrella-fg);
  font-family: var(--umbrella-font);
  font-size: 0.75rem;
  line-height: 1;
}

.umbrella-bar__inner {
  height: 100%;
  width: min(1200px, calc(100% - 2rem));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.umbrella-bar__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--umbrella-fg);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.umbrella-bar__brand:hover,
.umbrella-bar__brand:focus-visible {
  text-decoration: underline;
}

.umbrella-bar__brand img {
  display: block;
  width: 20px;
  height: auto;
}

.umbrella-bar__slot {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.umbrella-footer {
  background-color: var(--umbrella-bg);
  color: var(--umbrella-muted);
  font-family: var(--umbrella-font);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.umbrella-footer__inner {
  width: min(1200px, calc(100% - 2rem));
  margin-inline: auto;
  padding-block: 0.75rem;
  text-align: center;
}

.umbrella-footer p {
  margin: 0;
}

/* The umbrella site's variant: a wrapping row of product links. */
.umbrella-footer .umbrella-footer__list {
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  gap: 0.25rem 1rem;
}

.umbrella-footer a {
  color: var(--umbrella-fg);
  text-decoration: none;
}

.umbrella-footer a:hover,
.umbrella-footer a:focus-visible {
  text-decoration: underline;
}

/* ------------------------------------------------------------------------
   Typography lock. A host site's CSS must never change how these elements
   look — they are the one part of every NOW site that is meant to be
   identical. Some host CSS styles bare elements with !important (the
   reconcoach template forces `font-family: 'Roboto' !important` on div, span,
   p and a, and `color: #000 !important` on body), which beats ordinary rules.
   So the umbrella's own typography is declared !important too. These selectors
   are more specific than any bare-element rule, so they win either way.
   Pixel sizes, not rem, so a host's root font size cannot change them either.
   ------------------------------------------------------------------------ */

.umbrella-bar,
.umbrella-bar *,
.umbrella-footer,
.umbrella-footer * {
  font-family: var(--umbrella-font) !important;
  font-style: normal !important;
  font-weight: 400 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  text-shadow: none !important;
}

.umbrella-bar,
.umbrella-bar * {
  font-size: 12px !important;
  line-height: 1 !important;
  color: var(--umbrella-fg) !important;
}

.umbrella-bar__brand,
.umbrella-bar__brand * {
  letter-spacing: 0.02em !important;
}

.umbrella-footer,
.umbrella-footer * {
  font-size: 13px !important;
  line-height: 1.5 !important;
  color: var(--umbrella-muted) !important;
}

.umbrella-footer a {
  color: var(--umbrella-fg) !important;
}

/* Layout lock, for the same reason: host CSS may align, space or underline bare
   elements (the reconcoach template left-aligns every <p>). */

.umbrella-bar *,
.umbrella-footer * {
  text-decoration: none !important;
}

.umbrella-bar__brand:hover,
.umbrella-bar__brand:focus-visible,
.umbrella-bar__brand:hover *,
.umbrella-bar__brand:focus-visible *,
.umbrella-footer a:hover,
.umbrella-footer a:focus-visible {
  text-decoration: underline !important;
}

.umbrella-bar p,
.umbrella-footer p {
  margin: 0 !important;
  padding: 0 !important;
}

.umbrella-footer,
.umbrella-footer * {
  text-align: center !important;
}

/* ------------------------------------------------------------------------
   The account menu ("Sign in with NOW", partials/account_menu). Signed out it
   is one link; signed in, a <details> dropdown with no script. Locked like the
   rest of the bar, because host CSS styles bare buttons, forms and lists.
   ------------------------------------------------------------------------ */

/* The open dropdown hangs below the bar, over the host's header. Host
   headers stack high (the reconcoach template's fixed header painted over
   the panel at the bar's own z-index of 200), so the bar outranks them. It is
   not fixed, so this only matters where something overlaps it. */
.umbrella-bar {
  z-index: 10000 !important;
}

.umbrella-bar .umbrella-account {
  position: relative !important;
  margin: 0 !important;
  padding: 0 !important;
}

.umbrella-bar .umbrella-account__toggle {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  max-width: 16rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  cursor: pointer;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.umbrella-bar .umbrella-account__toggle::-webkit-details-marker {
  display: none;
}

.umbrella-bar .umbrella-account__toggle::after {
  content: "\25BE";
  color: var(--umbrella-muted) !important;
}

.umbrella-bar .umbrella-account__panel {
  position: absolute !important;
  top: calc(100% + 0.6rem) !important;
  right: 0 !important;
  min-width: 14rem;
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  margin: 0 !important;
  padding: 0.35rem 0 !important;
  background-color: var(--umbrella-bg) !important;
  border: 1px solid #2a2a33 !important;
  border-radius: 6px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
  text-align: left !important;
}

.umbrella-bar .umbrella-account__email {
  padding: 0.5rem 0.9rem 0.6rem !important;
  color: var(--umbrella-muted) !important;
  border-bottom: 1px solid #2a2a33 !important;
  margin-bottom: 0.3rem !important;
  overflow-wrap: anywhere;
}

.umbrella-bar .umbrella-account__form {
  margin: 0 !important;
  padding: 0 !important;
}

.umbrella-bar .umbrella-account__item {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0.5rem 0.9rem !important;
  background: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  text-align: left !important;
  cursor: pointer;
}

.umbrella-bar .umbrella-account__item:hover,
.umbrella-bar .umbrella-account__item:focus-visible,
.umbrella-bar .umbrella-account__signin:hover,
.umbrella-bar .umbrella-account__signin:focus-visible,
.umbrella-bar .umbrella-account__toggle:hover,
.umbrella-bar .umbrella-account__toggle:focus-visible {
  text-decoration: underline !important;
}

/* ------------------------------------------------------------------------
   The app switcher ("NOW apps", partials/app_switcher, Stage 4.7). A
   <details> with no script, left of the account menu. Locked like the rest
   of the bar. Below 640px the panel spans the whole bar's width (G60 d). The
   tile colours are shared with app.css's shell variant; keep them in step.
   ------------------------------------------------------------------------ */

.umbrella-bar .app-switcher {
  position: relative !important;
  margin: 0 !important;
  padding: 0 !important;
}

.umbrella-bar .app-switcher__toggle {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 22px;
  height: 22px;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 4px !important;
  cursor: pointer;
  list-style: none !important;
}

.umbrella-bar .app-switcher__toggle::-webkit-details-marker {
  display: none;
}

.umbrella-bar .app-switcher__toggle:hover,
.umbrella-bar .app-switcher__toggle:focus-visible,
.umbrella-bar .app-switcher[open] > .app-switcher__toggle {
  background-color: #2a2a33 !important;
}

/* Nine dots drawn in CSS: no image, no icon font. */
.umbrella-bar .app-switcher__grid {
  display: block !important;
  width: 14px;
  height: 14px;
  background-image: radial-gradient(circle, var(--umbrella-fg) 1.4px, transparent 1.6px) !important;
  background-size: 5px 5px !important;
  background-position: -0.5px -0.5px !important;
}

.umbrella-bar .app-switcher__hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

.umbrella-bar .app-switcher__panel {
  position: absolute !important;
  top: calc(100% + 0.5rem) !important;
  right: 0 !important;
  width: 20rem;
  max-width: calc(100vw - 2rem);
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
  display: block !important;
  margin: 0 !important;
  padding: 0.35rem 0 !important;
  background-color: var(--umbrella-bg) !important;
  border: 1px solid #2a2a33 !important;
  border-radius: 6px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
  text-align: left !important;
}

.umbrella-bar .app-switcher__heading {
  padding: 0.6rem 0.9rem 0.35rem !important;
  color: var(--umbrella-muted) !important;
}

.umbrella-bar .app-switcher__separator {
  height: 0 !important;
  margin: 0.35rem 0 !important;
  border: 0 !important;
  border-top: 1px solid #2a2a33 !important;
}

.umbrella-bar .app-switcher__list {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.umbrella-bar .app-switcher__list li {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.umbrella-bar .app-switcher__item {
  display: flex !important;
  align-items: center !important;
  gap: 0.7rem !important;
  padding: 0.5rem 0.9rem !important;
}

.umbrella-bar .app-switcher__item:hover,
.umbrella-bar .app-switcher__item:focus-visible {
  background-color: #1c1c24 !important;
}

.umbrella-bar .app-switcher__item:hover .app-switcher__name,
.umbrella-bar .app-switcher__item:focus-visible .app-switcher__name {
  text-decoration: underline !important;
}

.umbrella-bar .app-switcher__text {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.2rem !important;
  min-width: 0;
}

.umbrella-bar .app-switcher__name {
  font-size: 13px !important;
  line-height: 1.25 !important;
}

.umbrella-bar .app-switcher__tagline,
.umbrella-bar .app-switcher__note {
  line-height: 1.3 !important;
  color: var(--umbrella-muted) !important;
}

.umbrella-bar .app-switcher__note--badge {
  align-self: flex-start;
  padding: 2px 6px !important;
  border: 1px solid #3a3a45 !important;
  border-radius: 999px !important;
  font-size: 11px !important;
}

.umbrella-bar .app-switcher__tile {
  display: inline-flex !important;
  flex: 0 0 32px;
  align-items: center !important;
  justify-content: center !important;
  width: 32px;
  height: 32px;
  border-radius: 6px !important;
  background-color: #3a3a45;
  color: #ffffff !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em !important;
}

.umbrella-bar .app-switcher__tile--nss { background-color: #33333d !important; }
.umbrella-bar .app-switcher__tile--agent_portal { background-color: #0f766e !important; }
.umbrella-bar .app-switcher__tile--qrcode { background-color: #b8084b !important; }
.umbrella-bar .app-switcher__tile--academy { background-color: #1d4ed8 !important; }

@media (max-width: 639.98px) {
  .umbrella-bar .app-switcher {
    position: static !important;
  }

  .umbrella-bar .app-switcher__panel {
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    width: auto;
    max-width: none;
    border-radius: 0 0 6px 6px !important;
  }
}
