/* Patriot Chat Assistant. Everything is scoped under .pca-root. */
.pca-root {
	--pca-navy: #0f1a2e;
	--pca-cream: #f4f1ea;
	--pca-gold: #d7bf86;
	--pca-ink: #1b2433;
	--pca-bot: #e9edf3;
	--pca-bottom: 20px;
	--pca-side: 20px;
	position: fixed;
	right: var(--pca-side);
	bottom: calc(var(--pca-bottom) + env(safe-area-inset-bottom, 0px));
	z-index: 99990;
	font-family: inherit;
	font-size: 16px;
	line-height: 1.45;
	color: var(--pca-ink);
}
.pca-root[hidden] { display: none; }
.pca-root *,
.pca-root *::before,
.pca-root *::after {
	box-sizing: border-box;
}
.pca-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
.pca-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	opacity: 0;
}
.pca-launcher {
	display: block;
	margin-left: auto;
	min-width: 88px;
	min-height: 52px;
	padding: 0 22px;
	border: 2px solid var(--pca-cream);
	border-radius: 26px;
	background: var(--pca-navy);
	color: var(--pca-cream);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 6px 18px rgba(15, 26, 46, 0.35);
}
.pca-root button:focus-visible,
.pca-root a:focus-visible,
.pca-root input:focus-visible,
.pca-log:focus-visible {
	outline: 3px solid var(--pca-gold);
	outline-offset: 2px;
}
.pca-panel {
	display: flex;
	flex-direction: column;
	width: 360px;
	max-width: calc(100vw - 2 * var(--pca-side));
	height: 520px;
	max-height: calc(100vh - 120px);
	max-height: calc(100dvh - 120px);
	margin-bottom: 12px;
	border-radius: 14px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 12px 40px rgba(15, 26, 46, 0.4);
}
.pca-panel[hidden] {
	display: none;
}
.pca-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px;
	padding: 14px 12px 12px 16px;
	background: var(--pca-navy);
	color: var(--pca-cream);
}
.pca-title {
	margin: 0;
	font-size: 17px;
	line-height: 1.25;
	font-weight: 700;
	color: var(--pca-cream);
}
.pca-sub {
	margin: 2px 0 0;
	font-size: 13px;
	color: var(--pca-cream);
}
.pca-close {
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--pca-cream);
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}
.pca-log {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 14px 12px;
	background: #fff;
	overscroll-behavior: contain;
}
.pca-msg {
	display: flex;
	margin: 0 0 10px;
}
.pca-msg-user {
	justify-content: flex-end;
}
.pca-bubble {
	max-width: 86%;
	margin: 0;
	padding: 10px 12px;
	border-radius: 12px;
	background: var(--pca-bot);
	color: var(--pca-ink);
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}
.pca-msg-user .pca-bubble {
	background: var(--pca-navy);
	color: var(--pca-cream);
}
.pca-links,
.pca-options {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 12px;
}
.pca-link,
.pca-option {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 8px 14px;
	border: 2px solid var(--pca-navy);
	border-radius: 22px;
	background: #fff;
	color: var(--pca-navy);
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}
.pca-consent {
	margin: 0 0 12px;
	padding: 10px 12px;
	border: 2px solid var(--pca-navy);
	border-radius: 12px;
	background: #fff;
}
.pca-consent-text {
	margin: 0 0 10px;
	color: var(--pca-ink);
}
.pca-consent .pca-option {
	margin: 0 8px 4px 0;
}
.pca-ainote {
	margin: -4px 0 10px;
	padding: 0 4px;
	font-size: 13px;
	color: #4a5568;
}
.pca-typing {
	margin: 0 0 10px;
	font-size: 13px;
	color: #4a5568;
}
.pca-form {
	display: flex;
	gap: 8px;
	padding: 10px 12px 6px;
	border-top: 1px solid #d5dae3;
	background: #fff;
}
.pca-input {
	flex: 1 1 auto;
	min-width: 0;
	min-height: 44px;
	padding: 8px 12px;
	border: 1px solid #6b7686;
	border-radius: 8px;
	background: #fff;
	color: var(--pca-ink);
	font: inherit;
	font-size: 16px; /* 16px stops iOS from zooming the page on focus */
}
.pca-send {
	flex: 0 0 auto;
	min-width: 68px;
	min-height: 44px;
	padding: 0 16px;
	border: 0;
	border-radius: 8px;
	background: var(--pca-navy);
	color: var(--pca-cream);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}
.pca-send:disabled {
	opacity: 0.6;
	cursor: default;
}
.pca-note {
	margin: 0;
	padding: 0 12px 10px;
	font-size: 12px;
	color: #4a5568;
	background: #fff;
}
.pca-privacy {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	min-height: 24px;
	margin: 0 12px 4px;
	padding: 2px 0;
	color: #354256;
	font-size: 12px;
	line-height: 1.35;
	text-decoration: underline;
}
@media (max-width: 480px) {
	.pca-root.pca-open {
		right: 0;
		bottom: 0;
		left: 0;
	}
	.pca-root.pca-open .pca-launcher {
		display: none;
	}
	.pca-root.pca-open .pca-panel {
		width: 100%;
		max-width: 100%;
		height: 85vh;
		height: 85dvh;
		max-height: none;
		margin-bottom: 0;
		border-radius: 14px 14px 0 0;
		padding-bottom: env(safe-area-inset-bottom, 0px);
	}
}
@media (prefers-reduced-motion: no-preference) {
	.pca-launcher {
		transition: transform 0.15s ease;
	}
	.pca-launcher:hover {
		transform: translateY(-2px);
	}
}
@media (forced-colors: active) {
	.pca-launcher,
	.pca-link,
	.pca-option,
	.pca-send {
		border: 2px solid ButtonText;
	}
}
