/* Invent 2025 assistant. Colours come from the theme presets when present. */
.i25a-launch,
.i25a-panel {
	--i25a-ink: var(--wp--preset--color--contrast, #0e1b1d);
	--i25a-muted: var(--wp--preset--color--contrast-2, #4a5759);
	--i25a-bg: var(--wp--preset--color--base, #f4f6f5);
	--i25a-bg-2: var(--wp--preset--color--base-2, #e6ebe9);
	--i25a-line: var(--wp--preset--color--line, #c9d2cf);
	--i25a-accent: var(--wp--preset--color--accent, #0a6b5e);
	--i25a-accent-2: var(--wp--preset--color--accent-2, #d3e6e0);
	font-family: inherit;
	box-sizing: border-box;
}

.i25a-panel *,
.i25a-panel *::before,
.i25a-panel *::after {
	box-sizing: inherit;
}

.i25a-launch {
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 9998;
	padding: 0.75rem 1.1rem;
	border: 0;
	border-radius: 999px;
	background: var(--i25a-accent);
	color: #fff;
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	box-shadow: 0 6px 20px rgb(14 27 29 / 0.18);
}

.i25a-launch:hover {
	filter: brightness(1.08);
}

.i25a-launch:focus-visible,
.i25a-panel button:focus-visible,
.i25a-input:focus-visible {
	outline: 2px solid var(--i25a-accent);
	outline-offset: 2px;
}

.i25a-launch[aria-expanded="true"] {
	display: none;
}

.i25a-panel {
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 9999;
	display: flex;
	flex-direction: column;
	width: min(380px, calc(100vw - 32px));
	height: min(560px, calc(100dvh - 32px));
	border: 1px solid var(--i25a-line);
	border-radius: 10px;
	background: var(--i25a-bg);
	color: var(--i25a-ink);
	box-shadow: 0 12px 40px rgb(14 27 29 / 0.22);
	overflow: hidden;
}

.i25a-panel[hidden] {
	display: none;
}

.i25a-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	padding: 0.75rem 0.75rem 0.75rem 1rem;
	background: var(--i25a-ink);
	color: #fff;
}

.i25a-title {
	margin: 0;
	font-size: 1rem;
	font-weight: 700;
}

.i25a-close {
	width: 2.25rem;
	height: 2.25rem;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: #fff;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}

.i25a-close:hover {
	background: rgb(255 255 255 / 0.12);
}

.i25a-log {
	flex: 1;
	overflow-y: auto;
	padding: 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

.i25a-intro {
	margin: 0 0 0.25rem;
	color: var(--i25a-muted);
	font-size: 0.85rem;
	line-height: 1.45;
}

.i25a-msg {
	max-width: 90%;
	padding: 0.6rem 0.8rem;
	border-radius: 10px;
	font-size: 0.95rem;
	line-height: 1.5;
	overflow-wrap: anywhere;
}

.i25a-msg p,
.i25a-msg ul {
	margin: 0 0 0.5em;
}

.i25a-msg > :last-child {
	margin-bottom: 0;
}

.i25a-msg ul {
	padding-left: 1.2em;
}

.i25a-msg a {
	color: var(--i25a-accent);
	text-decoration: underline;
}

.i25a-me {
	align-self: flex-end;
	background: var(--i25a-accent);
	color: #fff;
	white-space: pre-wrap;
}

.i25a-bot {
	align-self: flex-start;
	background: #fff;
	border: 1px solid var(--i25a-line);
}

.i25a-pending {
	color: var(--i25a-muted);
	font-style: italic;
}

.i25a-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.i25a-chip {
	padding: 0.4rem 0.7rem;
	border: 1px solid var(--i25a-accent);
	border-radius: 999px;
	background: #fff;
	color: var(--i25a-accent);
	font: inherit;
	font-size: 0.85rem;
	text-align: left;
	cursor: pointer;
}

.i25a-chip:hover {
	background: var(--i25a-accent-2);
}

.i25a-form {
	display: flex;
	gap: 0.5rem;
	padding: 0.75rem;
	border-top: 1px solid var(--i25a-line);
	background: var(--i25a-bg-2);
}

.i25a-form[hidden] {
	display: none;
}

.i25a-input {
	flex: 1;
	min-width: 0;
	padding: 0.5rem 0.6rem;
	border: 1px solid var(--i25a-line);
	border-radius: 6px;
	background: #fff;
	color: var(--i25a-ink);
	font: inherit;
	font-size: 16px;
	resize: none;
}

.i25a-send {
	padding: 0 1rem;
	border: 0;
	border-radius: 6px;
	background: var(--i25a-accent);
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.i25a-send:disabled {
	opacity: 0.5;
	cursor: wait;
}

@media (max-width: 480px) {
	.i25a-panel {
		right: 0;
		bottom: 0;
		width: 100vw;
		height: 100dvh;
		border-radius: 0;
		border: 0;
	}
}

@media print {
	.i25a-launch,
	.i25a-panel {
		display: none !important;
	}
}

.i25a-card {
	align-self: stretch;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: 0.75rem;
	border: 1px solid var(--i25a-accent);
	border-radius: 10px;
	background: #fff;
	font-size: 0.9rem;
}

.i25a-card__title {
	margin: 0;
	font-weight: 700;
}

.i25a-field {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	color: var(--i25a-muted);
	font-size: 0.8rem;
}

.i25a-field input,
.i25a-field textarea,
.i25a-field select {
	padding: 0.4rem 0.5rem;
	border: 1px solid var(--i25a-line);
	border-radius: 6px;
	background: #fff;
	color: var(--i25a-ink);
	font: inherit;
	font-size: 16px;
}

.i25a-consent {
	font-size: 0.8rem;
	line-height: 1.4;
	color: var(--i25a-muted);
}

.i25a-consent a {
	color: var(--i25a-accent);
}

.i25a-card__note {
	margin: 0;
	color: #b32d2e;
	font-size: 0.8rem;
}

.i25a-card__note:empty {
	display: none;
}

.i25a-card .i25a-send {
	padding: 0.6rem 1rem;
}

.i25a-trap {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	opacity: 0;
}
