/* Kings FAQ Premium — frontend styles
 * Theme tokens are driven by :root vars printed in wp_head plus per-theme
 * overrides on .kfp-theme-*.
 */

.kfp {
	--kfp-bg: #ffffff;
	--kfp-fg: #1f2430;
	--kfp-muted: #6b7280;
	--kfp-border: #e5e7eb;
	--kfp-panel: #f5f6f8;
	--kfp-shadow: 0 10px 30px rgba(17, 24, 39, .08);
	font-family: var(--kfp-font, inherit);
	color: var(--kfp-fg);
	max-width: 760px;
	margin: 0 auto;
	box-sizing: border-box;
}
.kfp *, .kfp *::before, .kfp *::after { box-sizing: border-box; }

/* ---- Themes -------------------------------------------------------- */
.kfp-theme-dark   { --kfp-bg:#161a22; --kfp-fg:#f3f4f6; --kfp-muted:#9aa3b2; --kfp-border:#2a313d; --kfp-panel:#1f242e; --kfp-shadow:0 10px 30px rgba(0,0,0,.5); }
.kfp-theme-glass  { --kfp-bg:rgba(255,255,255,.55); --kfp-panel:rgba(255,255,255,.35); --kfp-border:rgba(255,255,255,.45); }
.kfp-theme-gold   { --kfp-accent:#c9a227; --kfp-bg:#1a1606; --kfp-fg:#fbf4dd; --kfp-muted:#c8b27a; --kfp-border:#3a3110; --kfp-panel:#241e08; }
.kfp-theme-purple { --kfp-accent:#7c3aed; --kfp-bg:#160e2b; --kfp-fg:#efe9ff; --kfp-muted:#b9a8e6; --kfp-border:#2e2150; --kfp-panel:#1d1340; }

/* ---- Search field -------------------------------------------------- */
.kfp-field { position: relative; display: flex; align-items: center; gap: 10px;
	background: var(--kfp-bg); border: 1px solid var(--kfp-border);
	border-radius: 999px; padding: 7px 7px 7px 18px;
	box-shadow: 0 6px 22px rgba(17,24,39,.07); transition: border-color .18s ease, box-shadow .18s ease; }
.kfp-field:focus-within { border-color: var(--kfp-accent);
	box-shadow: 0 8px 28px color-mix(in srgb, var(--kfp-accent) 18%, transparent); }
.kfp-theme-glass .kfp-field { backdrop-filter: blur(12px); }

.kfp-icon { display: flex; align-items: center; flex: 0 0 auto; color: var(--kfp-muted); }
.kfp-input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--kfp-fg);
	font-size: 16px; line-height: 1.5; padding: 8px 0; }
.kfp-input::placeholder { color: var(--kfp-muted); }
.kfp-input::-webkit-search-cancel-button { display: none; }

/* Reset theme button styling inside our widgets so it can't override us. */
.kfp button { -webkit-appearance: none; appearance: none; font-family: inherit; box-shadow: none;
	text-transform: none; letter-spacing: normal; min-width: 0; min-height: 0; }

/* Minimalist clear (×) button — visible only while typing */
.kfp-clear { display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
	width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
	background: transparent; color: var(--kfp-muted); font-size: 22px; line-height: 1; }
.kfp-clear:hover { background: var(--kfp-panel); color: var(--kfp-fg); }

/* Accent search button — labelled pill (icon + "Search" text) */
.kfp-search-btn { position: relative; overflow: hidden; flex: 0 0 auto; cursor: pointer;
	display: inline-flex; align-items: center; gap: 7px; height: 44px; padding: 0 18px;
	border: 0; border-radius: 999px; background: var(--kfp-accent); color: #fff;
	font-size: 14px; font-weight: 600; line-height: 1; white-space: nowrap;
	transition: transform .15s ease, filter .15s ease; }
.kfp-search-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.kfp-search-btn:active { transform: translateY(0); }
.kfp-search-btn svg { flex: 0 0 auto; }
/* Icon-only variant: compact round button (no text label). */
.kfp-search-btn--icon { width: 42px; height: 42px; padding: 0; gap: 0; border-radius: 50%; justify-content: center; }
/* Drop the label when the container is very narrow (e.g. a sidebar). */
@media (max-width: 430px) {
	.kfp-search-btn__label { display: none; }
	.kfp-search-btn { padding: 0 14px; }
}

/* Premium search-box styles (solid is the default) */
.kfp-style-glass .kfp-field { background: rgba(255,255,255,.45); backdrop-filter: blur(12px); border-color: rgba(255,255,255,.55); }
.kfp-theme-dark.kfp-style-glass .kfp-field,
.kfp-theme-purple.kfp-style-glass .kfp-field,
.kfp-theme-gold.kfp-style-glass .kfp-field { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.22); }
.kfp-style-outline .kfp-field { background: transparent; box-shadow: none; border-width: 2px; }
.kfp-style-soft .kfp-field { box-shadow: none; background: var(--kfp-panel); border-color: transparent; }

