/* Only the bar is pinned (sticky-top). Nothing else on the page is. */
.medicnet-masq-bar {
  --mn-masq-bar-h: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
  width: 100%;
  margin: 0;
  padding: 0.4rem 1rem;
  box-sizing: border-box;
  background: #c2410c;
  color: #fff7ed;
  font-size: 0.8125rem;
  line-height: 1.35;
  border-bottom: 1px solid #9a3412;
  position: sticky;
  top: 0;
  z-index: 1040;
}

/* simple_b5 leftover .fixed-top: unpin the nav only while the bar is up. */
body:has(.medicnet-masq-bar) header .navbar:not(.mn-navbar) {
  position: relative;
  top: auto;
}

/*
 * simple_b5's body is h-100 (one viewport tall) and the page overflows it, so a
 * sticky child would let go after the first screen. Let body grow with the page
 * while the bar is up; the canvas keeps filling short pages so the footer stays put.
 */
body.h-100:has(.medicnet-masq-bar) {
  height: auto !important;
  min-height: 100%;
}
body.h-100:has(.medicnet-masq-bar) > .dialog-off-canvas-main-canvas {
  flex: 1 1 auto;
}

/*
 * medicnet_tailwind pins the header (sticky top-0) and the inner navbar
 * (chrome.css .mn-navbar.navbar { position: sticky }). Unstick both so only
 * the masquerade bar stays pinned.
 */
body:has(.medicnet-masq-bar) .mn-site-header,
body:has(.medicnet-masq-bar) .mn-navbar.navbar {
  position: relative;
  top: auto;
}

.medicnet-masq-bar__label {
  flex: 1 1 auto;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.medicnet-masq-bar__action {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.7rem;
  border-radius: 9999px;
  background: #fff7ed;
  color: #9a3412 !important;
  font-weight: 700;
  font-size: 0.75rem;
  text-decoration: none !important;
  white-space: nowrap;
}

.medicnet-masq-bar__action:hover,
.medicnet-masq-bar__action:focus {
  background: #fff;
  color: #7c2d12 !important;
}

.medicnet-masq-bar__user {
  color: #fff !important;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.medicnet-masq-bar__user:hover,
.medicnet-masq-bar__user:focus {
  color: #ffedd5 !important;
}

.medicnet-masquerade-cluster,
.medicnet-masquerade-who {
  display: none !important;
}
