/* ========================================
   HIDE WORKBOOK POPUP AND MANUS BADGE
   ======================================== */

/* ===== HIDE THE WORKBOOK BUNDLE POPUP ===== */
/* Hide any dialog/modal elements */
[role="dialog"],
[role="alertdialog"],
dialog {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Hide modal backdrop/overlay */
[class*="backdrop"],
[class*="overlay"],
[class*="modal-backdrop"],
.modal-backdrop,
.overlay {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Prevent body scroll lock from modals */
body {
    overflow: auto !important;
}

/* ===== HIDE "MADE WITH MANUS" BADGE ===== */
/* Hide the Manus badge button */
button[aria-label*="Made with Manus"],
button[aria-label*="made with manus"],
a[href*="manus.im"],
[class*="manus-badge"],
#manus-badge,
.manus-watermark,
footer-watermark,
#manus-previewer-root,
[id*="manus-previewer"],
[class*="footer-watermark"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Hide any button or element containing "Made with Manus" text */
button:has(*:contains("Made with Manus")),
a:has(*:contains("Made with Manus")),
div:has(*:contains("Made with Manus")) {
    display: none !important;
}

/* More specific selectors for Manus branding */
*[class*="ManusButton"],
*[class*="manus-button"],
*[id*="manus-button"],
*[class*="ManusWatermark"],
*[class*="manus-watermark"] {
    display: none !important;
}

/* Hide shadow DOM elements */
footer-watermark,
footer-watermark * {
    display: none !important;
}

/* Hide fixed position elements in bottom right that might be the badge */
[style*="position: fixed"][style*="bottom"][style*="right"]:has(button),
[style*="position: fixed"][style*="bottom"][style*="right"]:has(a) {
    /* Only hide if it's small (likely a badge) */
    max-width: 200px;
}

/* Additional catch-all for bottom-right fixed elements with Manus */
[style*="position: fixed"][style*="bottom"][style*="right"][aria-label*="Manus"],
[style*="position: fixed"][style*="bottom"][style*="right"][aria-label*="manus"] {
    display: none !important;
}

/* ===== PREVENT POPUP FROM SHOWING ===== */
/* Hide any element that might trigger or contain the popup */
[data-popup],
[data-modal],
[data-dialog] {
    display: none !important;
}

/* Remove any Manus-related scripts or iframes */
iframe[src*="manus"],
script[src*="manus"] {
    display: none !important;
}
