/* =========================================================
   ASTROLOOP MISSION CONTROL FRONT-COVER FIX
   Version: 20260907-front-cover-removal-3

   Removes obsolete full-page meal/chat overlays while
   retaining the Unified Mission Control popup.
   ========================================================= */


/* ---------------------------------------------------------
   Permanently suppress obsolete meal-file front pages.
   Upload and generation remain available in Unified Mission
   Control.
   --------------------------------------------------------- */

html body #al-meal-artifacts-panel,
html body #al-meal-box,
html body #al-meal-embedded-panel,
html body #al-meal-toggle,

html body [data-al-meal-legacy-panel],
html body .al-meal-legacy-panel,
html body .mission-meal-files-page,
html body .mission-meal-files-overlay {
    display:
        none !important;

    visibility:
        hidden !important;

    opacity:
        0 !important;

    pointer-events:
        none !important;

    position:
        absolute !important;

    left:
        -100000px !important;

    top:
        -100000px !important;

    width:
        0 !important;

    height:
        0 !important;

    min-width:
        0 !important;

    min-height:
        0 !important;

    max-width:
        0 !important;

    max-height:
        0 !important;

    margin:
        0 !important;

    padding:
        0 !important;

    border:
        0 !important;

    overflow:
        hidden !important;
}


/* ---------------------------------------------------------
   Unified Mission Control anchor.

   The root itself remains the compact lower-left bubble.
   The chat window is absolutely positioned above it rather
   than participating in page layout.
   --------------------------------------------------------- */

html body #al-mc4-root {
    position:
        fixed !important;

    left:
        18px !important;

    right:
        auto !important;

    top:
        auto !important;

    bottom:
        82px !important;

    width:
        154px !important;

    height:
        70px !important;

    min-width:
        154px !important;

    min-height:
        70px !important;

    max-width:
        154px !important;

    max-height:
        70px !important;

    margin:
        0 !important;

    padding:
        0 !important;

    overflow:
        visible !important;

    background:
        transparent !important;

    border:
        0 !important;

    z-index:
        2147483000 !important;

    pointer-events:
        none !important;
}


html body #al-mc4-toggle {
    position:
        absolute !important;

    left:
        0 !important;

    right:
        auto !important;

    top:
        0 !important;

    bottom:
        auto !important;

    width:
        154px !important;

    height:
        70px !important;

    min-width:
        154px !important;

    max-width:
        154px !important;

    min-height:
        70px !important;

    max-height:
        70px !important;

    margin:
        0 !important;

    pointer-events:
        auto !important;
}


/* ---------------------------------------------------------
   Unified chat window.

   This is the only permitted Mission Control popup.
   It must never occupy the whole Open MCT viewport.
   --------------------------------------------------------- */

html body #al-mc4-window {
    position:
        absolute !important;

    left:
        0 !important;

    right:
        auto !important;

    top:
        auto !important;

    bottom:
        80px !important;

    width:
        min(
            485px,
            calc(100vw - 40px)
        ) !important;

    height:
        min(
            670px,
            calc(100vh - 180px)
        ) !important;

    min-width:
        340px !important;

    min-height:
        360px !important;

    max-width:
        calc(100vw - 40px) !important;

    max-height:
        calc(100vh - 180px) !important;

    margin:
        0 !important;

    padding:
        0 !important;

    overflow:
        hidden !important;

    background:
        #202324 !important;

    background-color:
        #202324 !important;

    background-image:
        none !important;

    border:
        1px solid #555b5e !important;

    opacity:
        1 !important;

    visibility:
        visible !important;

    pointer-events:
        auto !important;

    z-index:
        2147483500 !important;

    transform:
        none !important;

    inset:
        auto auto 80px 0 !important;
}


/*
 * A closed Mission Control window must occupy no space.
 */
html body #al-mc4-window[hidden] {
    display:
        none !important;

    visibility:
        hidden !important;

    opacity:
        0 !important;

    pointer-events:
        none !important;
}


/*
 * An open Mission Control window uses its proper flex
 * structure.
 */
html body #al-mc4-window:not([hidden]) {
    display:
        flex !important;

    flex-direction:
        column !important;
}


/* ---------------------------------------------------------
   Protect Open MCT from stale modal page styles.
   --------------------------------------------------------- */

html body #openmct-app,
html body .l-shell,
html body .l-shell__main,
html body .l-shell__pane-main,
html body .l-shell__main-container,
html body .js-main-container,
html body .c-object-view {
    visibility:
        visible !important;

    opacity:
        1 !important;
}


/* ---------------------------------------------------------
   Known obsolete overlay classes.
   --------------------------------------------------------- */

html body .mission-control-front-cover,
html body .mission-control-full-page,
html body .mission-control-page-cover,
html body .mission-control-legacy-overlay,
html body .astroloop-chat-front-page,
html body .astroloop-meal-front-page {
    display:
        none !important;

    visibility:
        hidden !important;

    opacity:
        0 !important;

    pointer-events:
        none !important;
}


/* ---------------------------------------------------------
   No visual pulse is introduced by this repair.
   --------------------------------------------------------- */

html body #al-mc4-root,
html body #al-mc4-root * {
    animation:
        none !important;

    transition:
        none !important;
}
