/* Keep the floating shell inside the visible screen even when the host admin
 * page overflows horizontally. These scoped rules also cover phone landscape. */
#divewp-ai-agent-chat.is-visible-viewport {
	left: calc(var(--chat-visible-left) + var(--chat-visible-width) - 80px);
	top: calc(var(--chat-visible-top) + var(--chat-visible-height) - 80px);
	right: auto;
	bottom: auto;
}
#divewp-ai-agent-chat.is-visible-viewport .divewp-ai-agent-chat__panel {
	position: fixed !important;
	left: calc(var(--chat-visible-left) + 8px) !important;
	top: calc(var(--chat-visible-top) + 8px) !important;
	right: auto !important;
	bottom: auto !important;
	width: calc(var(--chat-visible-width) - 16px) !important;
	height: calc(var(--chat-visible-height) - 88px) !important;
	min-width: 0 !important;
	min-height: 0 !important;
	max-width: none !important;
	max-height: none !important;
}
#divewp-ai-agent-chat.is-visible-viewport.is-fullscreen .divewp-ai-agent-chat__panel {
	height: calc(var(--chat-visible-height) - 16px) !important;
}
#divewp-ai-agent-chat.is-short-viewport .divewp-ai-agent-chat__panel {
	height: calc(var(--chat-visible-height) - 16px) !important;
}
#divewp-ai-agent-chat.is-short-viewport .divewp-ai-agent-chat__history {
	overflow-y: auto;
}
#divewp-ai-agent-chat.is-short-viewport .divewp-ai-agent-chat__conversation-list {
	flex: 0 0 auto;
	max-height: 120px;
}

/**
 * DiveWP AI Agent Chat Styles
 *
 * Floating chat head for the DiveWP admin screen.
 *
 * @package DiveWP
 * @version 1.0.0
 * @author Oleg Petrov
 */