/* ---- Blog-post search results ([kings_blog_search]) ---------------- */
.kfp-blog-results { margin-top: 18px; }
.kfp-blog-results:empty { display: none; }
.kfp-blog-grid { display: grid; gap: 18px; }
.kfp-blog-card { display: flex; flex-direction: column; overflow: hidden; background: var(--kfp-bg);
	border: 1px solid var(--kfp-border); border-radius: var(--kfp-radius, 16px); box-shadow: var(--kfp-shadow);
	transition: transform .15s ease, box-shadow .15s ease; }
.kfp-blog-card:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(17,24,39,.12); }
.kfp-blog-card__thumb { display: block; height: 180px; background-size: cover; background-position: center;
	background-color: var(--kfp-panel); }
.kfp-blog-card__body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px; flex: 1; }
.kfp-blog-card__title { margin: 0; font-size: 18px; line-height: 1.35; font-weight: 700; }
.kfp-blog-card__title a { color: var(--kfp-fg); text-decoration: none; }
.kfp-blog-card__title a:hover { color: var(--kfp-accent); }
.kfp-blog-card__meta { font-size: 12px; color: var(--kfp-muted); }
.kfp-blog-card__excerpt { margin: 0; color: var(--kfp-muted); font-size: 14px; line-height: 1.6; }
.kfp-blog-card__more { align-self: flex-start; margin-top: auto; display: inline-flex; align-items: center;
	background: var(--kfp-accent); color: #fff; text-decoration: none; font-weight: 600; font-size: 14px;
	padding: 9px 18px; border-radius: 999px; transition: filter .15s ease; }
