/*
 * AQUILA_ACCOUNTING_SUBMODULE_RECOVERY_R2
 *
 * Presentation support only.
 *
 * Accounting Overview remains canonical.
 * Existing native Accounting workspace becomes visible only while
 * one of its existing submodules is active.
 */

/* Canonical Overview leaves the screen while a native submodule owns it. */
html[data-aquila-accounting-submodule-active]
  [data-aquila-accounting-reference-ui="1"],
[data-aquila-accounting-reference-ui="1"]
  [data-aquila-accounting-overview-suspended="1"] {
    display: none !important;
}

/* React/native Accounting engine remains alive and becomes visible only
   during the selected submodule lifecycle. */
.acct-workspace[data-aquila-accounting-submodule-active="1"],
[data-aquila-accounting-native-engine]
  [data-aquila-accounting-submodule-active="1"] {
    display: block !important;
    visibility: visible !important;
    position: static !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    opacity: 1 !important;
    overflow: visible !important;
    pointer-events: auto !important;
}

/* Existing Accounting suppression rules hide the native children while
   Overview is canonical. Restore only the direct native presentation
   container when a submodule has taken ownership. */
.acct-workspace[data-aquila-accounting-submodule-active="1"]
  > * {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Keep native Landed Cost workflow owners in the DOM but never show a
   second visual Quick Action. */
[data-aquila-accounting-hidden-action-owner="landed-cost"],
.acct-workspace[data-aquila-accounting-submodule-active="1"]
  [data-aquila-accounting-hidden-action-owner="landed-cost"] {
    display: none !important;
    visibility: hidden !important;
}
