/* Invelo AI popup: site-integration overrides. The design itself lives in invelo-ai-chat.css (loaded
   scoped under #invelo-ai, see class-ivai-css.php). This file only (1) neutralises the theme / Elementor
   kit rules that style every <button>, <input>, <h2>… on the site, (2) keeps the popup above the sticky
   header, (3) styles the floating launcher, which is not part of the supplied design. */

/* 1. Reset inherited site styles inside the popup (design rules are #invelo-ai .class, so they win). */
#invelo-ai, #invelo-ai *, #invelo-ai *::before, #invelo-ai *::after { box-sizing: border-box; }
#invelo-ai button, #invelo-ai input { margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: inherit;
  font: inherit; line-height: normal; letter-spacing: normal; text-transform: none; text-align: left; box-shadow: none;
  min-width: 0; min-height: 0; width: auto; height: auto; appearance: none; -webkit-appearance: none; outline: none; transition: none; }
#invelo-ai button { cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
#invelo-ai input { cursor: text; }
#invelo-ai form { margin: 0; }
#invelo-ai h2, #invelo-ai h3, #invelo-ai p { margin: 0; padding: 0; color: inherit; }
#invelo-ai img { max-width: none; border: 0; }
#invelo-ai a { text-decoration: none; }
#invelo-ai button:focus-visible, #invelo-ai input:focus-visible, #invelo-ai a:focus-visible { outline: 2px solid #faa61a; outline-offset: 2px; box-shadow: none; }
/* State toggles the script sets via the hidden attribute must win over display rules in the design CSS. */
#invelo-ai [hidden] { display: none !important; }
html.iai-lock, html.iai-lock body { overflow: hidden !important; }

/* 2. Stacking: the Elementor sticky header uses z-index 99999, the design's 9999 would sit under it. */
html #invelo-ai.iai-overlay { z-index: 2147483000; } /* html prefix: outranks the design rule, which loads later */

/* 3. Layout guard: keep the chat column inside the panel so only the thread scrolls (grid items ignore
   height:100% when the row is auto-sized in Chromium; items in a scrolling flex column must not shrink). */
#invelo-ai .iai--modal { grid-template-rows: minmax(0, 1fr); }
#invelo-ai .iai--modal > .iai-brand, #invelo-ai .iai--modal > .iai-chat { min-height: 0; max-height: 100%; }
#invelo-ai .iai-chat .iai-thread { min-height: 0; }
#invelo-ai .iai-thread > * { flex-shrink: 0; }

/* 4. Floating launcher (anchor, so theme button styles never apply). Shown only where the header
   button is not visible (mode "auto"), always, or never; the script toggles [hidden]. */
#invelo-ai-launcher { position: fixed; right: 18px; bottom: 18px; z-index: 2147482999; height: 48px; padding: 0 6px 0 22px; margin: 0; border: 0; border-radius: 300px;
  display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; background: linear-gradient(90deg,#f04e23 0%,#f46f20 49%,#faa61a 100%); color: #fff;
  font: 14px/1 "Poppins", system-ui, sans-serif; text-decoration: none; box-shadow: 0 4px 30px rgba(250,166,26,.5); cursor: pointer; transition: transform 180ms ease, box-shadow 180ms ease; }
#invelo-ai-launcher:hover, #invelo-ai-launcher:focus { color: #fff; text-decoration: none; transform: translateY(-1px); box-shadow: 0 6px 40px rgba(250,166,26,.65); }
#invelo-ai-launcher:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
#invelo-ai-launcher .iai-launcher__disc { width: 36px; height: 36px; border-radius: 50%; background: #fff; color: #000; display: inline-flex; align-items: center; justify-content: center; flex: none; }
#invelo-ai-launcher .iai-launcher__disc svg { display: block; }
#invelo-ai-launcher[hidden] { display: none !important; }
#invelo-ai.is-open ~ #invelo-ai-launcher { display: none; }

/* Shortcode button */
.iai-cta { display: inline-flex; align-items: center; height: 48px; padding: 0 24px; border-radius: 300px; background: linear-gradient(90deg,#f04e23 0%,#f46f20 49%,#faa61a 100%); color: #fff !important; text-decoration: none; font: 14px "Poppins", system-ui, sans-serif; box-shadow: 0 4px 30px rgba(250,166,26,.5); }
