/* AI Assistant by Phoenixxlab – chat widget
   Every rule starts with #pxai-root so theme / page-builder styles can't break the widget. */

#pxai-root {
	--pxai-primary: #00476C; --pxai-accent: #148032; --pxai-text: #1f2937; --pxai-muted: #6b7280; --pxai-line: #e5e7eb;
	position: fixed; z-index: 99990; top: auto; bottom: var(--pxai-y, 24px); right: var(--pxai-x, 24px); left: auto;
	margin: 0; padding: 0; font-family: inherit; font-size: 15px; line-height: 1.5; color: var(--pxai-text); text-align: left;
}
#pxai-root.pxai--left { right: auto; left: var(--pxai-x, 24px); }
#pxai-root *, #pxai-root *::before, #pxai-root *::after { box-sizing: border-box; }
#pxai-root [hidden] { display: none !important; }

/* ---- Shield from theme styles (Consilox, Elementor…) ---- */
#pxai-root button, #pxai-root a, #pxai-root input, #pxai-root textarea {
	margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none;
	min-width: 0; min-height: 0; width: auto; height: auto; max-width: none;
	font: inherit; font-size: inherit; line-height: inherit; color: inherit; text-align: left;
	text-transform: none; letter-spacing: normal; text-decoration: none; text-shadow: none;
	transform: none; transition: none; float: none; outline-offset: 2px;
	-webkit-appearance: none; appearance: none; cursor: pointer;
	flex-direction: row; flex-wrap: nowrap; justify-content: normal; align-items: normal; gap: 0;
	vertical-align: middle; white-space: normal; opacity: 1; filter: none; position: static;
}
#pxai-root input, #pxai-root textarea { cursor: text; }
#pxai-root button::before, #pxai-root button::after,
#pxai-root a::before, #pxai-root a::after { content: none !important; display: none !important; }
#pxai-root p, #pxai-root ul, #pxai-root ol, #pxai-root li, #pxai-root strong, #pxai-root span, #pxai-root label, #pxai-root form, #pxai-root section, #pxai-root header { letter-spacing: normal; text-transform: none; }
#pxai-root p, #pxai-root li, #pxai-root span, #pxai-root strong, #pxai-root label { font-size: inherit; line-height: inherit; font-weight: inherit; }
#pxai-root strong { font-weight: 700; }
#pxai-root span { display: inline; }
#pxai-root p { margin: 0; padding: 0; }
#pxai-root svg { display: block; max-width: none; }
#pxai-root .pxai-sr { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important; white-space: nowrap !important; border: 0 !important; }
#pxai-root .pxai-i { width: 20px; height: 20px; flex: none; }

/* ---- Launcher ---- */
#pxai-root .pxai-launcher { position: relative; width: 62px; height: 62px; margin-left: auto; border-radius: 50%; background: var(--pxai-accent); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 28px rgba(0,0,0,.22); transition: transform .2s; place-content: center; }
#pxai-root.pxai--left .pxai-launcher { margin-left: 0; }
#pxai-root .pxai-launcher:hover { transform: scale(1.06); background: var(--pxai-accent); }
#pxai-root .pxai-launcher .pxai-i { width: 28px; height: 28px; grid-area: 1 / 1; transition: opacity .2s, transform .2s; }
#pxai-root .pxai-launcher__close { opacity: 0; transform: rotate(-90deg); }
#pxai-root.is-open .pxai-launcher__chat { opacity: 0; transform: rotate(90deg); }
#pxai-root.is-open .pxai-launcher__close { opacity: 1; transform: none; }
#pxai-root .pxai-pulse { display: block; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--pxai-accent); animation: pxai-pulse 2.4s ease-out infinite; pointer-events: none; }
#pxai-root.is-open .pxai-pulse { display: none; }
@keyframes pxai-pulse { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.5); opacity: 0; } }

/* ---- Teaser ---- */
#pxai-root .pxai-teaser { position: absolute; bottom: 74px; right: 0; display: flex; align-items: center; gap: 4px; padding: 6px 6px 6px 14px; background: #fff; border-radius: 14px; box-shadow: 0 10px 28px rgba(0,0,0,.16); white-space: nowrap; animation: pxai-in .3s ease; }
#pxai-root.pxai--left .pxai-teaser { right: auto; left: 0; }
#pxai-root .pxai-teaser__text { padding: 4px 0; color: var(--pxai-text); font-weight: 600; font-size: 14px; }
#pxai-root .pxai-teaser__x { padding: 4px; display: grid; position: static; color: var(--pxai-muted); }
#pxai-root .pxai-teaser__x .pxai-i { width: 16px; height: 16px; }

/* ---- Panel ---- */
#pxai-root .pxai-panel { position: absolute; bottom: 78px; right: 0; width: 400px; max-width: calc(100vw - 32px); height: min(640px, calc(100vh - 120px)); display: flex; flex-direction: column; overflow: hidden; background: #fff; border-radius: 20px; box-shadow: 0 24px 60px rgba(0,0,0,.25); animation: pxai-in .25s ease; }
#pxai-root.pxai--left .pxai-panel { right: auto; left: 0; }
@keyframes pxai-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

