/* ELIZNA ADMIN PORTAL R2 — ROUTING ACTIVE-STATE REPAIR */

/*
 * Force center navigation to look inactive unless it is the current center.
 * We target both the link and its cloned wrapper because the existing Admin
 * shell may apply selected styling to either element.
 */
[data-elizna-r2-force-inactive="true"] {
  background: transparent !important;
  box-shadow: none !important;
}

[data-elizna-r2-force-inactive="true"]::before,
[data-elizna-r2-force-inactive="true"]::after {
  box-shadow: none !important;
}

/* Current center gets one and only one selected visual state. */
[data-elizna-r2-force-active="true"] {
  background: #ebe4d5 !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

/*
 * When one of the dedicated centers is active, Commerce Intelligence is a
 * sibling destination, not the selected parent destination.
 */
html[data-elizna-admin-route-kind="amazon_business_center"]
  [data-elizna-r2-force-inactive="true"],
html[data-elizna-admin-route-kind="marketplace_center"]
  [data-elizna-r2-force-inactive="true"] {
  background: transparent !important;
}

/*
 * Prevent a stale center from visually surviving a route transition even
 * during the few milliseconds before the lifecycle repair removes its DOM.
 */
html[data-elizna-admin-route-kind="native_admin"]
  #elizna-amazon-business-center,
html[data-elizna-admin-route-kind="native_admin"]
  #elizna-marketplace-center {
  display: none !important;
}