.kfp-blog-card__more:hover { filter: brightness(1.06); color: #fff; }

/* Blog search inside the overlay — white, centered, 1400px grid panel.
 * Results only appear after the visitor types and submits (empty = hidden). */
.kfp-overlay-inner.kfp-blog-overlay { width: 100%; max-width: 1400px; margin: 0 auto; }
.kfp-blog-overlay .kfp-blog-results { --kfp-fg: #1f2430; --kfp-muted: #6b7280; --kfp-bg: #ffffff;
	--kfp-panel: #f3f4f6; --kfp-border: #e5e7eb; background: #ffffff; color: var(--kfp-fg);
	border-radius: 18px; padding: 24px; margin: 18px auto 0; max-height: 72vh; overflow-y: auto;
	box-shadow: 0 20px 50px rgba(0,0,0,.28); }
.kfp-blog-overlay .kfp-blog-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important; }
.kfp-blog-overlay .kfp-loading, .kfp-blog-overlay .kfp-empty { background: #fff; border-radius: 14px; padding: 24px; }
.kfp-widget-panel .kfp-blog-results { max-height: 50vh; overflow-y: auto; }
.kfp-toggle-panel .kfp-blog-results { max-height: 60vh; overflow-y: auto; }

/* Full-screen blog results popup (results_overlay / display="overlay").
 * Fixed white modal covering the whole viewport: the search bar stays pinned
 * at the top and only the results region scrolls. (The structural layout is
 * also forced inline from JS so a transformed page-builder ancestor or a stale
 * cached stylesheet can't break it.) */
body.kfp-no-scroll { overflow: hidden !important; }
.kfp-overlay.kfp-overlay--full { padding: 0 !important; background: #ffffff; overflow: hidden;
	display: flex; flex-direction: column; }
.kfp-overlay--full .kfp-overlay-inner.kfp-blog-overlay {
	flex: 1 1 auto; min-height: 0; width: 100%; max-width: none; margin: 0;
	background: #ffffff; box-sizing: border-box;
	display: flex; flex-direction: column; align-items: center;
	padding: 70px clamp(14px, 4vw, 40px) 0; overflow: hidden;
	animation: kfp-overlay-rise .28s ease both; }
@keyframes kfp-overlay-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.kfp-overlay--full .kfp-overlay-head,
.kfp-overlay--full .kfp-overlay-inner > .kfp-field { flex: 0 0 auto; width: 100%; max-width: 760px; margin: 0 auto 22px; }
.kfp-overlay--full .kfp-overlay-head .kfp-field { box-shadow: 0 12px 34px rgba(20,24,40,.14); }
.kfp-overlay--full .kfp-blog-overlay .kfp-blog-results {
	flex: 1 1 auto; min-height: 0; width: 100%; max-width: 1320px; margin: 0 auto;
	max-height: none; border-radius: 0; background: transparent; box-shadow: none;
	padding: 0 4px 36px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.kfp-overlay--full .kfp-blog-overlay .kfp-blog-grid {
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important; gap: 22px; }
.kfp-overlay--full .kfp-blog-card {
	background: #ffffff; border: 1px solid #eceef3; border-radius: 16px; overflow: hidden;
	box-shadow: 0 8px 24px rgba(20,24,40,.08); transition: transform .2s ease, box-shadow .2s ease; }
.kfp-overlay--full .kfp-blog-card:hover { transform: translateY(-4px); box-shadow: 0 16px 38px rgba(20,24,40,.16); }
.kfp-overlay--full .kfp-overlay-close {
	position: fixed; top: 16px; right: 22px; color: #1f2430; font-size: 26px; line-height: 1;
	width: 44px; height: 44px; border-radius: 50%; background: #eef0f5;
	display: flex; align-items: center; justify-content: center; transition: background .2s ease; }
.kfp-overlay--full .kfp-overlay-close:hover { background: #e1e4ec; }
@media (max-width: 600px) {
	.kfp-overlay--full .kfp-blog-overlay .kfp-blog-grid { grid-template-columns: 1fr !important; gap: 16px; }
}

/* Result animations (premium feel) */
.kfp-anim-fade .kfp-blog-card { animation: kfp-card-fade .35s ease both; }
.kfp-anim-slide .kfp-blog-card { animation: kfp-card-slide .35s ease both; }
.kfp-anim-zoom .kfp-blog-card { animation: kfp-card-zoom .35s ease both; }
@keyframes kfp-card-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes kfp-card-slide { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes kfp-card-zoom { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .kfp-blog-card { animation: none !important; } }

@media (max-width: 600px) {
	.kfp-blog-grid { grid-template-columns: 1fr !important; }
}

/* ---- Branding logo ------------------------------------------------- */
.kfp-logo { display: flex; justify-content: center; align-items: center; }
.kfp-logo img { display: block; }
.kfp-list .kfp-logo { margin: 0 auto 16px; }
.kfp-overlay-inner .kfp-logo { margin-bottom: 14px; }
.kfp-ai__brand { padding: 14px 16px 2px; text-align: center; }
.kfp-ai__brand .kfp-logo img { max-height: 48px; width: auto; }

/* ---- Suggestions --------------------------------------------------- */
.kfp-suggestions { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 20;
	list-style: none; margin: 0; padding: 6px; background: var(--kfp-bg);
	border: 1px solid var(--kfp-border); border-radius: 12px; box-shadow: var(--kfp-shadow); }
.kfp-suggestions li { padding: 8px 12px; border-radius: 8px; cursor: pointer; }
.kfp-suggestions li:hover { background: var(--kfp-panel); color: var(--kfp-accent); }

/* ---- Results ------------------------------------------------------- */
.kfp-results { margin-top: 16px; color: var(--kfp-fg); }
/* Keep the box invisible until there is something to show. */
.kfp-results:empty { display: none; margin: 0; }
.kfp-loading, .kfp-empty { padding: 18px; text-align: center; color: var(--kfp-muted); }
.kfp-answer { background: var(--kfp-bg); border: 1px solid var(--kfp-border);
	border-radius: 18px; padding: 22px 24px; margin-bottom: 18px; box-shadow: 0 4px 18px rgba(17,24,39,.05); }
.kfp-answer__title { font-weight: 700; font-size: 19px; margin-bottom: 10px; color: var(--kfp-fg); }
.kfp-answer__body { line-height: 1.65; color: var(--kfp-fg); }

/* Organised result groups (FAQs / Documents / Blog Posts & Pages) */
.kfp-result-group { margin-top: 18px; }
.kfp-result-group__head { font-size: 12px; text-transform: uppercase; letter-spacing: .08em;
	font-weight: 700; color: var(--kfp-muted); margin-bottom: 4px; }
.kfp-result-group__count { opacity: .7; font-weight: 600; }
.kfp-answer__body mark, .kfp-result__snippet mark { background: color-mix(in srgb, var(--kfp-accent) 28%, transparent); color: inherit; padding: 0 2px; border-radius: 3px; }
.kfp-answer__meta { display: flex; align-items: center; gap: 14px; margin-top: 16px; font-size: 13px; }
.kfp-answer__link { color: var(--kfp-accent); text-decoration: none; font-weight: 600; }

/* Match badge (modern, like the reference design) */
.kfp-match { flex: 0 0 auto; font-size: 12px; font-weight: 700; line-height: 1; white-space: nowrap;
	color: var(--kfp-accent); background: color-mix(in srgb, var(--kfp-accent) 12%, transparent);
	padding: 5px 10px; border-radius: 999px; }
.kfp-match--lg { font-size: 13px; padding: 6px 12px; }

.kfp-result { display: flex; gap: 14px; align-items: flex-start; padding: 14px;
	border-radius: 14px; transition: background .15s ease; }
.kfp-result:hover { background: var(--kfp-panel); }
.kfp-result__main { flex: 1; min-width: 0; }
.kfp-result__title { font-weight: 600; color: var(--kfp-fg); margin-bottom: 3px; }
.kfp-result__title a { color: var(--kfp-fg); text-decoration: none; }
.kfp-result__title a:hover { color: var(--kfp-accent); }
.kfp-result__snippet { color: var(--kfp-muted); font-size: 14px; line-height: 1.55; }

/* Thumbnails / type icons */
.kfp-thumb { flex: 0 0 auto; width: 56px; height: 56px; border-radius: 12px; overflow: hidden;
	background-size: cover; background-position: center; background-color: var(--kfp-panel);
	display: flex; align-items: center; justify-content: center; }
.kfp-thumb--icon { color: var(--kfp-accent); }

/* Filter chips */
.kfp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.kfp-chip { cursor: pointer; border: 1px solid var(--kfp-border); background: var(--kfp-bg);
	color: var(--kfp-fg); font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 999px;
	transition: background .15s ease, color .15s ease, border-color .15s ease; }
.kfp-chip span { opacity: .6; margin-left: 2px; }
.kfp-chip:hover { border-color: var(--kfp-accent); }
.kfp-chip.is-active { background: var(--kfp-accent); border-color: var(--kfp-accent); color: #fff; }
.kfp-chip.is-active span { opacity: .85; }

/* Top-matches card grid */
.kfp-top-matches { margin-top: 14px; }
.kfp-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-top: 6px; }
.kfp-card2 { position: relative; display: block; text-decoration: none; color: var(--kfp-fg);
	background: var(--kfp-bg); border: 1px solid var(--kfp-border); border-radius: 16px; padding: 14px;
	transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.kfp-card2:hover { transform: translateY(-2px); border-color: var(--kfp-accent);
	box-shadow: 0 8px 24px rgba(17,24,39,.1); }
.kfp-card2 .kfp-thumb { width: 100%; height: 96px; border-radius: 12px; margin-bottom: 10px; }
.kfp-card2__title { font-weight: 700; font-size: 14px; line-height: 1.35; margin-bottom: 4px;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kfp-card2__snippet { color: var(--kfp-muted); font-size: 12.5px; line-height: 1.45;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kfp-card2 .kfp-match { position: absolute; top: 10px; right: 10px; }

/* ---- Buttons ------------------------------------------------------- */
.kfp-btn, .kfp-toggle-btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 8px;
	background: var(--kfp-accent); color: #fff; border: 0; cursor: pointer;
	padding: 12px 20px; border-radius: var(--kfp-radius, 16px); font-size: 15px; }

/* ---- Overlay ------------------------------------------------------- */
/* The [hidden] attribute must win over the flex display below, otherwise
 * the overlay shows on load and the close button cannot hide it. */
.kfp-overlay[hidden],
.kfp-results-overlay[hidden] { display: none !important; }

.kfp-overlay { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: flex-start;
	justify-content: center; padding: 10vh 20px; background: rgba(10,12,18,.78); backdrop-filter: blur(6px); }
.kfp-overlay-inner { width: 100%; max-width: 680px; }
.kfp-overlay-title { color: #fff; text-align: center; margin: 0 0 18px; font-size: 28px; }
.kfp-overlay-close { position: absolute; top: 18px; right: 24px; background: none; border: 0; color: #fff; font-size: 34px; cursor: pointer; line-height: 1; }

/* ---- Full-screen results overlay (results="overlay") -------------- */
.kfp-results-overlay { position: fixed; inset: 0; z-index: 99999; max-width: none; margin: 0;
	display: flex; justify-content: center; align-items: flex-start; padding: 8vh 20px; overflow-y: auto;
	background: rgba(10,12,18,.82); backdrop-filter: blur(6px); }
.kfp-results-overlay__inner { width: 100%; max-width: 720px; color: var(--kfp-fg); background: var(--kfp-bg);
	border: 1px solid var(--kfp-border); border-radius: var(--kfp-radius, 16px); padding: 24px; box-shadow: var(--kfp-shadow); }
.kfp-results-overlay__close { position: absolute; top: 18px; right: 24px; background: none; border: 0;
	color: #fff; font-size: 34px; line-height: 1; cursor: pointer; }
.kfp-results-overlay .kfp-results { margin-top: 0; }

/* ---- Toggle / Expandable ------------------------------------------ */
.kfp-toggle-panel { margin-top: 12px; }
.kfp-expandable .kfp-field { transition: max-width .35s ease; }

/* ---- Floating widget ---------------------------------------------- */
.kfp-widget { position: fixed; right: 24px; bottom: 24px; z-index: 99998; max-width: none; }
.kfp-widget-fab { width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer;
	background: var(--kfp-accent); color: #fff; font-size: 22px; box-shadow: var(--kfp-shadow); }
.kfp-widget-panel { position: absolute; right: 0; bottom: 70px; width: 360px; max-width: 90vw;
	background: var(--kfp-bg); border: 1px solid var(--kfp-border); border-radius: 16px; padding: 16px; box-shadow: var(--kfp-shadow); }
.kfp-widget-head { font-weight: 700; margin-bottom: 10px; }

/* ---- Accordion list (matches brief mockup) ------------------------ */
.kfp-list-title { text-align: center; font-size: 34px; font-weight: 800; margin: 0 0 20px; }
.kfp-accordion { margin-top: 18px; display: flex; flex-direction: column; gap: 14px; }
.kfp-accordion-item { background: var(--kfp-bg); border-radius: var(--kfp-radius, 16px);
	box-shadow: var(--kfp-shadow); padding: 4px 8px; }
.kfp-accordion-q { cursor: pointer; list-style: none; padding: 20px; font-size: 18px; font-weight: 600;
	display: flex; justify-content: space-between; align-items: center; }
.kfp-accordion-q::-webkit-details-marker { display: none; }
.kfp-accordion-q::after { content: "+"; font-size: 24px; color: var(--kfp-muted); }
.kfp-accordion-item[open] .kfp-accordion-q::after { content: "\00d7"; }
.kfp-accordion-a { padding: 0 20px 20px; color: var(--kfp-muted); line-height: 1.7; }

/* ---- Effects ------------------------------------------------------- */
.kfp-mouse-glow { position: fixed; top: 0; left: 0; width: 320px; height: 320px; margin: -160px 0 0 -160px;
	pointer-events: none; z-index: 9999; border-radius: 50%;
	background: radial-gradient(circle, color-mix(in srgb, var(--kfp-accent) 30%, transparent), transparent 70%); }
.kfp-ripple { position: absolute; width: 8px; height: 8px; border-radius: 50%; transform: translate(-50%,-50%);
	background: rgba(255,255,255,.6); animation: kfp-ripple .6s ease-out forwards; pointer-events: none; }
@keyframes kfp-ripple { to { width: 240px; height: 240px; opacity: 0; } }

/* ---- AI chat assistant -------------------------------------------- */
.kfp-ai { display: flex; flex-direction: column; border: 1px solid var(--kfp-border);
	border-radius: var(--kfp-radius, 16px); background: var(--kfp-bg); box-shadow: var(--kfp-shadow); overflow: hidden; }
.kfp-ai__log { flex: 1; min-height: 200px; height: var(--kfp-ai-height, 480px); overflow-y: auto;
	padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.kfp-ai__msg { display: flex; gap: 8px; align-items: flex-end; }
.kfp-ai__msg--user { justify-content: flex-end; }
.kfp-ai__avatar { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%; overflow: hidden; align-self: flex-end; }
.kfp-ai__avatar img, .kfp-ai__avatar video { width: 100%; height: 100%; object-fit: cover; display: block; }
.kfp-ai__msg--assistant .kfp-ai__bubble { max-width: calc(86% - 40px); }
.kfp-ai__bubble { max-width: 86%; padding: 11px 15px; border-radius: 16px; line-height: 1.55;
	font-size: 15px; word-wrap: break-word; }
.kfp-ai__msg--user .kfp-ai__bubble { background: var(--kfp-accent); color: #fff; border-bottom-right-radius: 4px; }
.kfp-ai__msg--assistant .kfp-ai__bubble { background: var(--kfp-panel); color: var(--kfp-fg); border-bottom-left-radius: 4px; }
.kfp-ai__bubble p { margin: 0 0 8px; }
.kfp-ai__bubble p:last-child { margin-bottom: 0; }
.kfp-ai__bubble ul, .kfp-ai__bubble ol { margin: 4px 0 8px; padding-left: 20px; }
.kfp-ai__bubble a { color: var(--kfp-accent); }
.kfp-ai__msg--user .kfp-ai__bubble a { color: #fff; text-decoration: underline; }
.kfp-ai__sources { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--kfp-border);
	font-size: 12px; color: var(--kfp-muted); }
.kfp-ai__sources span { font-weight: 600; }
.kfp-ai__sources a { color: var(--kfp-accent); text-decoration: none; margin-right: 4px; }

.kfp-ai__form { display: flex; align-items: flex-end; gap: 8px; padding: 12px;
	border-top: 1px solid var(--kfp-border); background: var(--kfp-bg); }
.kfp-ai .kfp-ai__input { -webkit-appearance: none; appearance: none; flex: 1 1 auto; width: auto;
	resize: none; overflow-y: auto; border: 1px solid var(--kfp-border); border-radius: 14px; box-shadow: none;
	margin: 0; padding: 10px 14px; font-size: 15px; line-height: 1.4; background: var(--kfp-bg); color: var(--kfp-fg);
	outline: none; min-height: 44px; max-height: 160px; font-family: inherit; }
.kfp-ai .kfp-ai__input:focus { border-color: var(--kfp-accent); box-shadow: none; outline: none; }
.kfp-ai .kfp-ai__send { -webkit-appearance: none; appearance: none; flex: 0 0 44px; width: 44px; height: 44px;
	min-width: 0; min-height: 0; padding: 0; margin: 0; border: 0; border-radius: 50%; cursor: pointer; line-height: 1;
	background: var(--kfp-accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.kfp-ai .kfp-ai__send:hover { filter: brightness(1.06); }
.kfp-ai .kfp-ai__send:disabled { opacity: .5; cursor: not-allowed; }

.kfp-ai__choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.kfp-ai__choice { -webkit-appearance: none; appearance: none; cursor: pointer; border: 1px solid var(--kfp-accent);
	background: transparent; color: var(--kfp-accent); font-weight: 600; font-size: 14px;
	padding: 7px 16px; border-radius: 999px; transition: background .15s ease, color .15s ease; }
.kfp-ai__choice:hover { background: var(--kfp-accent); color: #fff; }
.kfp-ai__choice:disabled { opacity: .5; cursor: default; }

.kfp-ai__dots { display: inline-flex; gap: 4px; }
.kfp-ai__dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--kfp-muted);
	display: inline-block; animation: kfp-bounce 1.2s infinite ease-in-out both; }
.kfp-ai__dots i:nth-child(2) { animation-delay: .15s; }
.kfp-ai__dots i:nth-child(3) { animation-delay: .3s; }
@keyframes kfp-bounce { 0%, 80%, 100% { transform: scale(.5); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }

/* Floating chat bubble (display="floating") */
.kfp-ai-float { position: fixed; right: 22px; bottom: 22px; z-index: 99998; max-width: none; margin: 0; }
.kfp-ai-float__panel[hidden] { display: none !important; }
.kfp-ai-fab { -webkit-appearance: none; appearance: none; width: 60px; height: 60px; border: 0; border-radius: 50%;
	cursor: pointer; background: var(--kfp-accent); color: #fff; display: flex; align-items: center; justify-content: center;
	overflow: hidden; padding: 0; box-shadow: 0 10px 30px rgba(17,24,39,.25); transition: transform .15s ease, filter .15s ease; }
.kfp-ai-fab svg { width: 28px; height: 28px; display: block; pointer-events: none; }
.kfp-ai-fab .kfp-ai-avatar { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; pointer-events: none; }
.kfp-ai-float__brand .kfp-ai-avatar { width: 30px; height: 30px; object-fit: cover; border-radius: 50%; flex: 0 0 auto; }
.kfp-ai-fab:hover { filter: brightness(1.06); transform: translateY(-2px); }
.kfp-ai-float.is-open .kfp-ai-fab { transform: scale(.92); }
.kfp-ai-float__panel { position: absolute; right: 0; bottom: 74px; width: 380px; max-width: 92vw;
	max-height: min(640px, calc(100vh - 120px));
	background: var(--kfp-bg); border: 1px solid var(--kfp-border); border-radius: 18px; overflow: hidden;
	box-shadow: 0 20px 50px rgba(17,24,39,.25); display: flex; flex-direction: column; }
.kfp-ai-float__head { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 10px;
	padding: 12px 16px; background: var(--kfp-accent); color: #fff; font-weight: 600; }
.kfp-ai-float__brand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.kfp-ai-float__brand .kfp-logo { justify-content: flex-start; }
.kfp-ai-float__brand .kfp-logo img { max-height: 30px; width: auto; }
.kfp-ai-float__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kfp-ai-float__close { -webkit-appearance: none; appearance: none; background: none; border: 0; color: #fff;
	font-size: 24px; line-height: 1; cursor: pointer; padding: 0; }
/* Let the message log flex and scroll so the input always stays visible. */
.kfp-ai-float .kfp-ai { flex: 1 1 auto; min-height: 0; border: 0; border-radius: 0; box-shadow: none; }
.kfp-ai-float .kfp-ai__log { flex: 1 1 auto; height: auto; min-height: 0; }

@media (max-width: 600px) {
	.kfp-list-title { font-size: 26px; }
	.kfp-widget-panel { width: 90vw; }
	.kfp-ai__bubble { max-width: 92%; }
	.kfp-ai-float__panel { width: 92vw; }
}
@media (prefers-reduced-motion: reduce) {
	.kfp-ripple, .kfp-expandable .kfp-field { animation: none; transition: none; }
}
