/* e-Shared-31 — component references: hidden by default, desktop-only and vertically aligned with Back to top. */
/* e-Shared-31 — eye control integrated at the far right of the federated menu. */
.shared-reference-toggle {
  position: static;
  inset: auto;
  z-index: auto;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--radius-small, 8px);
  background: transparent;
  color: #fff;
  box-shadow: none;
  cursor: pointer;
  transition: background-color .18s ease;
}
.shared-reference-toggle:hover,
.shared-reference-toggle:focus-visible {
  background: rgba(255,255,255,.14);
  color: #fff;
}
.shared-reference-toggle:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.shared-reference-toggle svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
body.shared-nav-collapsed .shared-reference-toggle { display: none !important; }
@media (max-width: 900px) {
  .shared-reference-toggle { display: none !important; }
}
.shared-reference-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
  display: none;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: var(--border-small) solid var(--color-mellentaane-light);
  border-radius: var(--r-pill);
  background: rgba(255,255,255,.97);
  color: var(--color-mellentaane-dark);
  font: 700 12px/1 var(--font);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
/* Section references occupy their own line outside the section box. */
.shared-section-reference-wrap { position: relative; margin-top: 30px !important; }
.shared-section-reference-wrap > .shared-reference-badge {
  top: -28px;
  right: 0;
  background: var(--color-mellentaane-pale);
  box-shadow: none;
}
.shared-references-visible [data-component-id] {
  position: relative;
  outline: 1px dashed rgba(167,21,40,.38);
  outline-offset: 3px;
}
.shared-references-visible .shared-reference-badge { display: inline-flex; }
.shared-reference-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 611;
  transform: translateX(-50%);
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--ink-950);
  color: #fff;
  font: 600 14px/1.2 var(--font);
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease;
}
.shared-reference-toast.is-visible { opacity: 1; }
button[data-component-id], a.button[data-component-id], .button[data-component-id] { position: relative; }
button[data-component-id] > .shared-reference-badge,
a.button[data-component-id] > .shared-reference-badge,
.button[data-component-id] > .shared-reference-badge { top: -22px; right: 0; }
@media (max-width: 900px) {
  .shared-reference-toggle,
  .shared-reference-badge,
  .shared-reference-toast { display: none !important; }
  .shared-references-visible [data-component-id] { outline: none !important; }
  .shared-section-reference-wrap { margin-top: inherit !important; }
}
@media print {
  .shared-reference-toggle,
  .shared-reference-badge,
  .shared-reference-toast { display: none !important; }
  .shared-references-visible [data-component-id] { outline: none !important; }
}


/* e-Shared-31 — navigation is infrastructure, not referenced page content. */
.site-header .shared-reference-badge,
.site-sidebar .shared-reference-badge,
.shared-mobile-primary-nav .shared-reference-badge,
.shared-nav-overlay .shared-reference-badge,
[data-shared-reference-exclude] .shared-reference-badge { display: none !important; }
.shared-references-visible .site-header [data-component-id],
.shared-references-visible .site-sidebar [data-component-id],
.shared-references-visible .shared-mobile-primary-nav [data-component-id],
.shared-references-visible .shared-nav-overlay[data-component-id],
.shared-references-visible [data-shared-reference-exclude] [data-component-id] {
  outline: none !important;
  outline-offset: 0 !important;
}
body[data-layout*="viewer"] .shared-reference-toggle,
body:has(.dedicated-viewer) .shared-reference-toggle,
body:has(.presentation-viewer) .shared-reference-toggle { display: none !important; }


/* e-Shared-31 — the main content surface is explicitly white. */
:root { --content-background-color: #ffffff; }
.page-content { background-color: var(--content-background-color) !important; }

/* e-Shared-31 — viewers never display any reference interface. */
body[data-layout*="viewer"] .shared-reference-toggle,
body[data-layout*="viewer"] .shared-reference-badge,
body[data-layout*="viewer"] .shared-reference-toast,
body:has(.dedicated-viewer) .shared-reference-toggle,
body:has(.dedicated-viewer) .shared-reference-badge,
body:has(.dedicated-viewer) .shared-reference-toast,
body:has(.presentation-viewer) .shared-reference-toggle,
body:has(.presentation-viewer) .shared-reference-badge,
body:has(.presentation-viewer) .shared-reference-toast,
.dedicated-viewer .shared-reference-toggle,
.dedicated-viewer .shared-reference-badge,
.presentation-viewer .shared-reference-toggle,
.presentation-viewer .shared-reference-badge,
[data-viewer-root] .shared-reference-toggle,
[data-viewer-root] .shared-reference-badge {
  display: none !important;
}
body[data-layout*="viewer"] [data-component-id],
body:has(.dedicated-viewer) [data-component-id],
body:has(.presentation-viewer) [data-component-id],
.dedicated-viewer [data-component-id],
.presentation-viewer [data-component-id],
[data-viewer-root] [data-component-id] {
  outline: none !important;
  outline-offset: 0 !important;
}
body[data-layout*="viewer"] .shared-section-reference-wrap,
body:has(.dedicated-viewer) .shared-section-reference-wrap,
body:has(.presentation-viewer) .shared-section-reference-wrap,
.dedicated-viewer .shared-section-reference-wrap,
.presentation-viewer .shared-section-reference-wrap,
[data-viewer-root] .shared-section-reference-wrap {
  margin-top: inherit !important;
}