.divewp-ai-agent-chat {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 100050;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.divewp-ai-agent-chat__head {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	padding: 0;
	border: none;
	border-radius: 20px;
	background: transparent;
	box-shadow: none;
	cursor: pointer;
	transition: transform 0.15s ease, filter 0.15s ease;
}

.divewp-ai-agent-chat__head:hover {
	transform: translateY(-2px);
	filter: drop-shadow(0 11px 10px rgba(15, 34, 51, 0.24));
	outline: none;
}

.divewp-ai-agent-chat__head:focus-visible {
	transform: translateY(-2px);
	outline: 3px solid #7dd3fc;
	outline-offset: 3px;
}

.divewp-ai-agent-chat__head .dashicons {
	width: 28px;
	height: 28px;
	font-size: 28px;
}

.divewp-ai-agent-chat__launcher-icon {
	display: block;
	width: 64px;
	height: 64px;
	overflow: visible;
	fill: none;
	filter: drop-shadow(0 8px 9px rgba(15, 34, 51, 0.2));
}

.divewp-ai-agent-chat__launcher-surface {
	fill: #fff;
	stroke: #78dda2;
	stroke-width: 2;
}

.divewp-ai-agent-chat__launcher-ring {
	fill: none;
	stroke: #0f2233;
	stroke-width: 4.5;
	stroke-linecap: round;
}

.divewp-ai-agent-chat__launcher-check {
	fill: none;
	stroke: #48bb78;
	stroke-width: 5;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.divewp-ai-agent-chat__launcher-spark {
	fill: #087fb9;
	transform-box: fill-box;
	transform-origin: center;
	animation: divewp-ai-launcher-spark 2.8s ease-in-out infinite;
}

@keyframes divewp-ai-launcher-spark {
	0%,
	72%,
	100% {
		opacity: 0.92;
		transform: scale(1);
	}

	82% {
		opacity: 1;
		transform: scale(1.1);
	}
}

.divewp-ai-agent-chat__panel {
	position: absolute;
	right: 0;
	bottom: 72px;
	display: flex;
	flex-direction: column;
	width: 360px;
	height: min(520px, calc(100vh - 120px));
	min-width: 320px;
	min-height: 360px;
	max-width: calc(100vw - 48px);
	max-height: min(520px, calc(100vh - 120px));
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
	overflow: hidden;
	box-sizing: border-box;
}

.divewp-ai-agent-chat__panel[hidden],
.divewp-ai-agent-chat__head[hidden] {
	display: none !important;
}

.divewp-ai-agent-chat__panel *,
.divewp-ai-agent-chat__panel *::before,
.divewp-ai-agent-chat__panel *::after {
	box-sizing: border-box;
}

.divewp-ai-agent-chat.is-open .divewp-ai-agent-chat__panel {
	display: flex;
}

.divewp-ai-agent-chat.is-minimized .divewp-ai-agent-chat__panel {
	display: none;
}

.divewp-ai-agent-chat__header {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: space-between;
	padding: 14px 16px;
	background: #f8fafc;
	border-bottom: 1px solid #e2e8f0;
}

.divewp-ai-agent-chat__title {
	margin: 0;
	font-family: inherit;
	font-weight: 400;
	font-size: 16px;
	color: #0f172a;
}

.divewp-ai-agent-chat__header-actions {
	display: flex;
	gap: 4px;
}

.divewp-ai-agent-chat__style {
	display: flex;
	flex: 0 0 auto;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	padding: 10px 16px;
	background: #fff;
	border-bottom: 1px solid #e2e8f0;
}

.divewp-ai-agent-chat__style-label,
.divewp-ai-agent-chat__length-label {
	font-size: 12px;
	font-weight: 600;
	color: #64748b;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.divewp-ai-agent-chat__style-options,
.divewp-ai-agent-chat__length-options {
	display: inline-flex;
	gap: 4px;
	padding: 2px;
	background: #f1f5f9;
	border-radius: 8px;
}

.divewp-ai-agent-chat__typing-speed {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-left: auto;
	font-size: 12px;
	font-weight: 600;
	color: #64748b;
}

.divewp-ai-agent-chat__model {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 600;
	color: #64748b;
}

.divewp-ai-agent-chat__model select {
	max-width: 210px;
	min-height: 30px;
	padding: 2px 24px 2px 8px;
	border-color: #cbd5e1;
	font-size: 12px;
}

.divewp-ai-agent-chat__connectors-link {
	font-size: 12px;
}

.divewp-ai-agent-chat__model-status {
	min-width: 1px;
	font-size: 11px;
	color: #047857;
}

.divewp-ai-agent-chat__provider-status {
	flex: 1 0 100%;
	color: #64748b;
	font-size: 11px;
}

.divewp-ai-agent-chat__typing-speed select {
	min-width: 82px;
	min-height: 30px;
	padding: 2px 24px 2px 8px;
	border-color: #cbd5e1;
	font-size: 12px;
}

.divewp-ai-agent-chat__style-option,
.divewp-ai-agent-chat__length-option {
	padding: 6px 12px;
	border: none;
	border-radius: 6px;
	background: transparent;
	color: #475569;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.divewp-ai-agent-chat__style-option:hover,
.divewp-ai-agent-chat__style-option:focus,
.divewp-ai-agent-chat__length-option:hover,
.divewp-ai-agent-chat__length-option:focus {
	color: #0f172a;
	outline: none;
}

.divewp-ai-agent-chat__style-option.is-active,
.divewp-ai-agent-chat__length-option.is-active {
	background: #fff;
	color: #0284c7;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.divewp-ai-agent-chat__reset-size,
.divewp-ai-agent-chat__clear,
.divewp-ai-agent-chat__minimize,
.divewp-ai-agent-chat__close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: none;
	border-radius: 6px;
	background: transparent;
	color: #64748b;
	cursor: pointer;
}

.divewp-ai-agent-chat__reset-size:hover,
.divewp-ai-agent-chat__clear:hover,
.divewp-ai-agent-chat__minimize:hover,
.divewp-ai-agent-chat__close:hover,
.divewp-ai-agent-chat__reset-size:focus,
.divewp-ai-agent-chat__clear:focus,
.divewp-ai-agent-chat__minimize:focus,
.divewp-ai-agent-chat__close:focus {
	background: #e2e8f0;
	color: #0f172a;
	outline: none;
}

@media (prefers-reduced-motion: reduce) {
	.divewp-ai-agent-chat *,
	.divewp-ai-agent-chat *::before,
	.divewp-ai-agent-chat *::after {
		scroll-behavior: auto;
		transition-duration: 0.01ms;
		animation-duration: 0.01ms;
		animation-iteration-count: 1;
	}
}

.divewp-ai-agent-chat__diagnostic-badge {
	position: absolute;
	top: -5px;
	right: -5px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border: 2px solid #fff;
	border-radius: 999px;
	background: #d63638;
	color: #fff;
	font: 600 10px/14px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	text-align: center;
	box-sizing: border-box;
}

.divewp-ai-agent-context {
	position: relative;
	flex: 0 0 auto;
	padding: 8px 12px;
	border-bottom: 1px solid #dcdcde;
	background: #fff;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.divewp-ai-agent-context__toolbar,
.divewp-ai-agent-context__chips {
	display: flex;
	align-items: center;
	gap: 6px;
	min-width: 0;
	overflow-x: auto;
	scrollbar-width: thin;
}

.divewp-ai-agent-context__toolbar {
	margin-bottom: 7px;
}

.divewp-ai-agent-context__toolbar button,
.divewp-ai-agent-context__drawer-header button {
	min-height: 30px;
	padding: 4px 8px;
	border: 1px solid #c3c4c7;
	border-radius: 6px;
	background: #fff;
	color: #1d2327;
	cursor: pointer;
}

.divewp-ai-agent-context__toolbar button:hover,
.divewp-ai-agent-context__toolbar button:focus-visible,
.divewp-ai-agent-context__drawer-header button:hover,
.divewp-ai-agent-context__drawer-header button:focus-visible {
	border-color: #2271b1;
	color: #135e96;
	outline: 2px solid transparent;
	box-shadow: 0 0 0 1px #2271b1;
}

.divewp-ai-agent-context__chip {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	flex: 0 0 auto;
	max-width: 210px;
	padding: 3px 4px;
	border: 1px solid #a7d7c5;
	border-radius: 999px;
	background: #edfaf4;
	color: #075b43;
	font-size: 12px;
}

.divewp-ai-agent-context__chip-preview {
	max-width: 170px;
	padding: 1px 4px;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	line-height: 22px;
	cursor: pointer;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.divewp-ai-agent-context__chip-preview:hover,
.divewp-ai-agent-context__chip-preview:focus-visible {
	color: #004e3a;
	text-decoration: underline;
	outline: 2px solid #2271b1;
	outline-offset: 1px;
}

.divewp-ai-agent-context__remove {
	display: inline-grid;
	place-items: center;
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	font-size: 17px;
	line-height: 1;
	cursor: pointer;
}

.divewp-ai-agent-context__remove:hover,
.divewp-ai-agent-context__remove:focus-visible {
	background: #cdeedf;
	outline: 2px solid #2271b1;
}

.divewp-ai-agent-context__drawer {
	position: absolute;
	z-index: 8;
	left: 8px;
	right: 8px;
	top: calc(100% + 2px);
	max-height: min(390px, 55vh);
	padding: 14px;
	border: 1px solid #c3c4c7;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
	overflow: auto;
}

.divewp-ai-agent-context__drawer[hidden] {
	display: none !important;
}

.divewp-ai-agent-context__drawer-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
}

.divewp-ai-agent-context__drawer h3 {
	margin: 0 0 4px;
	font-size: 15px;
}

.divewp-ai-agent-context__drawer p {
	margin: 0 0 10px;
	color: #50575e;
	font-size: 12px;
	line-height: 1.5;
}

.divewp-ai-agent-context__preview {
	max-height: 270px;
	margin: 0;
	padding: 10px;
	border-radius: 6px;
	background: #f6f7f7;
	color: #1d2327;
	font: 11px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	white-space: pre-wrap;
	word-break: break-word;
	overflow: auto;
}

.divewp-ai-agent-chat__sources {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin-top: 10px;
}

.divewp-ai-agent-chat__source {
	display: inline-flex;
	align-items: center;
	min-height: 24px;
	padding: 2px 7px;
	border: 1px solid #c3c4c7;
	border-radius: 999px;
	background: #fff;
	color: #50575e;
	font-size: 11px;
	line-height: 1.3;
}

.divewp-ai-agent-chat__source--authoritative {
	border-color: #72aee6;
	background: #f0f6fc;
	color: #135e96;
}

.divewp-context-inspector-active,
.divewp-context-inspector-active * {
	cursor: crosshair !important;
}

.divewp-context-inspector-active #divewp-ai-agent-chat,
.divewp-context-inspector-active #divewp-ai-agent-chat * {
	cursor: default !important;
}

@media (max-width: 600px) {
	.divewp-ai-agent-context__toolbar {
		align-items: stretch;
		flex-wrap: wrap;
	}

	.divewp-ai-agent-context__toolbar button {
		flex: 1 1 auto;
	}

	.divewp-ai-agent-context__drawer {
		left: 4px;
		right: 4px;
	}
}

.divewp-ai-agent-chat__notice {
	flex: 0 0 auto;
	padding: 10px 16px;
	font-size: 13px;
	line-height: 1.5;
	border-bottom: 1px solid #e2e8f0;
}

.divewp-ai-agent-chat__notice--info {
	background: #eff6ff;
	color: #1e40af;
}

.divewp-ai-agent-chat__notice--warning {
	background: #fffbeb;
	color: #92400e;
}

.divewp-ai-agent-chat__notice--ready {
	background: #ecfdf5;
	color: #047857;
}

.divewp-ai-agent-chat__notice-text {
	display: block;
}

.divewp-ai-agent-chat__consent-link {
	display: inline-block;
	margin-top: 6px;
	color: #78350f;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.divewp-ai-agent-chat__consent-link:hover,
.divewp-ai-agent-chat__consent-link:focus {
	color: #451a03;
	outline: 2px solid currentcolor;
	outline-offset: 2px;
}

.divewp-ai-agent-chat__consent-enable {
	margin: 0 8px;
	padding: 5px 10px;
	border: 1px solid #0a7c59;
	border-radius: 6px;
	background: #0a7c59;
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.divewp-ai-agent-chat__consent-enable:hover,
.divewp-ai-agent-chat__consent-enable:focus-visible {
	background: #075b43;
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

.divewp-ai-agent-chat__consent-enable:disabled {
	opacity: 0.65;
	cursor: wait;
}

.divewp-ai-agent-chat__notice-error {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
}

.divewp-ai-agent-chat__messages-viewport {
	position: relative;
	display: flex;
	flex: 1 1 auto;
	min-width: 0;
	min-height: 0;
}

.divewp-ai-agent-chat__messages {
	flex: 1 1 auto;
	width: 100%;
	min-height: 0;
	overflow-y: auto;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.divewp-ai-agent-chat__scroll-latest {
	position: absolute;
	z-index: 4;
	right: 16px;
	bottom: 12px;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	min-height: 34px;
	padding: 6px 11px;
	border: 1px solid #cbd5e1;
	border-radius: 999px;
	background: #fff;
	box-shadow: 0 4px 14px rgba(15, 23, 42, 0.14);
	color: #334155;
	font: 600 12px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	cursor: pointer;
}

.divewp-ai-agent-chat__scroll-latest[hidden] {
	display: none;
}

.divewp-ai-agent-chat__scroll-latest:hover,
.divewp-ai-agent-chat__scroll-latest:focus-visible {
	border-color: #94a3b8;
	background: #f8fafc;
	color: #0f172a;
	outline: none;
}

.divewp-ai-agent-chat__scroll-latest:focus-visible {
	box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.24), 0 4px 14px rgba(15, 23, 42, 0.14);
}

.divewp-ai-agent-chat__opening {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.divewp-ai-agent-chat__opening--provider-required {
	max-width: 560px;
}

.divewp-ai-agent-chat__opening--upgrade-required {
	max-width: 560px;
	margin: auto;
	padding: 24px;
}

.divewp-ai-agent-chat__opening--upgrade-required > .dashicons {
	width: 48px;
	height: 48px;
	margin-bottom: 6px;
	color: #0284c7;
	font-size: 48px;
}

.divewp-ai-agent-chat__version {
	align-self: flex-start;
	margin: 0;
	padding: 5px 9px;
	border-radius: 999px;
	background: #e0f2fe;
	color: #075985;
	font-size: 12px;
	font-weight: 600;
}

.divewp-ai-agent-chat__upgrade-steps {
	margin: 2px 0 4px 20px;
	padding: 0;
	color: #334155;
	font-size: 13px;
	line-height: 1.55;
}

.divewp-ai-agent-chat__upgrade-steps li + li {
	margin-top: 5px;
}

.divewp-ai-agent-chat__update-wordpress {
	align-self: flex-start;
	text-decoration: none;
}

.divewp-ai-agent-chat__upgrade-help {
	margin: 0;
	padding: 10px 12px;
	border-left: 3px solid #d97706;
	background: #fffbeb;
	color: #78350f;
	font-size: 13px;
	line-height: 1.45;
}

.divewp-ai-agent-chat__opening--provider-required > .dashicons {
	width: 48px;
	height: 48px;
	margin-bottom: 12px;
	color: #b45309;
	font-size: 48px;
}

.divewp-ai-agent-chat__connect-provider {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 9px 18px;
	border-radius: 7px;
	background: #087fb9;
	color: #fff;
	font-weight: 600;
	text-decoration: none;
}

.divewp-ai-agent-chat__connect-provider:hover,
.divewp-ai-agent-chat__connect-provider:focus-visible {
	background: #0369a1;
	color: #fff;
	outline: 2px solid #7dd3fc;
	outline-offset: 2px;
}

.divewp-ai-agent-chat.is-chat-unavailable .divewp-ai-agent-context {
	display: none;
}

.divewp-ai-agent-chat.is-wp-unavailable .divewp-ai-agent-chat__history-toggle,
.divewp-ai-agent-chat.is-wp-unavailable .divewp-ai-agent-chat__header-button,
.divewp-ai-agent-chat.is-wp-unavailable .divewp-ai-agent-chat__history,
.divewp-ai-agent-chat.is-wp-unavailable .divewp-ai-agent-chat__history-backdrop,
.divewp-ai-agent-chat.is-wp-unavailable .divewp-ai-agent-chat__conversation-loading,
.divewp-ai-agent-chat.is-wp-unavailable .divewp-ai-agent-chat__settings,
.divewp-ai-agent-chat.is-wp-unavailable .divewp-ai-agent-chat__notice,
.divewp-ai-agent-chat.is-wp-unavailable .divewp-ai-agent-chat__form,
.divewp-ai-agent-chat.is-wp-unavailable .divewp-ai-agent-chat__resize-handle,
.divewp-ai-agent-chat.is-wp-unavailable .divewp-ai-agent-chat__scroll-latest {
	display: none !important;
}

.divewp-ai-agent-chat.is-wp-unavailable .divewp-ai-agent-chat__panel {
	width: min(460px, calc(100vw - 48px));
	height: min(590px, calc(100vh - 120px));
	min-height: 440px;
}

.divewp-ai-agent-chat.is-wp-unavailable .divewp-ai-agent-chat__messages {
	overflow-y: auto;
}

.divewp-ai-agent-chat.is-chat-unavailable .divewp-ai-agent-chat__input:disabled,
.divewp-ai-agent-chat.is-chat-unavailable .divewp-ai-agent-chat__send:disabled {
	cursor: not-allowed;
	opacity: 0.6;
}

.divewp-ai-agent-chat__greeting {
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
	color: #334155;
}

.divewp-ai-agent-chat__suggestions {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.divewp-ai-agent-chat__suggestions-label {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #64748b;
}

.divewp-ai-agent-chat__suggestion {
	align-self: flex-start;
	padding: 8px 12px;
	border: 1px solid #cbd5e1;
	border-radius: 999px;
	background: #fff;
	color: #0f172a;
	font-size: 13px;
	line-height: 1.4;
	text-align: left;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.divewp-ai-agent-chat__suggestion:hover,
.divewp-ai-agent-chat__suggestion:focus {
	border-color: #0284c7;
	background: #f0f9ff;
	color: #0369a1;
	outline: none;
}

.divewp-ai-agent-chat__message {
	max-width: 92%;
	padding: 10px 12px;
	border-radius: 10px;
	font-size: 14px;
	line-height: 1.5;
	word-break: break-word;
}

.divewp-ai-agent-chat__message--user {
	align-self: flex-end;
	background: #0284c7;
	color: #fff;
	border-bottom-right-radius: 4px;
}

.divewp-ai-agent-chat__message--assistant {
	align-self: flex-start;
	background: #f1f5f9;
	color: #0f172a;
	border-bottom-left-radius: 4px;
}

.divewp-ai-agent-chat__message--system {
	align-self: center;
	background: transparent;
	color: #64748b;
	font-size: 13px;
	padding: 0;
}

.divewp-ai-agent-chat__message--failed-turn .divewp-ai-agent-chat__message-body {
	display: flex;
	align-items: center;
	gap: 8px;
}

.divewp-ai-agent-chat__retry {
	min-height: 30px;
	padding: 3px 10px;
	border: 1px solid #cbd5e1;
	border-radius: 999px;
	background: #fff;
	color: #0f172a;
	cursor: pointer;
	font-weight: 600;
}

.divewp-ai-agent-chat__retry:hover,
.divewp-ai-agent-chat__retry:focus-visible {
	border-color: #0284c7;
	color: #0369a1;
}

.divewp-ai-agent-chat__load-older-messages {
	align-self: center;
	padding: 5px 12px;
	border: 1px solid #cbd5e1;
	border-radius: 999px;
	background: #fff;
	color: #475569;
	cursor: pointer;
}

.divewp-ai-agent-chat__load-older-messages:hover,
.divewp-ai-agent-chat__load-older-messages:focus-visible {
	border-color: #0284c7;
	color: #0369a1;
}

.divewp-ai-agent-chat__message-label {
	display: block;
	margin-bottom: 4px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	opacity: 0.75;
}

.divewp-ai-agent-chat__message-body {
	white-space: pre-wrap;
}

.divewp-ai-agent-chat__generation {
	margin-top: 8px;
	padding-top: 6px;
	border-top: 1px solid rgba(100, 116, 139, 0.25);
	color: #64748b;
	font-size: 11px;
	line-height: 1.35;
}

.divewp-ai-agent-chat__message.is-streaming .is-active-stream-block::after {
	display: inline-block;
	width: 2px;
	height: 1em;
	margin-left: 2px;
	vertical-align: -0.12em;
	background: currentcolor;
	content: "";
	animation: divewp-ai-agent-chat-cursor 0.8s steps(2, start) infinite;
}

.divewp-ai-agent-chat__message.is-waiting .divewp-ai-agent-chat__message-body {
	color: #64748b;
	font-style: italic;
}

@keyframes divewp-ai-agent-chat-cursor {
	50% {
		opacity: 0;
	}
}

.divewp-ai-agent-chat__resize-handle {
	position: absolute;
	z-index: 12;
	display: block;
	touch-action: none;
	user-select: none;
}

.divewp-ai-agent-chat__resize-handle--n,
.divewp-ai-agent-chat__resize-handle--s {
	left: 12px;
	width: calc(100% - 24px);
	height: 10px;
	cursor: ns-resize;
}

.divewp-ai-agent-chat__resize-handle--n {
	top: 0;
}

.divewp-ai-agent-chat__resize-handle--s {
	bottom: 0;
}

.divewp-ai-agent-chat__resize-handle--e,
.divewp-ai-agent-chat__resize-handle--w {
	top: 12px;
	width: 10px;
	height: calc(100% - 24px);
	cursor: ew-resize;
}

.divewp-ai-agent-chat__resize-handle--e {
	right: 0;
}

.divewp-ai-agent-chat__resize-handle--w {
	left: 0;
}

.divewp-ai-agent-chat__resize-handle--ne,
.divewp-ai-agent-chat__resize-handle--se,
.divewp-ai-agent-chat__resize-handle--sw,
.divewp-ai-agent-chat__resize-handle--nw {
	width: 14px;
	height: 14px;
}

.divewp-ai-agent-chat__resize-handle--ne {
	top: 0;
	right: 0;
	cursor: nesw-resize;
}

.divewp-ai-agent-chat__resize-handle--se {
	right: 0;
	bottom: 0;
	cursor: nwse-resize;
}

.divewp-ai-agent-chat__resize-handle--sw {
	bottom: 0;
	left: 0;
	cursor: nesw-resize;
}

.divewp-ai-agent-chat__resize-handle--nw {
	top: 0;
	left: 0;
	cursor: nwse-resize;
}

body.divewp-ai-agent-chat-is-resizing {
	cursor: default;
	user-select: none;
}

.divewp-ai-agent-chat__form {
	display: flex;
	flex: 0 0 auto;
	flex-direction: column;
	gap: 8px;
	padding: 12px 16px 16px;
	border-top: 1px solid #e2e8f0;
	background: #fff;
}

.divewp-ai-agent-chat__input {
	width: 100%;
	min-height: 56px;
	padding: 10px 12px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	font-size: 14px;
	line-height: 1.4;
	resize: none;
}

.divewp-ai-agent-chat__input:focus {
	border-color: #0284c7;
	box-shadow: 0 0 0 1px #0284c7;
	outline: none;
}

.divewp-ai-agent-chat__send {
	display: inline-flex;
	flex: 0 0 auto;
	align-self: flex-end;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 8px 16px;
	border: 1px solid transparent;
	border-radius: 6px;
	background: #48bb78;
	color: #fff;
	font: inherit;
	font-size: 14px;
	line-height: 1.4;
	cursor: pointer;
	transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.divewp-ai-agent-chat__send:hover {
	background: #38a169;
	color: #fff;
	transform: translateY(-1px);
}

.divewp-ai-agent-chat__send:focus-visible {
	outline: 2px solid #0284c7;
	outline-offset: 2px;
}

.divewp-ai-agent-chat__send:active {
	transform: translateY(0);
}

.divewp-ai-agent-chat__send:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

.divewp-ai-agent-chat.is-loading .divewp-ai-agent-chat__send {
	pointer-events: none;
}

@media (max-width: 480px) {
	.divewp-ai-agent-chat {
		right: 16px;
		bottom: 16px;
	}

	.divewp-ai-agent-chat__panel {
		width: calc(100vw - 32px);
		min-width: 0;
		min-height: 320px;
	}

	.divewp-ai-agent-chat__resize-handle,
	.divewp-ai-agent-chat__reset-size {
		display: none;
	}
}

/* Simplified AI Agent shell using the existing DiveWP visual language. */
@font-face {
	font-family: "Literata";
	src: url("../../fonts/literata-variable.ttf") format("truetype-variations"),
		url("../../fonts/literata-variable.ttf") format("truetype");
	font-weight: 200 900;
	font-style: normal;
}

.divewp-ai-agent-chat__panel {
	width: min(760px, calc(100vw - 48px));
	height: min(700px, calc(100vh - 104px));
}

.divewp-ai-agent-chat__header {
	gap: 12px;
	min-height: 72px;
	padding: 12px 16px;
	background: #fff;
}

.divewp-ai-agent-chat__title,
.divewp-ai-agent-chat__settings-header h3,
.divewp-ai-agent-chat__opening-title {
	font-family: "Literata", Georgia, serif;
}

.divewp-ai-agent-chat__title {
	font-size: 18px;
}

.divewp-ai-agent-chat__history-toggle,
.divewp-ai-agent-chat__header-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: auto;
	height: 36px;
	min-height: 36px;
	padding: 6px 10px;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	background: #fff;
	color: #475569;
	font: inherit;
	font-size: 13px;
	font-weight: 500;
	white-space: nowrap;
	cursor: pointer;
}

.divewp-ai-agent-chat__history-toggle:hover,
.divewp-ai-agent-chat__history-toggle:focus-visible,
.divewp-ai-agent-chat__header-button:hover,
.divewp-ai-agent-chat__header-button:focus-visible {
	border-color: #0284c7;
	background: #f0f9ff;
	color: #0369a1;
	outline: 2px solid #38bdf8;
	outline-offset: 1px;
}

.divewp-ai-agent-chat__header-actions {
	align-items: center;
	gap: 6px;
}

.divewp-ai-agent-chat__close {
	flex: 0 0 34px;
}

.divewp-ai-agent-chat__history-header {
	padding: 4px 6px 10px;
}

.divewp-ai-agent-chat__history-header strong {
	font-family: "Literata", Georgia, serif;
	font-size: 14px;
}

.divewp-ai-agent-chat.has-wide-history .divewp-ai-agent-chat__history,
.divewp-ai-agent-chat.has-history-rail .divewp-ai-agent-chat__history {
	display: none;
}

.divewp-ai-agent-chat__settings[hidden],
.divewp-ai-agent-context__toolbar[hidden] {
	display: none;
}

.divewp-ai-agent-chat__settings {
	position: absolute;
	z-index: 10;
	top: 0;
	right: 0;
	display: flex;
	flex-direction: column;
	width: min(420px, 100%);
	max-height: 100%;
	padding: 0;
	overflow: auto;
	background: #fff;
	border-left: 1px solid #e2e8f0;
	box-shadow: -12px 0 30px rgba(15, 23, 42, 0.14);
}

.divewp-ai-agent-chat__settings-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px;
	border-bottom: 1px solid #e2e8f0;
}

.divewp-ai-agent-chat__settings-header h3 {
	margin: 0;
	color: #1f2937;
	font-size: 18px;
	font-weight: 500;
}

.divewp-ai-agent-chat__settings-header button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: #64748b;
	cursor: pointer;
}

.divewp-ai-agent-chat__style {
	display: grid;
	grid-template-columns: max-content minmax(0, 1fr);
	gap: 14px 12px;
	padding: 18px 16px;
	border: 0;
}

.divewp-ai-agent-chat__style-options,
.divewp-ai-agent-chat__length-options,
.divewp-ai-agent-chat__model,
.divewp-ai-agent-chat__typing-speed,
.divewp-ai-agent-chat__connectors-link,
.divewp-ai-agent-chat__model-status,
.divewp-ai-agent-chat__provider-status,
.divewp-ai-agent-chat__manage-css {
	grid-column: 2;
}

.divewp-ai-agent-chat__model,
.divewp-ai-agent-chat__typing-speed {
	display: grid;
	grid-template-columns: 1fr;
	gap: 6px;
	margin: 0;
}

.divewp-ai-agent-chat__model select,
.divewp-ai-agent-chat__typing-speed select {
	width: 100%;
	max-width: none;
	min-height: 38px;
	border-radius: 6px;
}

.divewp-ai-agent-chat__provider-status {
	line-height: 1.5;
}

.divewp-ai-agent-chat__web-sources {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid #e2e8f0;
	font-size: 12px;
}

.divewp-ai-agent-chat__web-sources > strong {
	flex-basis: 100%;
	color: #475569;
}

.divewp-ai-agent-chat__web-source {
	display: inline-flex;
	align-items: center;
	max-width: 100%;
	padding: 4px 8px;
	overflow: hidden;
	border: 1px solid #bae6d3;
	border-radius: 999px;
	background: #f0fdf7;
	color: #087f5b;
	text-decoration: none;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.divewp-ai-agent-chat__web-source:hover,
.divewp-ai-agent-chat__web-source:focus-visible {
	border-color: #48bb78;
	color: #065f46;
	text-decoration: underline;
}

.divewp-ai-agent-chat__notice--ready {
	display: none;
}

.divewp-ai-agent-context {
	padding: 0;
	background: #edfaf4;
	border-bottom: 1px solid #c7ead7;
}

.divewp-ai-agent-context__summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 58px;
	padding: 10px 16px;
	color: #087f5b;
	font-size: 14px;
	font-weight: 600;
}

.divewp-ai-agent-context__summary > span {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.divewp-ai-agent-context__status-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: #48bb78;
}

.divewp-ai-agent-context__summary button {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 36px;
	padding: 6px 12px;
	border: 1px solid #8bd1ad;
	border-radius: 6px;
	background: #fff;
	color: #087f5b;
	font: inherit;
	font-size: 13px;
	cursor: pointer;
}

.divewp-ai-agent-context__toolbar {
	padding: 10px 16px 14px;
	border-top: 1px solid #c7ead7;
}

.divewp-ai-agent-context__chips {
	padding: 0 16px 10px;
}

.divewp-ai-agent-chat__messages {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
}

.divewp-ai-agent-chat__opening {
	align-self: center;
	width: min(100%, 680px);
	margin: auto;
	padding: 28px 12px;
	text-align: center;
}

.divewp-ai-agent-chat__opening-title {
	margin: 0 0 10px;
	color: #1f2937;
	font-size: 24px;
	font-weight: 500;
}

.divewp-ai-agent-chat__greeting {
	max-width: 620px;
	margin: 0 auto 22px;
	color: #64748b;
	font-size: 15px;
	line-height: 1.6;
}

.divewp-ai-agent-chat__suggestions {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
}

.divewp-ai-agent-chat__suggestions-label {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.divewp-ai-agent-chat__suggestion {
	width: auto;
	min-height: 42px;
	padding: 9px 14px;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	background: #fff;
	color: #334155;
	font-size: 13px;
	font-weight: 500;
}

.divewp-ai-agent-chat__form {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 6px;
	width: min(100%, 720px);
	margin: 0 auto;
	padding: 12px 16px 16px;
}

.divewp-ai-agent-chat__input {
	min-height: 76px;
	padding: 14px 16px 46px;
	border: 1px solid #cbd5e1;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}

.divewp-ai-agent-chat__input:focus {
	border-color: #0284c7;
	box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.28);
	outline: none;
}

.divewp-ai-agent-chat__composer-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: -48px;
	padding: 0 8px 8px;
	pointer-events: none;
}

.divewp-ai-agent-chat__composer-actions > * {
	pointer-events: auto;
}

.divewp-ai-agent-chat__enter-hint {
	margin-left: auto;
	color: #94a3b8;
	font-size: 11px;
}

.divewp-ai-agent-chat__send {
	min-height: 38px;
	padding: 8px 16px;
	border: 0;
	border-radius: 6px;
	background: #48bb78;
	color: #fff;
	font-size: 14px;
	font-weight: 500;
}

.divewp-ai-agent-chat__send:hover,
.divewp-ai-agent-chat__send:focus-visible {
	background: #38a169;
	outline: 2px solid #9ae6b4;
	outline-offset: 1px;
}

@media (max-width: 820px) {
	.divewp-ai-agent-chat__panel {
		width: min(620px, calc(100vw - 32px));
	}

	.divewp-ai-agent-chat__header-button > span:not(.dashicons),
	.divewp-ai-agent-chat__history-toggle > span:not(.dashicons) {
		display: none;
	}

	.divewp-ai-agent-chat__header-button,
	.divewp-ai-agent-chat__history-toggle {
		width: 36px;
		padding: 0;
	}
}

@media (max-width: 480px) {
	.divewp-ai-agent-chat__panel {
		width: calc(100vw - 24px);
		height: calc(100dvh - 84px);
	}

	.divewp-ai-agent-chat__heading {
		max-width: 150px;
	}

	.divewp-ai-agent-chat__header {
		gap: 6px;
		padding: 8px;
	}

	.divewp-ai-agent-context__summary {
		align-items: flex-start;
		flex-direction: column;
	}

	.divewp-ai-agent-chat__style {
		grid-template-columns: 1fr;
	}

	.divewp-ai-agent-chat__style-options,
	.divewp-ai-agent-chat__length-options,
	.divewp-ai-agent-chat__model,
	.divewp-ai-agent-chat__typing-speed,
	.divewp-ai-agent-chat__connectors-link,
	.divewp-ai-agent-chat__model-status,
	.divewp-ai-agent-chat__provider-status {
		grid-column: 1;
	}

	.divewp-ai-agent-chat__enter-hint {
		display: none;
	}

}

/* Conversation workspace: compact like Gemini, calm like Claude, and familiar like ChatGPT. */
.divewp-ai-agent-chat__panel {
	width: 440px;
	height: min(680px, calc(100vh - 104px));
	max-height: calc(100vh - 104px);
	border-radius: 16px;
}

.divewp-ai-agent-chat__header {
	position: relative;
	z-index: 8;
	min-height: 58px;
	gap: 8px;
	padding: 10px 12px;
}

.divewp-ai-agent-chat__heading {
	min-width: 0;
	margin-right: auto;
}

.divewp-ai-agent-chat__conversation-title {
	display: block;
	max-width: 280px;
	overflow: hidden;
	color: #64748b;
	font-size: 11px;
	line-height: 1.35;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.divewp-ai-agent-chat__history-toggle,
.divewp-ai-agent-chat__fullscreen,
.divewp-ai-agent-chat__new,
.divewp-ai-agent-chat__delete-all,
.divewp-ai-agent-chat__conversation-actions button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	background: transparent;
	color: #64748b;
	cursor: pointer;
}

.divewp-ai-agent-chat__history-toggle,
.divewp-ai-agent-chat__fullscreen {
	width: 32px;
	height: 32px;
	padding: 0;
	border-radius: 7px;
}

.divewp-ai-agent-chat__history-toggle:hover,
.divewp-ai-agent-chat__history-toggle:focus-visible,
.divewp-ai-agent-chat__fullscreen:hover,
.divewp-ai-agent-chat__fullscreen:focus-visible,
.divewp-ai-agent-chat__new:hover,
.divewp-ai-agent-chat__new:focus-visible,
.divewp-ai-agent-chat__delete-all:hover,
.divewp-ai-agent-chat__delete-all:focus-visible,
.divewp-ai-agent-chat__conversation-actions button:hover,
.divewp-ai-agent-chat__conversation-actions button:focus-visible {
	background: #e2e8f0;
	color: #0f172a;
	outline: 2px solid #38bdf8;
	outline-offset: 1px;
}

.divewp-ai-agent-chat__workspace {
	position: relative;
	display: flex;
	flex: 1 1 auto;
	min-width: 0;
	min-height: 0;
	overflow: hidden;
}

.divewp-ai-agent-chat__main {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-width: 0;
	min-height: 0;
	background: #fff;
}

.divewp-ai-agent-chat__history {
	display: none;
	flex: 0 0 252px;
	flex-direction: column;
	min-width: 0;
	min-height: 0;
	padding: 10px 8px;
	background: #f8fafc;
	border-right: 1px solid #e2e8f0;
	overflow: hidden;
}

.divewp-ai-agent-chat__history-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	min-height: 38px;
	padding: 0 4px 8px;
	color: #334155;
}

.divewp-ai-agent-chat__history-header strong {
	font-size: 12px;
	letter-spacing: 0.02em;
}

.divewp-ai-agent-chat__new {
	gap: 5px;
	min-height: 32px;
	padding: 5px 8px;
	border-radius: 7px;
	font-size: 12px;
	font-weight: 600;
}

.divewp-ai-agent-chat__delete-all {
	flex: 0 0 32px;
	width: 32px;
	height: 32px;
	padding: 0;
	border-radius: 7px;
	color: #b32d2e;
}

.divewp-ai-agent-chat__history-status {
	padding: 10px 7px;
	color: #64748b;
	font-size: 12px;
	line-height: 1.45;
}

.divewp-ai-agent-chat__history-tabs {
	display: flex;
	gap: 3px;
	padding: 2px;
	background: #edf2f7;
	border-radius: 8px;
}

.divewp-ai-agent-chat__history-tabs button {
	flex: 1 1 50%;
	padding: 5px 7px;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: #64748b;
	font-size: 11px;
	cursor: pointer;
}

.divewp-ai-agent-chat__history-tabs button.is-active {
	background: #fff;
	color: #0f172a;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.divewp-ai-agent-chat__conversation-list {
	min-height: 0;
	overflow-y: auto;
}

.divewp-ai-agent-chat__load-more-conversations {
	display: block;
	width: calc(100% - 16px);
	margin: 8px;
	padding: 7px 10px;
	border: 1px solid #cbd5e1;
	border-radius: 9px;
	background: #fff;
	color: #334155;
	cursor: pointer;
}

.divewp-ai-agent-chat__load-more-conversations:hover,
.divewp-ai-agent-chat__load-more-conversations:focus-visible {
	border-color: #0284c7;
	color: #0369a1;
}

.divewp-ai-agent-chat__conversation {
	position: relative;
	display: flex;
	align-items: center;
	margin: 2px 0;
	border-radius: 9px;
}

.divewp-ai-agent-chat__conversation:hover,
.divewp-ai-agent-chat__conversation.is-active {
	background: #e9f3fb;
}

.divewp-ai-agent-chat__conversation-open {
	display: flex;
	align-items: center;
	gap: 9px;
	min-width: 0;
	width: 100%;
	min-height: 46px;
	padding: 7px 66px 7px 8px;
	border: 0;
	border-radius: 9px;
	background: transparent;
	color: #1e293b;
	text-align: left;
	cursor: pointer;
}

.divewp-ai-agent-chat__conversation-open:focus-visible {
	outline: 2px solid #0284c7;
	outline-offset: -2px;
}

.divewp-ai-agent-chat__conversation-copy {
	display: flex;
	min-width: 0;
	flex: 1 1 auto;
	flex-direction: column;
}

.divewp-ai-agent-chat__conversation-name {
	overflow: hidden;
	font-size: 12px;
	font-weight: 600;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.divewp-ai-agent-chat__conversation-date {
	color: #64748b;
	font-size: 10px;
}

.divewp-ai-agent-chat__conversation-actions {
	position: absolute;
	right: 4px;
	display: none;
	align-items: center;
	background: inherit;
}

.divewp-ai-agent-chat__conversation:hover .divewp-ai-agent-chat__conversation-actions,
.divewp-ai-agent-chat__conversation:focus-within .divewp-ai-agent-chat__conversation-actions {
	display: flex;
}

.divewp-ai-agent-chat__conversation-actions button {
	width: 25px;
	height: 28px;
	padding: 0;
	border-radius: 5px;
}

.divewp-ai-agent-chat__conversation-actions .dashicons {
	width: 15px;
	height: 15px;
	font-size: 15px;
}

.divewp-ai-agent-chat.has-wide-history .divewp-ai-agent-chat__history,
.divewp-ai-agent-chat.has-history-rail .divewp-ai-agent-chat__history {
	display: flex;
}

.divewp-ai-agent-chat.has-wide-history .divewp-ai-agent-chat__history-toggle {
	display: none;
}

.divewp-ai-agent-chat.has-history-rail .divewp-ai-agent-chat__history {
	flex-basis: 54px;
	padding-right: 5px;
	padding-left: 5px;
}

.divewp-ai-agent-chat.has-history-rail .divewp-ai-agent-chat__history-header strong,
.divewp-ai-agent-chat.has-history-rail .divewp-ai-agent-chat__new span:last-child,
.divewp-ai-agent-chat.has-history-rail .divewp-ai-agent-chat__delete-all,
.divewp-ai-agent-chat.has-history-rail .divewp-ai-agent-chat__history-status,
.divewp-ai-agent-chat.has-history-rail .divewp-ai-agent-chat__history-tabs,
.divewp-ai-agent-chat.has-history-rail .divewp-ai-agent-chat__conversation-copy,
.divewp-ai-agent-chat.has-history-rail .divewp-ai-agent-chat__conversation-actions {
	display: none;
}

.divewp-ai-agent-chat.has-history-rail .divewp-ai-agent-chat__history-header {
	justify-content: center;
}

.divewp-ai-agent-chat.has-history-rail .divewp-ai-agent-chat__new,
.divewp-ai-agent-chat.has-history-rail .divewp-ai-agent-chat__conversation-open {
	justify-content: center;
	width: 42px;
	padding: 7px;
}

.divewp-ai-agent-chat.has-history-rail .divewp-ai-agent-chat__load-more-conversations {
	width: 38px;
	height: 38px;
	padding: 0;
	overflow: hidden;
	font-size: 0;
}

.divewp-ai-agent-chat.has-history-rail .divewp-ai-agent-chat__load-more-conversations::before {
	font-size: 18px;
	content: "…";
}

.divewp-ai-agent-chat.is-history-open .divewp-ai-agent-chat__history {
	position: absolute;
	z-index: 7;
	top: 0;
	bottom: 0;
	left: 0;
	display: flex;
	width: min(280px, calc(100% - 52px));
	box-shadow: 12px 0 30px rgba(15, 23, 42, 0.16);
}

body.rtl .divewp-ai-agent-chat.is-history-open .divewp-ai-agent-chat__history {
	right: 0;
	left: auto;
	box-shadow: -12px 0 30px rgba(15, 23, 42, 0.16);
}

.divewp-ai-agent-chat__messages {
	padding: 20px clamp(16px, 4vw, 48px);
}

.divewp-ai-agent-chat__message {
	width: fit-content;
	max-width: min(86%, 760px);
	padding: 12px 14px;
	border-radius: 16px;
}

.divewp-ai-agent-chat__message--assistant {
	width: min(92%, 760px);
	padding: 0;
	background: transparent;
	border-radius: 0;
}

.divewp-ai-agent-chat__response-blocks {
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-width: 0;
}

.divewp-ai-agent-chat__message-body--assistant {
	width: fit-content;
	max-width: 100%;
	padding: 12px 14px;
	border-radius: 16px;
	border-bottom-left-radius: 5px;
	background: #f3f5f7;
	color: #0f172a;
	white-space: pre-wrap;
}

.divewp-ai-agent-chat__code-card {
	width: 100%;
	min-width: 0;
	overflow: hidden;
	border: 1px solid #334155;
	border-radius: 12px;
	background: #0f172a;
	color: #e2e8f0;
	box-shadow: 0 5px 18px rgba(15, 23, 42, 0.12);
}

.divewp-ai-agent-chat__code-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 38px;
	padding: 6px 8px 6px 12px;
	border-bottom: 1px solid #334155;
	background: #1e293b;
}

.divewp-ai-agent-chat__code-language {
	overflow: hidden;
	color: #cbd5e1;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-overflow: ellipsis;
	text-transform: uppercase;
	white-space: nowrap;
}

.divewp-ai-agent-chat__copy-code {
	flex: 0 0 auto;
	min-height: 28px;
	padding: 3px 9px;
	border: 1px solid #64748b;
	border-radius: 6px;
	background: #0f172a;
	color: #f8fafc;
	font-size: 11px;
	font-weight: 600;
	cursor: pointer;
}

.divewp-ai-agent-chat__copy-code:hover,
.divewp-ai-agent-chat__copy-code:focus-visible {
	border-color: #7dd3fc;
	background: #075985;
	color: #fff;
	outline: 2px solid #7dd3fc;
	outline-offset: 1px;
}

.divewp-ai-agent-chat__copy-code:disabled {
	cursor: default;
	opacity: 0.8;
}

.divewp-ai-agent-chat__code-pre {
	max-width: 100%;
	max-height: min(360px, 45vh);
	margin: 0;
	padding: 14px;
	overflow: auto;
	background: #0f172a;
	color: #e2e8f0;
	font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
	tab-size: 4;
	white-space: pre;
	word-break: normal;
	word-wrap: normal;
}

.divewp-ai-agent-chat__code-pre:focus-visible {
	outline: 2px solid #38bdf8;
	outline-offset: -2px;
}

.divewp-ai-agent-chat__code {
	display: inline;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
}

.divewp-ai-agent-chat__copy-fallback {
	position: fixed;
	top: 0;
	left: -9999px;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.divewp-ai-agent-chat__copy-status {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.divewp-ai-agent-chat__message--user {
	background: #087fb9;
	border-bottom-right-radius: 5px;
}

.divewp-ai-agent-chat__form {
	padding: 12px clamp(16px, 4vw, 48px) 18px;
}

.divewp-ai-agent-chat__input {
	min-height: 64px;
	border-radius: 14px;
	background: #fbfdff;
}

.divewp-ai-agent-chat.is-fullscreen .divewp-ai-agent-chat__head {
	display: none;
}

.divewp-ai-agent-chat.is-fullscreen .divewp-ai-agent-chat__panel {
	position: fixed !important;
	z-index: 100051;
	top: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	left: 0 !important;
	width: auto !important;
	height: auto !important;
	max-width: none !important;
	max-height: none !important;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.divewp-ai-agent-chat.is-fullscreen .divewp-ai-agent-chat__history {
	flex-basis: 280px;
}

.divewp-ai-agent-chat.is-fullscreen.has-wide-history .divewp-ai-agent-chat__history-toggle {
	display: inline-flex;
}

.divewp-ai-agent-chat.is-fullscreen.has-wide-history.is-fullscreen-history-collapsed .divewp-ai-agent-chat__history {
	display: none;
}

.divewp-ai-agent-chat.is-fullscreen .divewp-ai-agent-chat__messages,
.divewp-ai-agent-chat.is-fullscreen .divewp-ai-agent-chat__form {
	width: min(100%, 960px);
	margin-right: auto;
	margin-left: auto;
}

.divewp-ai-agent-chat.is-fullscreen .divewp-ai-agent-chat__messages {
	flex-basis: 960px;
	max-width: 960px;
	gap: 30px;
	padding-top: 34px;
	padding-bottom: 40px;
}

.divewp-ai-agent-chat.is-fullscreen .divewp-ai-agent-chat__message--assistant {
	width: 100%;
	max-width: 100%;
}

.divewp-ai-agent-chat.is-fullscreen .divewp-ai-agent-chat__message-body--assistant {
	width: 100%;
	max-width: none;
	padding: 0;
	border-radius: 0;
	background: transparent;
	font-size: 16px;
	line-height: 1.7;
	white-space: normal;
}

.divewp-ai-agent-chat.is-fullscreen .divewp-ai-agent-chat__message-body--assistant p {
	margin-bottom: 14px;
}

.divewp-ai-agent-chat.is-fullscreen .divewp-ai-agent-chat__message-body--assistant h3,
.divewp-ai-agent-chat.is-fullscreen .divewp-ai-agent-chat__message-body--assistant h4,
.divewp-ai-agent-chat.is-fullscreen .divewp-ai-agent-chat__message-body--assistant h5,
.divewp-ai-agent-chat.is-fullscreen .divewp-ai-agent-chat__message-body--assistant h6 {
	margin-top: 22px;
	margin-bottom: 9px;
	font-size: 1.08em;
}

.divewp-ai-agent-chat.is-fullscreen .divewp-ai-agent-chat__message-label {
	margin-bottom: 9px;
}

.divewp-ai-agent-chat.is-fullscreen .divewp-ai-agent-chat__message--user {
	max-width: min(72%, 680px);
	padding: 12px 16px;
	line-height: 1.55;
}

.divewp-ai-agent-chat.is-fullscreen .divewp-ai-agent-chat__response-blocks {
	gap: 16px;
}

.divewp-ai-agent-chat.is-fullscreen .divewp-ai-agent-chat__form {
	padding-top: 12px;
	padding-bottom: 20px;
	border-top: 0;
}

.divewp-ai-agent-chat.is-fullscreen .divewp-ai-agent-chat__input {
	min-height: 84px;
}

body.divewp-ai-agent-chat-fullscreen-open {
	overflow: hidden;
}

body.folded .divewp-ai-agent-chat.is-fullscreen .divewp-ai-agent-chat__panel {
	left: 0 !important;
}

body.rtl .divewp-ai-agent-chat.is-fullscreen .divewp-ai-agent-chat__panel {
	right: 0 !important;
	left: 0 !important;
}

body.rtl.folded .divewp-ai-agent-chat.is-fullscreen .divewp-ai-agent-chat__panel {
	right: 0 !important;
}

/* Focused v1 site-item mentions and verified maintenance actions. */
.divewp-ai-agent-chat__maintenance-mode {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: 12px;
	color: #334155;
	font-size: 12px;
	font-weight: 600;
}

.divewp-ai-agent-chat__maintenance-mode select {
	width: 100%;
	min-height: 36px;
}

.divewp-ai-agent-chat__maintenance-mode small {
	color: #64748b;
	font-weight: 400;
	line-height: 1.45;
}

.divewp-ai-agent-chat__mention-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 2px 2px 0;
}

.divewp-ai-agent-chat__mention-chips[hidden],
.divewp-ai-agent-chat__mention-menu[hidden] {
	display: none;
}

.divewp-ai-agent-chat__mention-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	max-width: 100%;
	padding: 5px 7px 5px 9px;
	border: 1px solid #bae6fd;
	border-radius: 999px;
	background: #f0f9ff;
	color: #075985;
	font-size: 12px;
	font-weight: 600;
}

.divewp-ai-agent-chat__mention-remove {
	display: inline-grid;
	place-items: center;
	width: 20px;
	height: 20px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #e0f2fe;
	color: #0369a1;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
}

.divewp-ai-agent-chat__mention-menu {
	position: absolute;
	z-index: 12;
	right: 16px;
	bottom: calc(100% - 8px);
	left: 16px;
	display: flex;
	max-height: min(320px, 48vh);
	padding: 6px;
	overflow-y: auto;
	border: 1px solid #cbd5e1;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 14px 36px rgba(15, 23, 42, 0.2);
	flex-direction: column;
	gap: 2px;
}

.divewp-ai-agent-chat__mention-option {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	min-height: 50px;
	padding: 8px 10px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: #334155;
	text-align: left;
	cursor: pointer;
}

.divewp-ai-agent-chat__mention-option:hover,
.divewp-ai-agent-chat__mention-option.is-active,
.divewp-ai-agent-chat__mention-option:focus-visible {
	background: #f0f9ff;
	color: #075985;
	outline: none;
}

.divewp-ai-agent-chat__mention-option > .dashicons {
	flex: 0 0 auto;
	color: #0284c7;
}

.divewp-ai-agent-chat__mention-option-copy {
	display: flex;
	min-width: 0;
	flex-direction: column;
	gap: 2px;
}

.divewp-ai-agent-chat__mention-option-copy strong,
.divewp-ai-agent-chat__mention-option-copy small {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.divewp-ai-agent-chat__mention-option-copy small,
.divewp-ai-agent-chat__mention-empty {
	color: #64748b;
	font-size: 11px;
	font-weight: 400;
}

.divewp-ai-agent-chat__mention-empty {
	padding: 14px;
	text-align: center;
}

.divewp-ai-agent-chat__mention-open strong {
	font-size: 17px;
	line-height: 1;
}

.divewp-ai-agent-chat__message-attachment--mention {
	border-color: #bae6fd;
	background: #f0f9ff;
	color: #075985;
}

.divewp-ai-agent-chat__maintenance-card {
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: min(100%, 580px);
	margin-top: 10px;
	padding: 14px;
	border: 1px solid #bfdbfe;
	border-radius: 14px;
	background: rgba(239, 246, 255, 0.96);
	color: #1e3a5f;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
}

.divewp-ai-agent-chat__maintenance-heading {
	display: flex;
	align-items: center;
	gap: 9px;
}

.divewp-ai-agent-chat__maintenance-heading strong {
	font-size: 14px;
}

.divewp-ai-agent-chat__maintenance-icon {
	display: inline-grid;
	place-items: center;
	width: 28px;
	height: 28px;
	border-radius: 9px;
	background: #dbeafe;
	color: #0369a1;
	font-size: 17px;
	line-height: 28px;
}

.divewp-ai-agent-chat__maintenance-card--preparing .divewp-ai-agent-chat__maintenance-icon,
.divewp-ai-agent-chat__maintenance-card--running .divewp-ai-agent-chat__maintenance-icon,
.divewp-ai-agent-chat__maintenance-item.is-running .divewp-ai-agent-chat__maintenance-item-dot {
	animation: divewp-ai-maintenance-spin 0.9s linear infinite;
}

@keyframes divewp-ai-maintenance-spin {
	to {
		transform: rotate(360deg);
	}
}

.divewp-ai-agent-chat__maintenance-detail {
	color: #475569;
	font-size: 12px;
}

.divewp-ai-agent-chat__maintenance-progress {
	position: relative;
	height: 7px;
	overflow: hidden;
	border-radius: 999px;
	background: #dbe7f2;
}

.divewp-ai-agent-chat__maintenance-progress-bar {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: linear-gradient(90deg, #087fb9, #48bb78);
	transition: width 220ms ease;
}

.divewp-ai-agent-chat__maintenance-progress.is-indeterminate .divewp-ai-agent-chat__maintenance-progress-bar {
	width: 38% !important;
	animation: divewp-ai-maintenance-progress 1.1s ease-in-out infinite;
}

@keyframes divewp-ai-maintenance-progress {
	0% { transform: translateX(-110%); }
	100% { transform: translateX(280%); }
}

.divewp-ai-agent-chat__maintenance-count {
	align-self: flex-end;
	margin-top: -4px;
	color: #64748b;
	font-size: 11px;
	font-variant-numeric: tabular-nums;
}

.divewp-ai-agent-chat__maintenance-items {
	display: flex;
	flex-direction: column;
	max-height: 230px;
	overflow-y: auto;
	border: 1px solid rgba(191, 219, 254, 0.8);
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.72);
}

.divewp-ai-agent-chat__maintenance-item {
	display: grid;
	grid-template-columns: 10px minmax(0, 1fr) auto;
	align-items: center;
	gap: 9px;
	padding: 9px 10px;
	border-bottom: 1px solid #e2e8f0;
}

.divewp-ai-agent-chat__maintenance-item:last-child {
	border-bottom: 0;
}

.divewp-ai-agent-chat__maintenance-item-dot {
	display: block;
	width: 9px;
	height: 9px;
	border: 2px solid #94a3b8;
	border-radius: 50%;
}

.divewp-ai-agent-chat__maintenance-item.is-running .divewp-ai-agent-chat__maintenance-item-dot {
	border-color: #bfdbfe;
	border-top-color: #087fb9;
}

.divewp-ai-agent-chat__maintenance-item.is-completed .divewp-ai-agent-chat__maintenance-item-dot {
	border-color: #22c55e;
	background: #22c55e;
}

.divewp-ai-agent-chat__maintenance-item.is-failed .divewp-ai-agent-chat__maintenance-item-dot {
	border-color: #ef4444;
	background: #ef4444;
}

.divewp-ai-agent-chat__maintenance-item-copy {
	display: flex;
	min-width: 0;
	flex-direction: column;
	gap: 2px;
}

.divewp-ai-agent-chat__maintenance-item-copy strong,
.divewp-ai-agent-chat__maintenance-item-copy small {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.divewp-ai-agent-chat__maintenance-item-copy strong {
	font-size: 12px;
}

.divewp-ai-agent-chat__maintenance-item-copy small,
.divewp-ai-agent-chat__maintenance-item-status,
.divewp-ai-agent-chat__maintenance-skipped,
.divewp-ai-agent-chat__maintenance-status {
	font-size: 11px;
}

.divewp-ai-agent-chat__maintenance-item-copy small,
.divewp-ai-agent-chat__maintenance-item-status,
.divewp-ai-agent-chat__maintenance-skipped {
	color: #64748b;
}

.divewp-ai-agent-chat__maintenance-item.is-completed .divewp-ai-agent-chat__maintenance-item-status {
	color: #15803d;
}

.divewp-ai-agent-chat__maintenance-item.is-failed .divewp-ai-agent-chat__maintenance-item-status,
.divewp-ai-agent-chat__maintenance-status.is-error {
	color: #b91c1c;
}

.divewp-ai-agent-chat__maintenance-approve {
	align-self: flex-start;
	min-height: 36px;
	padding: 7px 12px;
	border: 0;
	border-radius: 7px;
	background: #087fb9;
	color: #fff;
	font-weight: 600;
	cursor: pointer;
}

.divewp-ai-agent-chat__maintenance-approve:disabled {
	opacity: 0.6;
	cursor: wait;
}

.divewp-ai-agent-chat__maintenance-card--completed {
	border-color: #bbf7d0;
	background: #f0fdf4;
	color: #166534;
}

.divewp-ai-agent-chat__maintenance-card--partial {
	border-color: #fed7aa;
	background: #fff7ed;
	color: #9a3412;
}

@media (max-width: 480px) {
	.divewp-ai-agent-chat__maintenance-item {
		grid-template-columns: 10px minmax(0, 1fr);
	}

	.divewp-ai-agent-chat__maintenance-item-status {
		grid-column: 2;
	}
}

@media (max-width: 782px) {
	.divewp-ai-agent-chat.is-fullscreen .divewp-ai-agent-chat__panel {
		top: 0 !important;
		right: 0 !important;
		left: 0 !important;
	}

	.divewp-ai-agent-chat.is-fullscreen .divewp-ai-agent-chat__messages {
		gap: 22px;
		padding: 22px 16px 28px;
	}

	.divewp-ai-agent-chat.is-fullscreen .divewp-ai-agent-chat__message-body--assistant {
		font-size: 15px;
		line-height: 1.65;
	}

	.divewp-ai-agent-chat.is-fullscreen .divewp-ai-agent-chat__message--user {
		max-width: 88%;
	}

	.divewp-ai-agent-chat.is-fullscreen .divewp-ai-agent-chat__form {
		padding: 10px 16px 14px;
	}

	.divewp-ai-agent-chat.is-fullscreen .divewp-ai-agent-chat__input {
		min-height: 76px;
	}
}

@media (max-width: 480px) {
	.divewp-ai-agent-chat__panel {
		height: min(680px, calc(100vh - 92px));
	}

	.divewp-ai-agent-chat__conversation-title,
	.divewp-ai-agent-chat__reset-size {
		display: none;
	}

	.divewp-ai-agent-chat__header-actions {
		gap: 0;
	}
}

/* Keep the approved DiveWP shell authoritative over legacy layout rules above. */
.divewp-ai-agent-chat:not(.is-fullscreen) .divewp-ai-agent-chat__panel {
	width: min(760px, calc(100vw - 48px));
	height: min(700px, calc(100vh - 104px));
}

.divewp-ai-agent-chat__header {
	min-height: 72px;
	gap: 12px;
	padding: 12px 16px;
	background: #fff;
}

.divewp-ai-agent-chat__header .divewp-ai-agent-chat__history-toggle,
.divewp-ai-agent-chat__header .divewp-ai-agent-chat__header-button {
	gap: 6px;
	width: auto;
	height: 36px;
	min-height: 36px;
	padding: 6px 10px;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	background: #fff;
	color: #475569;
}

.divewp-ai-agent-chat__history-header {
	padding: 4px 6px 10px;
}

.divewp-ai-agent-chat__history-header strong {
	font-family: "Literata", Georgia, serif;
	font-size: 14px;
}

.divewp-ai-agent-chat__form {
	width: min(100%, 720px);
	margin: 0 auto;
	padding: 12px 16px 16px;
}

.divewp-ai-agent-chat__input {
	min-height: 76px;
	padding: 14px 16px 46px;
	border: 1px solid #cbd5e1;
	border-radius: 12px;
	background: #fff;
}

@media (max-width: 820px) {
	.divewp-ai-agent-chat:not(.is-fullscreen) .divewp-ai-agent-chat__panel {
		width: min(620px, calc(100vw - 32px));
	}

	.divewp-ai-agent-chat__header .divewp-ai-agent-chat__header-button,
	.divewp-ai-agent-chat__header .divewp-ai-agent-chat__history-toggle {
		width: 36px;
		padding: 0;
	}
}

@media (max-width: 480px) {
	.divewp-ai-agent-chat:not(.is-fullscreen) .divewp-ai-agent-chat__panel {
		width: calc(100vw - 24px);
		height: calc(100dvh - 84px);
	}
}

/* The chat can be resized independently of the browser viewport. These
 * classes are driven by ResizeObserver so compact rules follow the panel. */
.divewp-ai-agent-chat .divewp-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 36px;
	padding: 8px 16px;
	border: 0 !important;
	border-radius: 6px;
	background: #48bb78;
	color: #fff !important;
	font-family: inherit;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.4;
	text-decoration: none !important;
	cursor: pointer;
	transition: all 0.2s;
}

.divewp-ai-agent-chat .divewp-button:hover,
.divewp-ai-agent-chat .divewp-button:focus-visible {
	border: 0 !important;
	background: #38a169;
	color: #fff !important;
	transform: translateY(-1px);
	outline: 2px solid #9ae6b4;
	outline-offset: 1px;
}

.divewp-ai-agent-chat .divewp-button:disabled {
	opacity: 0.65;
	cursor: not-allowed;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	.divewp-ai-agent-chat__launcher-spark {
		animation: none !important;
		transition: none !important;
	}
}

.divewp-ai-agent-chat__header .divewp-ai-agent-chat__history-toggle,
.divewp-ai-agent-chat__header .divewp-ai-agent-chat__header-button {
	flex: 0 0 auto;
	height: 36px;
	border: 0 !important;
	background: #f1f5f9;
	color: #475569 !important;
	box-shadow: none;
}

.divewp-ai-agent-chat__header .divewp-ai-agent-chat__history-toggle:hover,
.divewp-ai-agent-chat__header .divewp-ai-agent-chat__history-toggle:focus-visible,
.divewp-ai-agent-chat__header .divewp-ai-agent-chat__header-button:hover,
.divewp-ai-agent-chat__header .divewp-ai-agent-chat__header-button:focus-visible {
	background: #e2e8f0;
	color: #1e293b !important;
	transform: none;
	outline-color: #cbd5e1;
}

.divewp-ai-agent-chat__form {
	gap: 10px;
}

/* Clear, user-controlled page attachments. */
.divewp-ai-agent-context__toolbar {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	margin: 0;
	padding: 12px 16px 14px;
	overflow: visible;
}

.divewp-ai-agent-context__toolbar .divewp-ai-agent-context__tool {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	min-width: 0;
	min-height: 76px;
	padding: 11px 12px;
	border: 1px solid #b8c8d8;
	border-radius: 10px;
	background: #fff;
	color: #1e293b;
	text-align: left;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.divewp-ai-agent-context__toolbar .divewp-ai-agent-context__tool:hover,
.divewp-ai-agent-context__toolbar .divewp-ai-agent-context__tool:focus-visible {
	border-color: #0284c7;
	background: #f0f9ff;
	color: #075985;
	box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.16);
}

.divewp-ai-agent-context__toolbar .divewp-ai-agent-context__tool.is-active {
	border-color: #0284c7;
	background: #e0f2fe;
	color: #075985;
}

.divewp-ai-agent-context__toolbar #divewp-ai-agent-context-trace.is-active {
	border-color: #dc2626;
	background: #fef2f2;
	color: #991b1b;
}

.divewp-ai-agent-context__tool-icon {
	display: inline-grid;
	place-items: center;
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	border-radius: 9px;
	background: #e0f2fe;
	color: #0369a1;
	font-size: 19px;
	line-height: 34px;
}

#divewp-ai-agent-context-trace.is-active .divewp-ai-agent-context__tool-icon {
	background: #fee2e2;
	color: #b91c1c;
}

.divewp-ai-agent-context__tool-copy {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.divewp-ai-agent-context__tool-copy strong {
	font-size: 13px;
	line-height: 1.35;
}

.divewp-ai-agent-context__tool-copy small {
	color: #64748b;
	font-size: 11px;
	font-weight: 400;
	line-height: 1.4;
}

.divewp-ai-agent-context__recording-status {
	display: flex;
	grid-column: 1 / -1;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	margin: 14px 18px 0;
	padding: 10px 12px;
	border: 1px solid #fecaca;
	border-radius: 12px;
	background: #fff7f7;
	color: #991b1b;
	font-size: 12px;
	font-weight: 600;
}

.divewp-ai-agent-context__recording-actions {
	display: flex;
	gap: 6px;
	margin-left: auto;
}

#divewp-ai-agent-chat .divewp-ai-agent-context__recording-actions button {
	min-height: 34px;
	padding: 6px 10px;
	border: 1px solid #f1baba;
	border-radius: 8px;
	background: #fff;
	color: #991b1b;
	font: inherit;
	cursor: pointer;
}

#divewp-ai-agent-chat #divewp-ai-agent-context-recording-stop {
	background: #991b1b;
	color: #fff;
	border-color: #991b1b;
}

#divewp-ai-agent-chat .divewp-ai-agent-context__recording-actions button:focus-visible {
	outline: 2px solid #991b1b;
	outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
	.divewp-ai-agent-context__recording-dot { animation: none; }
}

.divewp-ai-agent-context__recording-status[hidden] {
	display: none;
}

.divewp-ai-agent-context__recording-dot {
	flex: 0 0 auto;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: #dc2626;
	box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.13);
	animation: divewp-ai-agent-recording-pulse 1.4s ease-in-out infinite;
}

@keyframes divewp-ai-agent-recording-pulse {
	50% {
		opacity: 0.45;
		transform: scale(0.82);
	}
}

.divewp-ai-agent-context__attachments {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 9px 10px;
	border: 1px solid #c7ead7;
	border-radius: 10px;
	background: #f5fcf8;
}

.divewp-ai-agent-context__attachments[hidden] {
	display: none;
}

.divewp-ai-agent-context__attachments-label {
	color: #475569;
	font-size: 11px;
	font-weight: 600;
}

.divewp-ai-agent-context__attachments .divewp-ai-agent-context__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 0;
	overflow: visible;
}

.divewp-ai-agent-chat__message--user {
	display: flex;
	align-items: flex-end;
	flex-direction: column;
	gap: 7px;
	padding: 0;
	border-radius: 0;
	background: transparent;
	color: #0f172a;
}

.divewp-ai-agent-chat__message-bubble--user {
	max-width: 100%;
	padding: 12px 14px;
	border-radius: 16px 16px 5px;
	background: #087fb9;
	color: #fff;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.divewp-ai-agent-chat.is-fullscreen .divewp-ai-agent-chat__message--user {
	padding: 0;
}

.divewp-ai-agent-chat__message-attachments {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 6px;
	max-width: 100%;
	margin: 0 2px 0 0;
	padding: 0;
	border: 0;
}

.divewp-ai-agent-chat__message-attachment {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	max-width: 100%;
	min-height: 30px;
	padding: 5px 10px;
	border: 1px solid #cbd5e1;
	border-radius: 9px;
	background: #f8fafc;
	color: #334155;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
	font-size: 11px;
	font-weight: 600;
	line-height: 1.35;
	overflow: hidden;
}

.divewp-ai-agent-chat__input {
	min-height: 72px;
	padding: 14px 16px;
}

.divewp-ai-agent-chat__composer-actions {
	margin-top: 0;
	padding: 0;
}

.divewp-ai-agent-chat__send {
	margin-left: 0;
}

.divewp-ai-agent-chat.is-compact-layout .divewp-ai-agent-chat__header {
	min-height: 58px;
	gap: 5px;
	padding: 8px 10px;
}

.divewp-ai-agent-chat.is-compact-layout .divewp-ai-agent-chat__heading {
	flex: 1 1 auto;
	min-width: 0;
	max-width: none;
}

.divewp-ai-agent-chat.is-compact-layout .divewp-ai-agent-chat__title {
	overflow: hidden;
	font-size: 16px;
	line-height: 1.25;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.divewp-ai-agent-chat.is-compact-layout .divewp-ai-agent-chat__conversation-title {
	display: none;
}

.divewp-ai-agent-chat.is-compact-layout .divewp-ai-agent-chat__header-actions {
	flex: 0 0 auto;
	gap: 4px;
}

.divewp-ai-agent-chat.is-compact-layout .divewp-ai-agent-chat__header .divewp-ai-agent-chat__history-toggle,
.divewp-ai-agent-chat.is-compact-layout .divewp-ai-agent-chat__header .divewp-ai-agent-chat__header-button {
	width: 34px;
	height: 34px;
	min-height: 34px;
	padding: 0;
}

.divewp-ai-agent-chat.is-compact-layout .divewp-ai-agent-chat__header .divewp-ai-agent-chat__history-toggle > span:not(.dashicons),
.divewp-ai-agent-chat.is-compact-layout .divewp-ai-agent-chat__header .divewp-ai-agent-chat__header-button > span:not(.dashicons) {
	display: none;
}

.divewp-ai-agent-chat.is-compact-layout .divewp-ai-agent-chat__close {
	flex-basis: 32px;
	width: 32px;
	height: 32px;
}

.divewp-ai-agent-chat.is-compact-layout .divewp-ai-agent-context__summary {
	min-height: 54px;
	padding: 9px 12px;
}

.divewp-ai-agent-chat.is-compact-layout .divewp-ai-agent-context__summary > span {
	min-width: 0;
	font-size: 13px;
}

.divewp-ai-agent-chat.is-compact-layout .divewp-ai-agent-context__summary .divewp-button {
	flex: 0 0 auto;
	max-width: 150px;
	padding: 7px 10px;
	font-size: 13px;
}

.divewp-ai-agent-chat.is-compact-layout .divewp-ai-agent-context__toolbar {
	display: grid;
	grid-template-columns: 1fr;
	gap: 8px;
}

.divewp-ai-agent-chat.is-compact-layout .divewp-ai-agent-context__toolbar[hidden] {
	display: none;
}

.divewp-ai-agent-chat.is-compact-layout .divewp-ai-agent-chat__opening {
	padding: 20px 12px;
}

.divewp-ai-agent-chat.is-compact-layout .divewp-ai-agent-chat__opening-title {
	font-size: 20px;
}

.divewp-ai-agent-chat.is-compact-layout .divewp-ai-agent-chat__suggestions {
	flex-direction: column;
	align-items: stretch;
}

.divewp-ai-agent-chat.is-compact-layout .divewp-ai-agent-chat__suggestion {
	width: 100%;
	margin-top: 0;
}

.divewp-ai-agent-chat.is-compact-layout .divewp-ai-agent-chat__form {
	padding: 10px 12px 12px;
}

.divewp-ai-agent-chat.is-compact-layout .divewp-ai-agent-chat__composer-actions {
	gap: 8px;
}

.divewp-ai-agent-chat.is-compact-layout .divewp-ai-agent-chat__enter-hint {
	display: none;
}

.divewp-ai-agent-chat.is-narrow-layout .divewp-ai-agent-chat__header {
	gap: 4px;
	padding-right: 8px;
	padding-left: 8px;
}

.divewp-ai-agent-chat.is-narrow-layout .divewp-ai-agent-chat__heading {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

.divewp-ai-agent-chat.is-narrow-layout .divewp-ai-agent-chat__header-actions {
	margin-left: auto;
}

.divewp-ai-agent-chat.is-narrow-layout .divewp-ai-agent-context__summary {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(130px, 145px);
	align-items: center;
}

.divewp-ai-agent-chat.is-narrow-layout .divewp-ai-agent-chat__composer-actions {
	align-items: stretch;
}

.divewp-ai-agent-chat.is-narrow-layout .divewp-ai-agent-chat__send {
	min-height: 40px;
}

/* Progressive conversation drawer and simplified settings. */
.divewp-ai-agent-chat__main {
	position: relative;
}

.divewp-ai-agent-chat__history-backdrop {
	position: absolute;
	z-index: 6;
	inset: 0;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	background: rgba(15, 23, 42, 0.28);
	cursor: pointer;
}

.divewp-ai-agent-chat__history-backdrop[hidden] {
	display: none;
}

.divewp-ai-agent-chat__history-close {
	display: none;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: #64748b;
	cursor: pointer;
}

.divewp-ai-agent-chat.is-history-open .divewp-ai-agent-chat__history-close {
	display: inline-flex;
}

.divewp-ai-agent-chat__history-search {
	position: relative;
	display: flex;
	align-items: center;
	margin: 0 4px 8px;
}

.divewp-ai-agent-chat__history-search .dashicons {
	position: absolute;
	left: 9px;
	z-index: 1;
	width: 16px;
	height: 16px;
	color: #64748b;
	font-size: 16px;
}

.divewp-ai-agent-chat__history-search input {
	width: 100%;
	min-height: 34px;
	padding: 6px 9px 6px 30px;
	border: 1px solid #cbd5e1;
	border-radius: 7px;
	background: #fff;
	font-size: 12px;
}

.divewp-ai-agent-chat__conversation-group {
	margin: 12px 8px 4px;
	color: #64748b;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.divewp-ai-agent-chat__history-actions {
	margin: 8px 4px 0;
	padding-top: 8px;
	border-top: 1px solid #e2e8f0;
	color: #64748b;
	font-size: 11px;
}

.divewp-ai-agent-chat__history-actions summary {
	padding: 5px 4px;
	cursor: pointer;
}

.divewp-ai-agent-chat__history-actions .divewp-ai-agent-chat__delete-all {
	display: flex;
	gap: 6px;
	width: 100%;
	height: auto;
	margin-top: 4px;
	padding: 7px 8px;
	justify-content: flex-start;
	background: #fff;
	border: 1px solid #f1b7b7;
	font-size: 11px;
}

.divewp-ai-agent-chat__conversation-loading {
	position: absolute;
	z-index: 9;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	background: rgba(255, 255, 255, 0.92);
	color: #334155;
	font-size: 14px;
	font-weight: 600;
}

.divewp-ai-agent-chat__conversation-loading[hidden] {
	display: none;
}

.divewp-ai-agent-chat__conversation-loading .spinner {
	float: none;
	margin: 0;
}

.divewp-ai-agent-chat__advanced-settings {
	grid-column: 1 / -1;
	padding: 0;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	background: #f8fafc;
}

.divewp-ai-agent-chat__advanced-settings > summary {
	padding: 10px 12px;
	color: #475569;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

.divewp-ai-agent-chat__advanced-settings[open] > summary {
	border-bottom: 1px solid #e2e8f0;
}

.divewp-ai-agent-chat__advanced-settings > :not(summary) {
	display: block;
	margin: 10px 12px;
}

.divewp-ai-agent-chat__message-body--assistant p {
	margin: 0 0 8px;
}

.divewp-ai-agent-chat__message-body--assistant p:last-child,
.divewp-ai-agent-chat__message-body--assistant ul:last-child,
.divewp-ai-agent-chat__message-body--assistant ol:last-child,
.divewp-ai-agent-chat__message-body--assistant blockquote:last-child,
.divewp-ai-agent-chat__message-body--assistant pre:last-child,
.divewp-ai-agent-chat__message-body--assistant table:last-child {
	margin-bottom: 0;
}

.divewp-ai-agent-chat__message-body--assistant ul,
.divewp-ai-agent-chat__message-body--assistant ol {
	margin: 0 0 8px 18px;
	padding: 0;
}

.divewp-ai-agent-chat__message-body--assistant li + li {
	margin-top: 4px;
}

.divewp-ai-agent-chat__message-body--assistant h3,
.divewp-ai-agent-chat__message-body--assistant h4,
.divewp-ai-agent-chat__message-body--assistant h5,
.divewp-ai-agent-chat__message-body--assistant h6 {
	margin: 12px 0 6px;
	color: #172033;
	font-family: "Literata", Georgia, serif;
	font-size: 1em;
	line-height: 1.35;
}

.divewp-ai-agent-chat__message-body--assistant h3:first-child,
.divewp-ai-agent-chat__message-body--assistant h4:first-child,
.divewp-ai-agent-chat__message-body--assistant h5:first-child,
.divewp-ai-agent-chat__message-body--assistant h6:first-child {
	margin-top: 0;
}

.divewp-ai-agent-chat__message-body--assistant blockquote {
	margin: 0 0 8px;
	padding: 7px 10px;
	border-left: 3px solid #47bd7b;
	background: #f0fdf6;
	color: #334155;
}

.divewp-ai-agent-chat__message-body--assistant hr {
	margin: 12px 0;
	border: 0;
	border-top: 1px solid #cbd5e1;
}

.divewp-ai-agent-chat__message-body--assistant a {
	color: #0073aa;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.divewp-ai-agent-chat__message-body--assistant a:hover,
.divewp-ai-agent-chat__message-body--assistant a:focus {
	color: #005177;
}

.divewp-ai-agent-chat__message-body--assistant del {
	color: #64748b;
}

.divewp-ai-agent-chat__message-body--assistant pre {
	max-width: 100%;
	margin: 0 0 8px;
	padding: 9px 10px;
	overflow: auto;
	border-radius: 6px;
	background: #172033;
	color: #f8fafc;
}

.divewp-ai-agent-chat__message-body--assistant pre code {
	padding: 0;
	background: transparent;
	color: inherit;
}

.divewp-ai-agent-chat__message-body--assistant table {
	display: block;
	max-width: 100%;
	margin: 0 0 8px;
	overflow-x: auto;
	border: 1px solid #cbd5e1;
	border-collapse: collapse;
	background: #fff;
}

.divewp-ai-agent-chat__message-body--assistant th,
.divewp-ai-agent-chat__message-body--assistant td {
	padding: 6px 8px;
	border: 1px solid #cbd5e1;
	text-align: left;
	vertical-align: top;
}

.divewp-ai-agent-chat__message-body--assistant th {
	background: #f1f5f9;
	font-weight: 600;
}

.divewp-ai-agent-chat__task-item {
	list-style: none;
}

.divewp-ai-agent-chat__task-state {
	display: inline-block;
	width: 1.4em;
	margin-left: -1.4em;
	color: #07885f;
	font-weight: 700;
}

.divewp-ai-agent-chat__markdown-image-link::before {
	content: "Image: ";
	font-weight: 600;
}

.divewp-ai-agent-chat__message-body--assistant code {
	padding: 1px 4px;
	border-radius: 4px;
	background: #e2e8f0;
	font: 0.92em/1.4 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.divewp-ai-agent-context__summary button {
	cursor: pointer;
}

.divewp-ai-agent-context__preview {
	max-height: 300px;
	font: inherit;
	white-space: normal;
}

.divewp-ai-agent-context__preview-card {
	padding: 2px;
}

.divewp-ai-agent-context__preview-card h4 {
	margin: 0 0 6px;
	font-family: "Literata", Georgia, serif;
	font-size: 15px;
}

.divewp-ai-agent-context__preview-line {
	display: grid;
	grid-template-columns: minmax(100px, 0.45fr) minmax(0, 1fr);
	gap: 10px;
	padding: 6px 0;
	border-top: 1px solid #e2e8f0;
	font-size: 12px;
}

.divewp-ai-agent-context__preview-card ul {
	margin: 8px 0 0 18px;
	font-size: 12px;
}

.divewp-ai-agent-context__technical {
	margin-top: 12px;
	border-top: 1px solid #cbd5e1;
}

.divewp-ai-agent-context__technical summary {
	padding: 10px 0 4px;
	color: #475569;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
}

.divewp-ai-agent-context__technical pre {
	max-height: 220px;
	margin: 6px 0 0;
	padding: 10px;
	overflow: auto;
	border-radius: 6px;
	background: #0f172a;
	color: #e2e8f0;
	font: 11px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	white-space: pre-wrap;
	word-break: break-word;
}

.divewp-ai-agent-chat.is-compact-layout.is-history-open .divewp-ai-agent-chat__history,
.divewp-ai-agent-chat.is-narrow-layout.is-history-open .divewp-ai-agent-chat__history {
	right: 0;
	width: 100%;
	max-width: none;
	box-shadow: none;
}

.divewp-ai-agent-chat.is-compact-layout.is-history-open .divewp-ai-agent-chat__history-backdrop,
.divewp-ai-agent-chat.is-narrow-layout.is-history-open .divewp-ai-agent-chat__history-backdrop {
	display: none;
}

.divewp-ai-agent-chat.is-compact-layout .divewp-ai-agent-chat__history-search,
.divewp-ai-agent-chat.is-compact-layout .divewp-ai-agent-chat__history-tabs,
.divewp-ai-agent-chat.is-compact-layout .divewp-ai-agent-chat__history-status,
.divewp-ai-agent-chat.is-compact-layout .divewp-ai-agent-chat__conversation-list,
.divewp-ai-agent-chat.is-compact-layout .divewp-ai-agent-chat__history-actions {
	width: auto;
}

body.divewp-ai-agent-intro-open {
	overflow: hidden;
}

.divewp-ai-agent-intro {
	position: fixed;
	z-index: 100100;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 32px;
}

.divewp-ai-agent-intro[hidden] {
	display: none !important;
}

.divewp-ai-agent-intro__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.72);
	backdrop-filter: blur(4px);
}

.divewp-ai-agent-intro__dialog {
	position: relative;
	display: grid;
	grid-template-columns: minmax(300px, 0.9fr) minmax(360px, 1.1fr);
	width: min(920px, 100%);
	max-height: calc(100vh - 64px);
	overflow: auto;
	border: 1px solid rgba(255, 255, 255, 0.7);
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 28px 90px rgba(15, 23, 42, 0.35);
	color: #172033;
	outline: none;
	animation: divewp-ai-intro-enter 220ms ease-out;
}

@keyframes divewp-ai-intro-enter {
	from {
		opacity: 0;
		transform: translateY(12px) scale(0.985);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.divewp-ai-agent-intro__close {
	position: absolute;
	z-index: 2;
	top: 14px;
	right: 14px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
	color: #475569;
	cursor: pointer;
}

.divewp-ai-agent-intro__close:hover,
.divewp-ai-agent-intro__close:focus-visible {
	background: #e2e8f0;
	color: #0f172a;
	outline: 3px solid rgba(2, 132, 199, 0.28);
}

.divewp-ai-agent-intro__visual {
	display: flex;
	flex-direction: column;
	min-height: 480px;
	padding: 42px 30px;
	overflow: hidden;
	background:
		radial-gradient(circle at 18% 15%, rgba(125, 211, 252, 0.42), transparent 34%),
		linear-gradient(145deg, #effcf6 0%, #e0f2fe 54%, #ede9fe 100%);
}

.divewp-ai-agent-intro__visual-bar {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 18px;
	color: #164e63;
	font-weight: 700;
}

.divewp-ai-agent-intro__visual-mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 10px;
	background: #07885f;
	box-shadow: 0 8px 22px rgba(7, 136, 95, 0.24);
	color: #fff;
	font: 700 18px/1 Georgia, serif;
}

.divewp-ai-agent-intro__visual-body {
	position: relative;
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	justify-content: center;
}

.divewp-ai-agent-intro__visual-page {
	position: absolute;
	top: 18px;
	left: 0;
	width: 72%;
	height: 76%;
	padding: 28px 20px;
	border: 1px solid rgba(148, 163, 184, 0.5);
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.7);
	box-shadow: 0 16px 38px rgba(15, 23, 42, 0.1);
}

.divewp-ai-agent-intro__visual-page span {
	display: block;
	height: 9px;
	margin-bottom: 15px;
	border-radius: 999px;
	background: #cbd5e1;
}

.divewp-ai-agent-intro__visual-page span:nth-child(1) {
	width: 48%;
	height: 16px;
	background: #94a3b8;
}

.divewp-ai-agent-intro__visual-page span:nth-child(3) {
	width: 82%;
}

.divewp-ai-agent-intro__visual-page span:nth-child(4) {
	width: 62%;
}

.divewp-ai-agent-intro__visual-chat {
	position: relative;
	z-index: 1;
	width: 78%;
	margin: 72px 0 0 auto;
	padding: 18px;
	border: 1px solid rgba(148, 163, 184, 0.6);
	border-radius: 15px;
	background: #fff;
	box-shadow: 0 22px 54px rgba(15, 23, 42, 0.2);
}

.divewp-ai-agent-intro__visual-question {
	margin: 0 0 18px 28px;
	padding: 10px 12px;
	border-radius: 12px 12px 3px 12px;
	background: #0284c7;
	color: #fff;
	font-size: 12px;
	line-height: 1.35;
}

.divewp-ai-agent-intro__visual-answer {
	padding: 12px;
	border-radius: 3px 12px 12px;
	background: #ecfdf5;
}

.divewp-ai-agent-intro__visual-answer span {
	display: block;
	height: 7px;
	margin-bottom: 8px;
	border-radius: 999px;
	background: #86d3b1;
}

.divewp-ai-agent-intro__visual-answer span:nth-child(2) {
	width: 88%;
}

.divewp-ai-agent-intro__visual-answer span:nth-child(3) {
	width: 64%;
	margin-bottom: 0;
}

.divewp-ai-agent-intro__content {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 56px 54px 48px;
}

.divewp-ai-agent-intro__eyebrow {
	align-self: flex-start;
	margin-bottom: 12px;
	padding: 5px 9px;
	border-radius: 999px;
	background: #dcfce7;
	color: #166534;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.divewp-ai-agent-intro__content h2 {
	margin: 0 0 14px;
	color: #172033;
	font: 400 30px/1.2 "Literata", Georgia, serif;
}

.divewp-ai-agent-intro__content > p {
	margin: 0;
	color: #475569;
	font-size: 15px;
	line-height: 1.65;
}

.divewp-ai-agent-intro__content ul {
	display: grid;
	gap: 12px;
	margin: 24px 0;
	padding: 0;
	list-style: none;
}

.divewp-ai-agent-intro__content li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0;
	color: #334155;
	font-size: 14px;
	line-height: 1.45;
}

.divewp-ai-agent-intro__content li .dashicons {
	flex: 0 0 auto;
	color: #07885f;
}

.divewp-ai-agent-intro__content .divewp-ai-agent-intro__provider-note {
	padding: 11px 13px;
	border-radius: 8px;
	background: #f8fafc;
	color: #64748b;
	font-size: 12px;
	line-height: 1.5;
}

.divewp-ai-agent-intro__actions {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-top: 24px;
}

.divewp-ai-agent-intro__primary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 18px;
	border-radius: 8px;
	background: #07885f;
	color: #fff;
	font-weight: 600;
	text-decoration: none;
}

.divewp-ai-agent-intro__primary:hover,
.divewp-ai-agent-intro__primary:focus-visible {
	background: #066b4c;
	color: #fff;
	outline: 3px solid rgba(7, 136, 95, 0.25);
	outline-offset: 2px;
}

.divewp-ai-agent-intro__later {
	padding: 8px 4px;
	border: 0;
	background: transparent;
	color: #475569;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.divewp-ai-agent-intro__later:hover,
.divewp-ai-agent-intro__later:focus-visible {
	color: #0f172a;
	text-decoration: underline;
	outline: none;
}

@media (max-width: 760px) {
	.divewp-ai-agent-intro {
		padding: 16px;
	}

	.divewp-ai-agent-intro__dialog {
		grid-template-columns: 1fr;
		max-height: calc(100vh - 32px);
	}

	.divewp-ai-agent-intro__visual {
		min-height: 230px;
		padding: 28px 24px;
	}

	.divewp-ai-agent-intro__visual-body {
		min-height: 150px;
	}

	.divewp-ai-agent-intro__content {
		padding: 34px 28px 30px;
	}

	.divewp-ai-agent-intro__content h2 {
		font-size: 25px;
	}
}

@media (max-width: 480px) {
	.divewp-ai-agent-intro {
		padding: 0;
	}

	.divewp-ai-agent-intro__dialog {
		width: 100%;
		max-height: 100vh;
		border-radius: 0;
	}

	.divewp-ai-agent-intro__visual {
		display: none;
	}

	.divewp-ai-agent-intro__content {
		min-height: 100vh;
		padding: 64px 24px 30px;
	}

	.divewp-ai-agent-intro__actions {
		align-items: stretch;
		flex-direction: column;
	}
}

@media (prefers-reduced-motion: reduce) {
	.divewp-ai-agent-intro__dialog {
		animation: none;
	}
}

/* 2026 unified assistant interface. Keep this final block authoritative. */
.divewp-ai-agent-chat {
	--divewp-ai-blue: #087fb9;
	--divewp-ai-blue-dark: #075985;
	--divewp-ai-green: #48bb78;
	--divewp-ai-green-dark: #087f5b;
	--divewp-ai-ink: #172033;
	--divewp-ai-muted: #64748b;
	--divewp-ai-line: #dbe5e1;
	--divewp-ai-surface: #ffffff;
	--divewp-ai-soft: #f4faf7;
}

.divewp-ai-agent-chat:not(.is-fullscreen) .divewp-ai-agent-chat__panel {
	width: min(800px, calc(100vw - 48px));
	height: min(740px, calc(100vh - 104px));
	max-height: calc(100vh - 104px);
	border: 1px solid rgba(148, 163, 184, 0.3);
	border-radius: 22px;
	background: var(--divewp-ai-soft);
	box-shadow: 0 24px 70px rgba(15, 23, 42, 0.2), 0 3px 12px rgba(15, 23, 42, 0.08);
}

.divewp-ai-agent-chat__header {
	position: relative;
	z-index: 11;
	min-height: 66px;
	gap: 10px;
	padding: 10px 14px;
	border-bottom: 1px solid rgba(203, 213, 225, 0.75);
	background: rgba(255, 255, 255, 0.9);
	backdrop-filter: blur(14px);
}

.divewp-ai-agent-chat__heading {
	flex: 1 1 auto;
	min-width: 0;
	text-align: center;
}

.divewp-ai-agent-chat__title {
	color: var(--divewp-ai-ink);
	font-family: "Literata", Georgia, serif;
	font-size: 17px;
	font-weight: 600;
	letter-spacing: -0.01em;
}

.divewp-ai-agent-chat__conversation-title {
	max-width: 330px;
	margin: 2px auto 0;
	color: var(--divewp-ai-muted);
	font-size: 10px;
}

.divewp-ai-agent-chat__header .divewp-ai-agent-chat__history-toggle,
.divewp-ai-agent-chat__header .divewp-ai-agent-chat__header-button,
.divewp-ai-agent-chat__header .divewp-ai-agent-chat__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 36px;
	height: 36px;
	min-height: 36px;
	padding: 0;
	border: 1px solid #e2e8f0 !important;
	border-radius: 10px;
	background: #fff;
	color: #475569 !important;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.divewp-ai-agent-chat__header .divewp-ai-agent-chat__header-button > span:not(.dashicons),
.divewp-ai-agent-chat__header .divewp-ai-agent-chat__history-toggle > span:not(.dashicons) {
	display: none;
}

.divewp-ai-agent-chat__header .divewp-ai-agent-chat__history-toggle:hover,
.divewp-ai-agent-chat__header .divewp-ai-agent-chat__history-toggle:focus-visible,
.divewp-ai-agent-chat__header .divewp-ai-agent-chat__header-button:hover,
.divewp-ai-agent-chat__header .divewp-ai-agent-chat__header-button:focus-visible,
.divewp-ai-agent-chat__header .divewp-ai-agent-chat__close:hover,
.divewp-ai-agent-chat__header .divewp-ai-agent-chat__close:focus-visible {
	border-color: #9dd8bd !important;
	background: #effaf4;
	color: var(--divewp-ai-green-dark) !important;
	outline: 2px solid rgba(72, 187, 120, 0.2);
	outline-offset: 1px;
}

.divewp-ai-agent-chat__workspace,
.divewp-ai-agent-chat__main {
	background:
		radial-gradient(circle at 18% 8%, rgba(72, 187, 120, 0.1), transparent 34%),
		radial-gradient(circle at 82% 22%, rgba(8, 127, 185, 0.1), transparent 38%),
		linear-gradient(145deg, #fbfdfc 0%, #f4f9f7 55%, #f7fafc 100%);
}

.divewp-ai-agent-chat__history {
	flex-basis: 264px;
	padding: 12px 10px;
	border-right: 1px solid rgba(203, 213, 225, 0.72);
	background: rgba(241, 247, 244, 0.92);
	backdrop-filter: blur(12px);
}

.divewp-ai-agent-chat__history-search input,
.divewp-ai-agent-chat__history-tabs,
.divewp-ai-agent-chat__conversation,
.divewp-ai-agent-chat__load-more-conversations {
	border-radius: 10px;
}

.divewp-ai-agent-chat__conversation:hover,
.divewp-ai-agent-chat__conversation.is-active {
	background: #e3f3eb;
}

.divewp-ai-agent-chat__messages-viewport {
	background: transparent;
}

.divewp-ai-agent-chat__messages {
	gap: 22px;
	width: min(100%, 920px);
	margin-right: auto;
	margin-left: auto;
	padding: 28px clamp(18px, 5vw, 58px) 36px;
	background: transparent;
}

.divewp-ai-agent-chat__opening {
	width: min(100%, 720px);
	padding: 34px 18px 26px;
}

.divewp-ai-agent-chat__opening-mark {
	display: block;
	align-self: center;
	width: 150px;
	height: auto;
	margin-bottom: 18px;
}

.divewp-ai-agent-chat__opening-title {
	margin-bottom: 10px;
	color: var(--divewp-ai-ink);
	font-family: "Literata", Georgia, serif;
	font-size: clamp(24px, 4vw, 32px);
	font-weight: 600;
	letter-spacing: -0.025em;
}

.divewp-ai-agent-chat__greeting {
	max-width: 600px;
	margin-bottom: 24px;
	color: var(--divewp-ai-muted);
	font-size: 14px;
}

.divewp-ai-agent-chat__suggestions {
	gap: 9px;
}

.divewp-ai-agent-chat__suggestion {
	min-height: 38px;
	padding: 8px 13px;
	border: 1px solid #d6e3de;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.86);
	color: #334155;
	box-shadow: 0 3px 10px rgba(15, 23, 42, 0.04);
	font-size: 12px;
}

.divewp-ai-agent-chat__suggestion:hover,
.divewp-ai-agent-chat__suggestion:focus-visible {
	border-color: #80cca5;
	background: #effaf4;
	color: var(--divewp-ai-green-dark);
	outline: 2px solid rgba(72, 187, 120, 0.18);
}

.divewp-ai-agent-chat__message {
	font-size: 14px;
	line-height: 1.58;
}

.divewp-ai-agent-chat__message--assistant {
	width: min(94%, 780px);
}

.divewp-ai-agent-chat__message-body--assistant,
.divewp-ai-agent-chat.is-fullscreen .divewp-ai-agent-chat__message-body--assistant {
	width: fit-content;
	max-width: 100%;
	padding: 13px 15px;
	border: 1px solid rgba(203, 213, 225, 0.7);
	border-radius: 16px 16px 16px 5px;
	background: rgba(255, 255, 255, 0.9);
	color: var(--divewp-ai-ink);
	box-shadow: 0 5px 18px rgba(15, 23, 42, 0.05);
	font-size: 14px;
	line-height: 1.62;
}

.divewp-ai-agent-chat__response-audio {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 7px;
}

.divewp-ai-agent-chat__read-aloud {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	min-height: 36px;
	padding: 6px 10px;
	border: 1px solid #cbdad4;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.88);
	color: #475569;
	font: inherit;
	font-size: 11px;
	font-weight: 650;
	line-height: 1;
	cursor: pointer;
}

.divewp-ai-agent-chat__read-aloud:hover,
.divewp-ai-agent-chat__read-aloud:focus-visible {
	border-color: #71c79c;
	background: #effaf4;
	color: var(--divewp-ai-green-dark);
	outline: 3px solid rgba(72, 187, 120, 0.16);
	outline-offset: 1px;
}

.divewp-ai-agent-chat__read-aloud.is-reading {
	border-color: #48bb78;
	background: #e6f6ee;
	color: var(--divewp-ai-green-dark);
}

.divewp-ai-agent-chat__read-aloud .dashicons {
	width: 16px;
	height: 16px;
	font-size: 16px;
	line-height: 16px;
}

.divewp-ai-agent-chat__message.is-streaming .divewp-ai-agent-chat__response-audio {
	display: none;
}

.divewp-ai-agent-chat__message--user,
.divewp-ai-agent-chat.is-fullscreen .divewp-ai-agent-chat__message--user {
	display: flex;
	align-items: flex-end;
	flex-direction: column;
	gap: 6px;
	max-width: min(82%, 680px);
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
}

.divewp-ai-agent-chat__message-bubble--user {
	padding: 11px 14px;
	border-radius: 16px 16px 5px;
	background: var(--divewp-ai-blue);
	color: #fff;
	box-shadow: 0 5px 16px rgba(8, 127, 185, 0.16);
}

.divewp-ai-agent-chat__sources,
.divewp-ai-agent-chat__message-attachments {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin-top: 8px;
	padding: 0;
	border: 0;
}

.divewp-ai-agent-chat__message-attachments {
	justify-content: flex-end;
	max-width: 100%;
	margin: 0 2px 0 0;
}

.divewp-ai-agent-chat__source,
.divewp-ai-agent-chat__message-attachment {
	display: inline-flex;
	align-items: center;
	max-width: 180px;
	min-height: 25px;
	padding: 3px 8px;
	border: 1px solid #cbd5e1;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.82);
	color: #64748b;
	box-shadow: none;
	font-size: 10px;
	font-weight: 500;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.divewp-ai-agent-chat__generation {
	margin-top: 9px;
	padding-top: 8px;
	border-top-color: #dbe5e1;
}

.divewp-ai-agent-context {
	position: absolute;
	z-index: 30;
	left: 10px;
	bottom: 62px;
	width: min(460px, calc(100% - 20px));
	height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	pointer-events: none;
}

.divewp-ai-agent-context__popover {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	max-height: min(430px, calc(100dvh - 180px));
	padding: 12px;
	border: 1px solid #d6e3de;
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.98);
	box-shadow: 0 20px 55px rgba(15, 23, 42, 0.18), 0 3px 12px rgba(15, 23, 42, 0.08);
	overflow: auto;
	pointer-events: auto;
	transform-origin: bottom left;
	animation: divewp-ai-context-popover-in 140ms ease-out;
}

.divewp-ai-agent-context__popover[hidden] {
	display: none;
}

@keyframes divewp-ai-context-popover-in {
	from {
		opacity: 0;
		transform: translateY(7px) scale(0.985);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.divewp-ai-agent-context__popover-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 2px 2px 11px;
}

.divewp-ai-agent-context__popover-header > span {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.divewp-ai-agent-context__popover-header strong {
	color: var(--divewp-ai-ink);
	font-size: 13px;
	line-height: 1.35;
}

.divewp-ai-agent-context__popover-header small {
	color: var(--divewp-ai-muted);
	font-size: 10px;
	font-weight: 400;
	line-height: 1.4;
}

.divewp-ai-agent-context__popover-header button {
	display: inline-grid;
	place-items: center;
	flex: 0 0 auto;
	width: 28px;
	height: 28px;
	min-height: 28px;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: #f1f5f9;
	color: #64748b;
	cursor: pointer;
}

.divewp-ai-agent-context__popover-header button:hover,
.divewp-ai-agent-context__popover-header button:focus-visible {
	background: #e6f6ee;
	color: var(--divewp-ai-green-dark);
	outline: 2px solid rgba(72, 187, 120, 0.18);
}

.divewp-ai-agent-context__popover .divewp-ai-agent-context__toolbar {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

.divewp-ai-agent-context__popover .divewp-ai-agent-context__tool {
	position: relative;
	min-height: 62px;
	padding: 9px 30px 9px 9px;
	border-color: #dbe5e1;
	border-radius: 12px;
	background: #fbfdfc;
	box-shadow: none;
}

.divewp-ai-agent-context__popover .divewp-ai-agent-context__tool:hover,
.divewp-ai-agent-context__popover .divewp-ai-agent-context__tool:focus-visible,
.divewp-ai-agent-context__popover .divewp-ai-agent-context__tool.is-active {
	border-color: #8fd2af;
	background: #f1faf5;
	color: var(--divewp-ai-green-dark);
	box-shadow: 0 0 0 2px rgba(72, 187, 120, 0.13);
}

.divewp-ai-agent-context__popover .divewp-ai-agent-context__tool-check {
	position: absolute;
	top: 9px;
	right: 8px;
	width: 16px;
	height: 16px;
	color: #21a56f;
	font-size: 16px;
	line-height: 16px;
	opacity: 0;
}

.divewp-ai-agent-context__popover .divewp-ai-agent-context__tool.is-active .divewp-ai-agent-context__tool-check {
	opacity: 1;
}

.divewp-ai-agent-context__tool-icon {
	background: #e6f6ee;
	color: var(--divewp-ai-green-dark);
}

.divewp-ai-agent-context__popover .divewp-ai-agent-context__recording-status {
	margin-top: 8px;
}

.divewp-ai-agent-context__drawer {
	top: auto;
	right: auto;
	bottom: 0;
	left: 0;
	width: 100%;
	border-color: #d6e3de;
	border-radius: 15px;
	box-shadow: 0 18px 46px rgba(15, 23, 42, 0.16);
	pointer-events: auto;
}

.divewp-ai-agent-chat__form {
	position: relative;
	display: flex;
	flex: 0 0 auto;
	flex-direction: column;
	gap: 0;
	width: min(calc(100% - 36px), 760px);
	margin: 0 auto 18px;
	padding: 0;
	border: 1px solid #cad9d3;
	border-radius: 18px;
	background: rgba(255, 255, 255, 0.96);
	box-shadow: 0 14px 38px rgba(15, 23, 42, 0.12), 0 2px 8px rgba(15, 23, 42, 0.05);
	overflow: visible;
}

.divewp-ai-agent-chat__form:focus-within {
	border-color: #71c79c;
	box-shadow: 0 0 0 3px rgba(72, 187, 120, 0.16), 0 16px 42px rgba(15, 23, 42, 0.13);
}

.divewp-ai-agent-context__attachments {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 8px;
	padding: 10px 14px 0;
	border: 0;
	border-radius: 0;
	background: transparent;
}

.divewp-ai-agent-context__attachments[hidden] {
	display: none;
}

.divewp-ai-agent-context__attachments-label {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.divewp-ai-agent-context__attachments .divewp-ai-agent-context__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	padding: 0;
}

.divewp-ai-agent-context__attachments .divewp-ai-agent-context__chip {
	max-width: 180px;
	padding: 2px 3px 2px 7px;
	border-color: #cbd5e1;
	background: #f8fafc;
	color: #475569;
	font-size: 10px;
}

.divewp-ai-agent-chat__input,
.divewp-ai-agent-chat.is-fullscreen .divewp-ai-agent-chat__input {
	width: 100%;
	min-height: 88px;
	max-height: 210px;
	padding: 16px 18px 10px;
	border: 0;
	border-radius: 18px 18px 0 0;
	background: transparent;
	box-shadow: none;
	color: var(--divewp-ai-ink);
	font-size: 14px;
	line-height: 1.5;
}

.divewp-ai-agent-chat__input:focus {
	border: 0;
	box-shadow: none;
	outline: none;
}

.divewp-ai-agent-chat__input::placeholder {
	color: #94a3b8;
}

.divewp-ai-agent-chat__composer-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 54px;
	margin: 0;
	padding: 8px 10px;
	border-top: 1px solid #e7eeeb;
	border-radius: 0 0 18px 18px;
	background: rgba(248, 251, 250, 0.92);
	pointer-events: auto;
}

.divewp-ai-agent-chat__composer-tools {
	display: flex;
	align-items: center;
	gap: 6px;
	min-width: 0;
}

.divewp-ai-agent-chat__composer-tool,
.divewp-ai-agent-chat__composer-model {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	min-width: 0;
	height: 34px;
	padding: 0 9px;
	border: 1px solid #d6e0dc;
	border-radius: 999px;
	background: #fff;
	color: #475569;
	font: inherit;
	font-size: 11px;
	font-weight: 600;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.divewp-ai-agent-chat__composer-tool {
	cursor: pointer;
}

.divewp-ai-agent-chat__composer-tool:hover,
.divewp-ai-agent-chat__composer-tool:focus-visible,
.divewp-ai-agent-chat__composer-tool[aria-expanded="true"],
.divewp-ai-agent-chat__composer-model:focus-within {
	border-color: #80cca5;
	background: #effaf4;
	color: var(--divewp-ai-green-dark);
	outline: 2px solid rgba(72, 187, 120, 0.15);
	outline-offset: 1px;
}

.divewp-ai-agent-chat__composer-tool .dashicons,
.divewp-ai-agent-chat__composer-model .dashicons {
	width: 16px;
	height: 16px;
	font-size: 16px;
	line-height: 16px;
}

.divewp-ai-agent-chat__context-count {
	display: inline-grid;
	place-items: center;
	min-width: 17px;
	height: 17px;
	padding: 0 4px;
	border-radius: 999px;
	background: #e6f6ee;
	color: var(--divewp-ai-green-dark);
	font-size: 9px;
	font-weight: 700;
	line-height: 17px;
}

.divewp-ai-agent-chat__context-count[hidden] {
	display: none;
}

.divewp-ai-agent-chat__context-chevron {
	transition: transform 140ms ease;
}

.divewp-ai-agent-chat__composer-tool[aria-expanded="true"] .divewp-ai-agent-chat__context-chevron {
	transform: rotate(180deg);
}

.divewp-ai-agent-chat__composer-model select {
	min-width: 0;
	max-width: 190px;
	height: 30px;
	min-height: 30px;
	margin: 0;
	padding: 0 23px 0 0;
	border: 0;
	background-color: transparent;
	box-shadow: none;
	color: inherit;
	font: inherit;
	cursor: pointer;
}

.divewp-ai-agent-chat__composer-model select:focus {
	box-shadow: none;
	outline: none;
}

.divewp-ai-agent-chat__model-status {
	position: absolute;
	left: 14px;
	bottom: 59px;
	max-width: calc(100% - 28px);
	padding: 6px 9px;
	border: 1px solid #9dd8bd;
	border-radius: 8px;
	background: #effaf4;
	color: var(--divewp-ai-green-dark);
	box-shadow: 0 5px 16px rgba(15, 23, 42, 0.1);
	font-size: 10px;
	line-height: 1.35;
}

.divewp-ai-agent-chat__model-status:empty {
	display: none;
}

.divewp-ai-agent-chat__model-status.is-error {
	border-color: #fecaca;
	background: #fff1f2;
	color: #9f1239;
}

.divewp-ai-agent-chat__enter-hint {
	margin-left: auto;
	color: #94a3b8;
	font-size: 10px;
}

.divewp-ai-agent-chat .divewp-ai-agent-chat__send {
	flex: 0 0 auto;
	width: 38px;
	height: 38px;
	min-height: 38px;
	margin: 0;
	padding: 0;
	border: 0 !important;
	border-radius: 50%;
	background: var(--divewp-ai-green);
	color: #fff !important;
	box-shadow: 0 5px 14px rgba(72, 187, 120, 0.28);
}

.divewp-ai-agent-chat .divewp-ai-agent-chat__send:hover,
.divewp-ai-agent-chat .divewp-ai-agent-chat__send:focus-visible {
	background: #38a169;
	transform: translateY(-1px);
	outline: 3px solid rgba(72, 187, 120, 0.2);
	outline-offset: 1px;
}

.divewp-ai-agent-chat__send .dashicons {
	width: 18px;
	height: 18px;
	font-size: 18px;
	line-height: 18px;
}

.divewp-ai-agent-chat__settings {
	top: 10px;
	right: 10px;
	bottom: 10px;
	width: min(410px, calc(100% - 20px));
	max-height: none;
	border: 1px solid #d6e3de;
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.98);
	box-shadow: -10px 16px 46px rgba(15, 23, 42, 0.16);
}

.divewp-ai-agent-chat__settings-header {
	padding: 14px 16px;
	background: #f7fbf9;
}

.divewp-ai-agent-chat__style {
	gap: 14px 12px;
	padding: 18px;
}

.divewp-ai-agent-chat__advanced-settings {
	border-color: #dbe5e1;
	background: #f7fbf9;
}

.divewp-ai-agent-chat.is-fullscreen .divewp-ai-agent-chat__panel {
	background: var(--divewp-ai-soft);
}

.divewp-ai-agent-chat.is-fullscreen .divewp-ai-agent-chat__messages,
.divewp-ai-agent-chat.is-fullscreen .divewp-ai-agent-chat__form {
	width: min(calc(100% - 36px), 880px);
}

.divewp-ai-agent-chat.is-fullscreen .divewp-ai-agent-chat__messages {
	max-width: 920px;
	padding-top: 36px;
}

@media (max-width: 620px) {
	.divewp-ai-agent-chat:not(.is-fullscreen) .divewp-ai-agent-chat__panel {
		width: calc(100vw - 24px);
		height: calc(100dvh - 84px);
		border-radius: 18px;
	}

	.divewp-ai-agent-chat__header {
		min-height: 58px;
		padding: 8px 10px;
	}

	.divewp-ai-agent-chat__conversation-title {
		display: none;
	}

	.divewp-ai-agent-chat__messages {
		gap: 18px;
		padding: 20px 14px 28px;
	}

	.divewp-ai-agent-chat__opening {
		padding: 24px 10px 20px;
	}

	.divewp-ai-agent-chat__opening-title {
		font-size: 24px;
	}

	.divewp-ai-agent-context__toolbar {
		grid-template-columns: 1fr;
		margin-right: 0;
		margin-left: 0;
	}

	.divewp-ai-agent-chat__form,
	.divewp-ai-agent-chat.is-fullscreen .divewp-ai-agent-chat__form {
		width: calc(100% - 24px);
		margin-bottom: 12px;
	}

	.divewp-ai-agent-chat__composer-actions {
		gap: 6px;
	}

	.divewp-ai-agent-chat__composer-tool > span:not(.dashicons) {
		display: none;
	}

	.divewp-ai-agent-chat__composer-tool {
		width: 34px;
		padding: 0;
		justify-content: center;
	}

	.divewp-ai-agent-chat__composer-model select {
		max-width: 128px;
	}

	.divewp-ai-agent-chat__enter-hint {
		display: none;
	}

	.divewp-ai-agent-chat__message--user,
	.divewp-ai-agent-chat.is-fullscreen .divewp-ai-agent-chat__message--user {
		max-width: 90%;
	}
}

/* Keep the chat usable when the conversation rail leaves a narrow workspace. */
.divewp-ai-agent-chat__opening-title {
	line-height: 1.18;
	overflow-wrap: anywhere;
	text-wrap: balance;
}

.divewp-ai-agent-chat__composer-tools {
	flex: 1 1 auto;
}

.divewp-ai-agent-chat__composer-tool {
	flex: 0 0 auto;
	white-space: nowrap;
}

.divewp-ai-agent-chat__composer-tool > span:not(.dashicons),
.divewp-ai-agent-chat__enter-hint {
	white-space: nowrap;
}

.divewp-ai-agent-chat__composer-model {
	flex: 1 1 132px;
	max-width: 190px;
}

.divewp-ai-agent-chat__composer-model select {
	width: 100%;
	max-width: none;
	text-overflow: ellipsis;
}

.divewp-ai-agent-chat.is-workspace-compact .divewp-ai-agent-chat__enter-hint {
	display: none;
}

.divewp-ai-agent-chat.is-workspace-narrow .divewp-ai-agent-chat__composer-tool > span:not(.dashicons) {
	display: none;
}

.divewp-ai-agent-chat.is-workspace-narrow .divewp-ai-agent-chat__composer-tool {
	width: 34px;
	padding-right: 0;
	padding-left: 0;
	justify-content: center;
}

/* Prevent intrinsic grid sizing from creating a horizontal settings scrollbar. */
.divewp-ai-agent-chat__settings {
	min-width: 0;
	overflow-x: hidden;
	overflow-y: auto;
}

.divewp-ai-agent-chat__style {
	grid-template-columns: max-content minmax(0, 1fr);
	align-content: start;
	width: 100%;
	min-width: 0;
	overflow: hidden;
}

.divewp-ai-agent-chat__style > * {
	min-width: 0;
	max-width: 100%;
}

.divewp-ai-agent-chat__style-options,
.divewp-ai-agent-chat__length-options {
	flex-wrap: wrap;
}

.divewp-ai-agent-chat__maintenance-mode {
	grid-column: 1 / -1;
	width: 100%;
	overflow-wrap: anywhere;
}

.divewp-ai-agent-chat__maintenance-mode select,
.divewp-ai-agent-chat__advanced-settings {
	width: 100%;
	min-width: 0;
	max-width: 100%;
}

.divewp-ai-agent-chat__style > .divewp-ai-agent-chat__typing-speed,
.divewp-ai-agent-chat__style > .divewp-ai-agent-chat__read-aloud-speed {
	grid-column: 1 / -1;
	width: 100%;
}

.divewp-ai-agent-chat__read-aloud-speed {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #64748b;
	font-size: 12px;
	font-weight: 600;
}

.divewp-ai-agent-chat__read-aloud-speed select {
	min-width: 82px;
	min-height: 30px;
	margin-left: auto;
	padding: 2px 24px 2px 8px;
	border-color: #cbd5e1;
	font-size: 12px;
}

/* Conversation management in the left workspace. */
.divewp-ai-agent-chat .divewp-ai-agent-chat__new {
	display: inline-flex;
	width: auto;
	min-width: 96px;
	padding: 0 12px;
	border: 1px solid #249d68;
	background: var(--divewp-ai-green);
	color: #fff;
	box-shadow: 0 3px 10px rgba(36, 157, 104, 0.22);
}

.divewp-ai-agent-chat .divewp-ai-agent-chat__new > span:last-child,
.divewp-ai-agent-chat.has-history-rail .divewp-ai-agent-chat__new > span:last-child {
	display: inline;
}

.divewp-ai-agent-chat .divewp-ai-agent-chat__new:hover,
.divewp-ai-agent-chat .divewp-ai-agent-chat__new:focus-visible {
	border-color: #187c51;
	background: #249d68;
	color: #fff;
	outline-color: rgba(36, 157, 104, 0.25);
}

.divewp-ai-agent-chat__history {
	flex-basis: 292px;
	overflow-x: hidden;
	overflow-y: auto;
	scrollbar-gutter: stable;
}

.divewp-ai-agent-chat__conversation-list {
	flex: 1 0 180px;
	min-height: 180px;
	max-height: 280px;
}

.divewp-ai-agent-chat__history-actions {
	display: flex;
	flex: 0 0 auto;
	flex-direction: column;
	gap: 7px;
	margin: 8px 4px 0;
	padding-top: 10px;
}

.divewp-ai-agent-chat__history-action-row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 6px;
}

.divewp-ai-agent-chat__history-actions button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	min-height: 32px;
	padding: 6px 8px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	background: #fff;
	color: #475569;
	font-size: 10px;
	font-weight: 600;
	cursor: pointer;
}

.divewp-ai-agent-chat__history-actions button:hover,
.divewp-ai-agent-chat__history-actions button:focus-visible {
	border-color: #75c89d;
	background: #effaf4;
	color: var(--divewp-ai-green-dark);
	outline: 2px solid rgba(72, 187, 120, 0.15);
}

.divewp-ai-agent-chat__history-actions button[hidden],
.divewp-ai-agent-chat__selection-actions[hidden] {
	display: none;
}

.divewp-ai-agent-chat__history-actions .divewp-ai-agent-chat__delete-all {
	width: 100%;
	min-height: 34px;
	margin: 0;
	color: #b42318;
}

.divewp-ai-agent-chat__selection-actions {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 6px;
	padding: 8px;
	border: 1px solid #9dd8bd;
	border-radius: 10px;
	background: #f1faf5;
}

.divewp-ai-agent-chat__selection-actions strong {
	grid-column: 1 / -1;
	color: var(--divewp-ai-green-dark);
	font-size: 11px;
}

.divewp-ai-agent-chat__conversation-select {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	margin: 0 0 0 7px;
	accent-color: var(--divewp-ai-green);
}

.divewp-ai-agent-chat__conversation-select[hidden] {
	display: none !important;
}

.divewp-ai-agent-chat__history.is-selecting .divewp-ai-agent-chat__conversation-open {
	padding-right: 8px;
}

.divewp-ai-agent-chat__history.is-selecting .divewp-ai-agent-chat__conversation-actions {
	display: none;
}

.divewp-ai-agent-chat__conversation.is-selected {
	background: #e7f7ef;
}

.divewp-ai-agent-chat__settings {
	position: static;
	display: block;
	flex: 0 0 auto;
	width: auto;
	max-height: none;
	margin: 12px 4px 2px;
	padding-top: 10px;
	overflow: visible;
	border: 0;
	border-top: 1px solid #dbe5e1;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	box-sizing: border-box;
}

.divewp-ai-agent-chat__settings * {
	box-sizing: border-box;
	max-width: 100%;
}

.divewp-ai-agent-chat__settings-header {
	padding: 0 0 8px;
	background: transparent;
}

.divewp-ai-agent-chat__settings-header h3 {
	margin: 0;
	font-size: 12px;
}

.divewp-ai-agent-chat__settings .divewp-ai-agent-chat__style {
	display: grid;
	grid-template-columns: 1fr;
	gap: 7px;
	padding: 0;
	overflow: visible;
}

.divewp-ai-agent-chat__settings .divewp-ai-agent-chat__style > * {
	grid-column: 1;
}

.divewp-ai-agent-chat__settings .divewp-ai-agent-chat__style-options,
.divewp-ai-agent-chat__settings .divewp-ai-agent-chat__length-options {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	width: 100%;
}

.divewp-ai-agent-chat__settings .divewp-ai-agent-chat__style-options {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.divewp-ai-agent-chat__settings .divewp-ai-agent-chat__maintenance-mode {
	margin-top: 5px;
}

.divewp-ai-agent-chat__connector-settings {
	display: flex;
	flex-direction: column;
	gap: 5px;
	padding: 8px;
	border: 1px solid #dbe5e1;
	border-radius: 8px;
	background: #f7fbf9;
}

.divewp-ai-agent-chat__provider-status {
	overflow-wrap: anywhere;
}

.divewp-ai-agent-chat.has-history-rail .divewp-ai-agent-chat__history-actions,
.divewp-ai-agent-chat.has-history-rail .divewp-ai-agent-chat__conversation-select {
	display: none;
}

.divewp-ai-agent-chat__mention-help {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin: 2px 2px 5px;
	padding: 8px 10px;
	border-radius: 8px;
	background: #effaf4;
	color: #475569;
	font-size: 10px;
	line-height: 1.4;
}

.divewp-ai-agent-chat__mention-help strong {
	color: var(--divewp-ai-green-dark);
	font-size: 11px;
}

.divewp-ai-agent-context__popover-help {
	margin: 0 0 10px;
	padding: 8px 10px;
	border-radius: 9px;
	background: #effaf4;
	color: #526579;
	font-size: 10px;
	line-height: 1.45;
}

/* Keep the sidebar fixed; only the conversation list needs to scroll. */
.divewp-ai-agent-chat .divewp-ai-agent-chat__history {
	min-height: 0;
	overflow: hidden;
	scrollbar-gutter: auto;
}
.divewp-ai-agent-chat .divewp-ai-agent-chat__history > :not(.divewp-ai-agent-chat__conversation-list) { flex-shrink: 0; }
.divewp-ai-agent-chat .divewp-ai-agent-chat__conversation-list {
	flex: 1 1 0;
	min-height: 0;
	max-height: none;
	overflow-x: hidden;
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: #b9ccc4 transparent;
}
.divewp-ai-agent-chat__settings-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	min-height: 44px;
	margin: 12px 4px 0;
	padding: 10px 14px;
	border: 1px solid #cfdfd8;
	border-radius: 12px;
	background: #fff;
	color: #30473f;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
.divewp-ai-agent-chat__settings-toggle:hover { background: #e8f5ee; }
.has-history-rail .divewp-ai-agent-chat__settings-toggle { margin-inline: 0; padding-inline: 0; }
.has-history-rail .divewp-ai-agent-chat__settings-toggle > span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
#divewp-ai-agent-chat-new, #divewp-ai-agent-chat-new > span { color: #fff !important; }
#divewp-ai-agent-chat-new { background: #188451; border-color: #188451; }
#divewp-ai-agent-chat-new:hover { background: #116b40; }

/* Native modal supplies focus containment and makes the page behind it inert. */
#divewp-ai-agent-chat-settings:not([open]) { display: none; }
#divewp-ai-agent-chat-settings[open] {
	position: fixed;
	inset: 0;
	display: flex;
	flex-direction: column;
	width: min(560px, calc(100vw - 32px));
	max-width: none;
	max-height: calc(100dvh - 32px);
	margin: auto;
	padding: 0;
	overflow: hidden;
	border: 1px solid #d9e5df;
	border-radius: 20px;
	background: #fff;
	color: #263c33;
	box-shadow: 0 24px 90px #102b3440;
	font: 14px/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
#divewp-ai-agent-chat-settings::backdrop { background: #132c3b66; backdrop-filter: blur(4px); }
#divewp-ai-agent-chat-settings .divewp-ai-agent-chat__settings-header {
	display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
	flex-shrink: 0; padding: 22px 24px 18px; border-bottom: 1px solid #e5ece8;
	background: #f7fbf9;
}
#divewp-ai-agent-chat-settings .divewp-ai-agent-chat__settings-header h3 { font: 600 21px/1.3 inherit; font-family: inherit; font-size: 21px; color: #203b2f; }
#divewp-ai-agent-chat-settings .divewp-ai-agent-chat__settings-header p { margin: 6px 0 0; font-size: 13px; color: #60756b; }
#divewp-ai-agent-chat-settings-close { min-width: 44px; min-height: 44px; border: 1px solid #dce6e0; border-radius: 12px; background: #fff; color: #435b50; cursor: pointer; }
#divewp-ai-agent-chat-settings .divewp-ai-agent-chat__style {
	display: grid; grid-template-columns: 1fr; gap: 10px; padding: 20px 24px;
	min-height: 0; overflow-y: auto; background: #fff; border: 0;
}
#divewp-ai-agent-chat-settings .divewp-ai-agent-chat__style-label,
#divewp-ai-agent-chat-settings .divewp-ai-agent-chat__length-label { font-size: 13px; font-weight: 600; text-transform: none; color: #354d41; }
#divewp-ai-agent-chat-settings .divewp-ai-agent-chat__length-label { margin-top: 6px; }
#divewp-ai-agent-chat-settings .divewp-ai-agent-chat__style button { min-height: 44px; font-size: 14px; }
#divewp-ai-agent-chat-settings .divewp-ai-agent-chat__style button.is-active { color: #116b40; background: #fff; box-shadow: 0 1px 4px #173b2720; }
#divewp-ai-agent-chat-settings .divewp-ai-agent-chat__style > label {
	display: grid; grid-template-columns: 1fr 190px; align-items: center; gap: 8px 16px;
	margin: 6px 0 0; padding: 16px 0 0; border-top: 1px solid #e7ede9;
	font-size: 13px; color: #354d41;
}
#divewp-ai-agent-chat-settings select { width: 100%; max-width: 100%; min-height: 44px; margin: 0; border: 1px solid #cbdcd2; border-radius: 10px; font-size: 14px; background-color: #fff; color: #30473b; }
#divewp-ai-agent-chat-settings small { grid-column: 1 / -1; font-size: 12px; line-height: 1.5; color: #65796e; }
#divewp-ai-agent-chat-settings .divewp-ai-agent-chat__connector-settings { order: 1; margin-top: 8px; padding: 12px; }
#divewp-ai-agent-chat-settings .divewp-ai-agent-chat__settings-footer {
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	flex-shrink: 0; padding: 16px 24px; border-top: 1px solid #e5ece8; background: #f7fbf9;
	font-size: 12px; color: #60756b;
}
#divewp-ai-agent-chat-settings-done { min-height: 44px; padding: 10px 24px; border: 0; border-radius: 10px; background: #188451; color: #fff; font-weight: 600; cursor: pointer; }
#divewp-ai-agent-chat-settings .divewp-ai-agent-chat__digest-preferences {
	display: grid; gap: 10px; margin-top: 10px; padding: 16px;
	border: 1px solid #d5e5df; border-radius: 12px; background: #f5faf7;
}
#divewp-ai-agent-chat-settings .divewp-ai-agent-chat__digest-preferences > label {
	display: grid; grid-template-columns: 1fr 190px; align-items: center; gap: 12px;
	font-size: 13px; color: #354d41;
}
#divewp-ai-agent-chat-settings .divewp-ai-agent-chat__digest-switch > input[type="checkbox"] {
	appearance: none; -webkit-appearance: none; position: relative;
	width: 42px; height: 24px; margin: 0;
	border: 1px solid #82979b; border-radius: 999px; background: #b5c3c5; cursor: pointer;
}
#divewp-ai-agent-chat-settings .divewp-ai-agent-chat__digest-switch > input[type="checkbox"]::before {
	content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
	border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #0003; transition: transform .15s ease;
}
#divewp-ai-agent-chat-settings .divewp-ai-agent-chat__digest-switch > input[type="checkbox"]:checked { border-color: #25875d; background: #25875d; }
#divewp-ai-agent-chat-settings .divewp-ai-agent-chat__digest-switch > input[type="checkbox"]:checked::before { transform: translateX(18px); }
#divewp-ai-agent-chat-settings .divewp-ai-agent-chat__digest-status { min-height: 18px; font-size: 12px; color: #356548; }
#divewp-ai-agent-chat-settings :focus-visible, #divewp-ai-agent-chat-settings-toggle:focus-visible { outline: 3px solid #188451; outline-offset: 3px; }
@media (max-width: 480px) {
	#divewp-ai-agent-chat-settings .divewp-ai-agent-chat__style > label { grid-template-columns: 1fr; }
	#divewp-ai-agent-chat-settings .divewp-ai-agent-chat__digest-preferences > label { grid-template-columns: 1fr; }
	#divewp-ai-agent-chat-settings .divewp-ai-agent-chat__style { padding: 16px; }
	#divewp-ai-agent-chat-settings .divewp-ai-agent-chat__settings-header,
	#divewp-ai-agent-chat-settings .divewp-ai-agent-chat__settings-footer { padding: 16px; }
}

@media (max-width: 820px) {
	.divewp-ai-agent-chat .divewp-ai-agent-chat__new {
		width: auto;
		min-width: 92px;
		padding: 0 10px;
	}

	.divewp-ai-agent-chat .divewp-ai-agent-chat__new > span:last-child {
		display: inline;
	}
}