#pxai-root .pxai-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 16px 18px; color: #fff; background: linear-gradient(135deg, var(--pxai-primary), color-mix(in srgb, var(--pxai-primary) 55%, #000)); }
#pxai-root .pxai-avatar { display: grid; flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: var(--pxai-accent); color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.18); }
#pxai-root .pxai-avatar img { width: 100%; height: 100%; object-fit: cover; }
#pxai-root .pxai-avatar .pxai-i { width: 24px; height: 24px; }
#pxai-root .pxai-head__text { flex: 1; min-width: 0; }
#pxai-root .pxai-title { margin: 0; font-size: 16px; font-weight: 800; line-height: 1.2; color: #fff; }
#pxai-root .pxai-title span { display: inline-block; white-space: nowrap; color: color-mix(in srgb, var(--pxai-accent) 55%, #fff); }
#pxai-root .pxai-sub { margin: 3px 0 0; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.75); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#pxai-root .pxai-hbtn { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; display: grid; place-items: center; place-content: center; transition: background .15s; }
#pxai-root .pxai-hbtn:hover { background: rgba(255,255,255,.2); color: #fff; }
#pxai-root .pxai-hbtn .pxai-i { width: 17px; height: 17px; }

/* ---- Messages ---- */
#pxai-root .pxai-body { flex: 1; overflow-y: auto; padding: 18px 16px; background: #f7f8fa; display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; }
#pxai-root .pxai-row { display: flex; gap: 8px; align-items: flex-start; max-width: 100%; }
#pxai-root .pxai-row--user { justify-content: flex-end; }
#pxai-root .pxai-mini { display: grid; flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: var(--pxai-accent); color: #fff; }
#pxai-root .pxai-mini img { width: 100%; height: 100%; object-fit: cover; }
#pxai-root .pxai-mini .pxai-i { width: 16px; height: 16px; }
#pxai-root .pxai-col { display: flex; flex-direction: column; min-width: 0; max-width: 84%; }
#pxai-root .pxai-row--user .pxai-col { align-items: flex-end; }
#pxai-root .pxai-bubble { display: block; padding: 11px 14px; border-radius: 16px; background: #fff; border: 1px solid var(--pxai-line); box-shadow: 0 1px 2px rgba(0,0,0,.04); font-size: 15px; line-height: 1.5; color: var(--pxai-text); word-wrap: break-word; overflow-wrap: anywhere; }
#pxai-root .pxai-row--bot .pxai-bubble { border-top-left-radius: 4px; }
#pxai-root .pxai-row--user .pxai-bubble { background: var(--pxai-primary); border-color: var(--pxai-primary); color: #fff; border-top-right-radius: 4px; }
#pxai-root .pxai-bubble p { margin: 0 0 8px; }
#pxai-root .pxai-bubble p:last-child { margin-bottom: 0; }
#pxai-root .pxai-bubble ul, #pxai-root .pxai-bubble ol { margin: 4px 0 8px; padding-left: 20px; list-style-position: outside; }
#pxai-root .pxai-bubble ul { list-style-type: disc; }
#pxai-root .pxai-bubble ol { list-style-type: decimal; }
#pxai-root .pxai-bubble li { margin: 0 0 4px; padding: 0; }
#pxai-root .pxai-bubble a { color: var(--pxai-accent); font-weight: 600; text-decoration: underline; cursor: pointer; }
#pxai-root .pxai-row--user .pxai-bubble a { color: #fff; }
#pxai-root .pxai-time { display: block; margin-top: 4px; padding: 0 4px; font-size: 11px; color: var(--pxai-muted); }
#pxai-root .pxai-typing .pxai-bubble { display: flex; gap: 5px; padding: 14px 16px; }
#pxai-root .pxai-typing .pxai-bubble span { display: block; width: 7px; height: 7px; border-radius: 50%; background: var(--pxai-muted); animation: pxai-dot 1.2s infinite ease-in-out; }
#pxai-root .pxai-typing .pxai-bubble span:nth-child(2) { animation-delay: .15s; }
#pxai-root .pxai-typing .pxai-bubble span:nth-child(3) { animation-delay: .3s; }
@keyframes pxai-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }

/* ---- Quick actions ---- */
#pxai-root .pxai-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
#pxai-root .pxai-action { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 64px; padding: 12px; text-align: left; color: var(--pxai-text); background: #fff; border: 1px solid var(--pxai-line); border-radius: 14px; box-shadow: 0 1px 2px rgba(0,0,0,.04); transition: border-color .15s, transform .15s, box-shadow .15s; }
#pxai-root .pxai-action:hover, #pxai-root .pxai-action:focus { color: var(--pxai-text); background: #fff; border-color: var(--pxai-accent); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,.07); }
#pxai-root .pxai-action__icon { display: grid; flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--pxai-accent) 12%, #fff); color: var(--pxai-accent); }
#pxai-root .pxai-action__text { display: flex; flex: 1; min-width: 0; display: flex; flex-direction: column; }
#pxai-root .pxai-action__text strong { display: block; font-size: 14px; font-weight: 700; line-height: 1.25; color: var(--pxai-text); }
#pxai-root .pxai-action__text span { display: block; font-size: 12px; line-height: 1.3; color: var(--pxai-muted); }
#pxai-root .pxai-action__chev { width: 16px; height: 16px; color: #9ca3af; }

