/* FMA website page canvas: applied only to pages that contain the permanent chat. */
html:has(> body.fma-chat-page),
body.fma-chat-page {
    background: #0b0b0b !important;
    color: #d8d8d8;
    color-scheme: dark;
}

body.fma-chat-page {
    min-height: 100vh;
    min-height: 100dvh;
}

/* Classic and block theme wrappers retain their layout and share the canvas. */
body.fma-chat-page :where(
    #page, #content, #primary, .site, .site-content, .site-main,
    .content-area, .content-container, .entry-content, .entry-header,
    .page-header, .wp-site-blocks, .wp-block-post-content, .widget-area,
    .ast-container, .ast-article-single, .inside-article, .site-inner
) {
    background: transparent !important;
}

/* Also cover builder/theme wrappers with their own white or image background. */
body.fma-chat-page :is(main, article, section, div):has([data-fma-chat-root]) {
    background: transparent !important;
}

body.fma-chat-page .elementor-element:has([data-fma-chat-root]) > .elementor-background-overlay {
    background: transparent !important;
}

body.fma-chat-page :where(.entry-title, .page-title, .wp-block-post-title) {
    color: #fff !important;
}

/* Match the chat's outer background to the website's black canvas. */
body.fma-chat-page .fma-chat-app {
    --bg: #0b0b0b;
    background: #0b0b0b;
}
