/**
 * AI Assistant — Shortcode/iframe context styles
 *
 * Companion to ai_advisor_shortcode.js. The JS expands the parent iframe
 * element to viewport-fullscreen while the AI Assistant panel is open;
 * these styles polish the iframe-internal experience during that state.
 *
 * Scoped to body.fb-iframe-ai-active so they only apply while expanded
 * — non-iframe contexts and closed-state are unaffected.
 *
 * No styling on the original .fb-advisor-* selectors here — the protected
 * ai_advisor.css already handles the panel chrome correctly once the
 * iframe viewport equals the page viewport.
 */

/* When iframe is expanded to viewport, kill any leftover body padding
   from embed_wrapper.php's clean-embed body styling so the form fills
   the page and the panel slides flush from the right edge. */
body.fb-iframe-ai-active {
    padding: 0 15px;
}

/* While the iframe is fullscreen, prevent inner-page scroll jumping
   when the messages area scrolls — only the panel's own messages area
   should scroll. */
body.fb-iframe-ai-active {
    overscroll-behavior: contain;
}

/* Slight visual signal that iframe is in expanded state — soft top
   gradient strip so it doesn't feel like a context-less fullscreen. */
body.fb-iframe-ai-active::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--at-color-muted) 0%, var(--at-color-muted-foreground) 50%, var(--at-color-muted) 100%);
    z-index: 10000;
    pointer-events: none;
}

/* =====================================================
   FLATTEN CARD CHROME
   When embedded via shortcode, the form should sit natively on the
   host page — no rounded corners or floating-card look. The iframe
   element's own border is neutralised in ai_advisor_shortcode.js
   (CSS inside the iframe cannot reach a parent-doc element); these
   rules handle the inner form chrome.
   ===================================================== */
html body .panel_s.fb-form-container {
    border-radius: 0;
}