/* ---- Lead form ---- */
#pxai-root .pxai-lead { margin: 0; padding: 16px; background: #fff; border: 1px solid var(--pxai-line); border-radius: 16px; display: flex; flex-direction: column; gap: 10px; }
#pxai-root .pxai-lead__title { margin: 0; font-weight: 800; color: var(--pxai-primary); }
#pxai-root .pxai-lead__intro { margin: -4px 0 2px; font-size: 13px; color: var(--pxai-muted); }
#pxai-root .pxai-lead label { display: flex; flex-direction: column; gap: 4px; margin: 0; font-size: 12.5px; font-weight: 600; color: var(--pxai-text); }
#pxai-root .pxai-lead input, #pxai-root .pxai-lead textarea { display: block; width: 100%; height: auto; min-height: 42px; padding: 9px 12px; border: 1px solid var(--pxai-line); border-radius: 10px; background: #fff; font-size: 14px; color: var(--pxai-text); }
#pxai-root .pxai-lead input:focus, #pxai-root .pxai-lead textarea:focus { outline: none; border-color: var(--pxai-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pxai-accent) 18%, transparent); }
#pxai-root .pxai-lead__err { margin: 0; font-size: 13px; color: #b91c1c; }
#pxai-root .pxai-lead__btns { display: flex; gap: 8px; }
#pxai-root .pxai-btn { display: flex; align-items: center; justify-content: center; flex: 1; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--pxai-accent); color: #fff; font-weight: 700; text-align: center; }
#pxai-root .pxai-btn:hover { background: var(--pxai-accent); color: #fff; filter: brightness(1.07); }
#pxai-root .pxai-btn--ghost, #pxai-root .pxai-btn--ghost:hover { flex: 0 0 auto; background: transparent; color: var(--pxai-muted); filter: none; }
#pxai-root .pxai-btn[disabled] { opacity: .6; cursor: wait; }

/* ---- Input ---- */
#pxai-root .pxai-input { display: flex; gap: 8px; align-items: flex-end; margin: 0; padding: 12px 14px 8px; background: #fff; border-top: 1px solid var(--pxai-line); }
#pxai-root .pxai-field { flex: 1; display: flex; align-items: center; gap: 8px; min-height: 50px; margin: 0; padding: 6px 8px 6px 14px; border: 2px solid color-mix(in srgb, var(--pxai-accent) 55%, #fff); border-radius: 26px; background: #fff; transition: border-color .15s; }
#pxai-root .pxai-field:focus-within { border-color: var(--pxai-accent); }
#pxai-root .pxai-field__spark { display: grid; flex: none; color: var(--pxai-accent); }
#pxai-root .pxai-field textarea { flex: 1; display: block; width: 100%; min-height: 24px; max-height: 120px; padding: 6px 0; border: 0; outline: none; resize: none; background: transparent; font-size: 15px; line-height: 1.4; color: var(--pxai-text); box-shadow: none; }
#pxai-root .pxai-send { flex: none; width: 50px; height: 50px; border-radius: 50%; background: var(--pxai-accent); color: #fff; display: grid; place-items: center; place-content: center; transition: transform .15s, filter .15s; }
#pxai-root .pxai-send:hover { background: var(--pxai-accent); color: #fff; filter: brightness(1.08); transform: scale(1.04); }
#pxai-root .pxai-hp { position: absolute !important; opacity: 0 !important; pointer-events: none; left: -9999px !important; width: 1px; height: 1px; }
#pxai-root .pxai-note { margin: 0; padding: 0 16px 10px; background: #fff; text-align: center; font-size: 11px; color: var(--pxai-muted); }

/* ---- Next to the Sticky CTA bar ---- */
@media (min-width: 768px) {
	#pxai-root.pxai--with-cta.pxai--right { bottom: calc(var(--pxai-y, 24px) + 172px); }
}

/* ---- Mobile ---- */
@media (max-width: 767px) {
	#pxai-root { bottom: var(--pxai-my, 16px); right: var(--pxai-mx, 16px); }
	#pxai-root.pxai--left { right: auto; left: var(--pxai-mx, 16px); }
	#pxai-root.pxai--with-cta { bottom: calc(var(--pxai-my, 16px) + 60px + env(safe-area-inset-bottom)); }
	#pxai-root.pxai--hide-mobile { display: none; }
	#pxai-root .pxai-launcher { width: 56px; height: 56px; }
	#pxai-root .pxai-panel { position: fixed; inset: 0; width: auto; max-width: none; height: auto; border-radius: 0; }
	#pxai-root.is-open .pxai-launcher, #pxai-root.is-open .pxai-teaser { display: none; }
	#pxai-root .pxai-teaser { white-space: normal; width: max-content; max-width: calc(100vw - 100px); }
}
@media (prefers-reduced-motion: reduce) {
	#pxai-root *, #pxai-root *::before, #pxai-root *::after { animation: none !important; transition: none !important; }
}
