/**
 * Chery Event Popup Blocker - Targeted Anti-Flicker Stylesheet
 *
 * Specifically targets and suppresses the CEO welcome modal and its backdrop
 * without affecting gallery lightboxes, video viewers, or form popups.
 *
 * @package Chery_Popup_Blocker
 * @version 1.0.0
 */

/* 1. Target the CEO dialog specifically */
.ceo-dialog,
div[role="dialog"][aria-labelledby="ceo-title"],
.chery-portal:has(.ceo-dialog),
.chery-portal:has(#ceo-title) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    max-height: 0 !important;
    max-width: 0 !important;
    overflow: hidden !important;
    z-index: -9999 !important;
}

/* 2. Target the backdrop specifically associated with the CEO modal */
.chery-portal:has(.ceo-dialog) [data-backdrop],
.chery-portal:has(#ceo-title) [data-backdrop] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* 3. Safety guarantee: Explicitly ensure legitimate gallery lightbox and video player remain visible */
.chery-portal:has([aria-label="Image viewer"]),
div[role="dialog"][aria-label="Image viewer"],
.chery-portal:has(.viewer-player),
div[role="dialog"][aria-label*="film"] {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: 50 !important;
}
