/* CTD no site: blindagem contra o tema (carregado antes de afc-pagina.css e do CSS do app).
   Marca: fundo escuro, laranja #f16e02, creme. Nada aqui depende do tema (Astra/Elementor) — 0.1.2, 16/11/2026. */

/* 1) Isolamento: tudo dentro do CTD volta ao estilo padrão do navegador antes do CSS do app (igual à prévia).
   "#afc-app :where(...)" pesa (1,0,0): vence regras do tema feitas só de classes (".elementor-kit-35 h1",
   "input:not([type=button])...") e perde para as regras do app, que no plugin ganham o ID da raiz (montar_plugin.py,
   blindar_css: ".afc-app" vira "#afc-app.afc-app" e o resto ganha "#afc-app " na frente; em empate, o app vem depois).
   O SVG fica de fora: "all" anularia os atributos fill/stroke dos desenhos. */
#afc-app :where(*:not(svg, svg *)),
#afc-pagina :where(*:not(svg, svg *)) { all: revert; }
#afc-app :where(*:not(svg, svg *))::before, #afc-app :where(*:not(svg, svg *))::after { all: revert; }

/* 2) Página do CTD (classe "afc-ctd" no <body>, posta pelo plugin): fundo escuro de ponta a ponta, sem a faixa clara
   do tema, e o app sem as margens/recuos dos contêineres do Elementor. */
html:has(body.afc-ctd), body.afc-ctd { background: #0a0c0d !important; }
body.afc-ctd { margin: 0 !important; padding: 0 !important; background-image: none !important; }
body.afc-ctd .site-content, body.afc-ctd #content, body.afc-ctd .ast-container, body.afc-ctd .entry-content,
body.afc-ctd .elementor-section, body.afc-ctd .elementor-container, body.afc-ctd .elementor-column,
body.afc-ctd .elementor-widget-wrap, body.afc-ctd .elementor-element-populated, body.afc-ctd .elementor-widget-container,
body.afc-ctd .e-con, body.afc-ctd .e-con-inner {
  background: transparent !important; padding: 0 !important; margin: 0 !important; max-width: none !important;
  --padding-top: 0px; --padding-right: 0px; --padding-bottom: 0px; --padding-left: 0px; --gap: 0px; --row-gap: 0px; --column-gap: 0px;
}
body.afc-ctd .elementor-widget:not(:last-child) { margin-bottom: 0 !important; }
body.afc-ctd .elementor-section > .elementor-background-overlay, body.afc-ctd .e-con::before { display: none !important; }

/* 3) Balões e chats flutuantes de outros plugins ficam fora da página do CTD (cobriam o app no celular).
   WPChat (Smash Balloon) também tem o script retirado pelo plugin; o CSS cobre o HTML que ele já tenha posto. */
body.afc-ctd #wp-chat-floating, body.afc-ctd .wp-chat-frontend, body.afc-ctd [id^="wp-chat-"]:not(script):not(link):not(style),
body.afc-ctd .joinchat, body.afc-ctd #ht-ctc-chat, body.afc-ctd .ht-ctc, body.afc-ctd .wa__btn_popup, body.afc-ctd .wa__popup_chat_box {
  display: none !important;
}
