/* 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;
}
