/* WCP AI Chatbot — floating widget */

.wcp-ac {
	--wcp-ac-navy: #00295c;
	--wcp-ac-navy-deep: #0b213f;
	--wcp-ac-teal: #0abbb5;
	--wcp-ac-surface: #ffffff;
	--wcp-ac-muted: #5b6b7c;
	--wcp-ac-line: #e5ebf2;
	--wcp-ac-user: #00295c;
	--wcp-ac-bot: #f3f6fa;
	--wcp-ac-shadow: 0 18px 50px rgba(0, 41, 92, 0.22);
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 99990;
	font-family: Montserrat, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: #1a2332;
}

.wcp-ac[hidden] {
	display: none !important;
}

.wcp-ac__launcher {
	width: 58px;
	height: 58px;
	border: 0;
	border-radius: 50%;
	background: linear-gradient(145deg, var(--wcp-ac-navy) 0%, #064193 70%, #0a5aad 100%);
	color: #fff;
	cursor: pointer;
	box-shadow: 0 10px 28px rgba(0, 41, 92, 0.35);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wcp-ac__launcher:hover,
.wcp-ac__launcher:focus-visible {
	transform: translateY(-2px) scale(1.03);
	box-shadow: 0 14px 32px rgba(0, 41, 92, 0.42);
	outline: none;
}

.wcp-ac__launcher-close {
	display: none;
}

.wcp-ac.is-open .wcp-ac__launcher-icon {
	display: none;
}

.wcp-ac.is-open .wcp-ac__launcher-close {
	display: inline-flex;
}

.wcp-ac__panel {
	position: absolute;
	right: 0;
	bottom: 72px;
	width: min(380px, calc(100vw - 28px));
	height: min(560px, calc(100vh - 110px));
	background: var(--wcp-ac-surface);
	border-radius: 18px;
	box-shadow: var(--wcp-ac-shadow);
	border: 1px solid var(--wcp-ac-line);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transform-origin: bottom right;
	animation: wcpAcPanelIn 0.22s ease;
}

.wcp-ac__panel[hidden] {
	display: none !important;
}

@keyframes wcpAcPanelIn {
	from {
		opacity: 0;
		transform: translateY(12px) scale(0.96);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.wcp-ac__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 16px 14px;
	background: linear-gradient(135deg, var(--wcp-ac-navy-deep), var(--wcp-ac-navy) 55%, #064193);
	color: #fff;
}

.wcp-ac__title {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
}

.wcp-ac__subtitle {
	margin: 4px 0 0;
	font-size: 12px;
	opacity: 0.82;
	font-weight: 500;
}

.wcp-ac__close {
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.wcp-ac__close:hover,
.wcp-ac__close:focus-visible {
	background: rgba(255, 255, 255, 0.22);
	outline: none;
}

.wcp-ac__messages {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 16px;
	background:
		radial-gradient(120% 80% at 100% 0%, rgba(10, 187, 181, 0.08), transparent 55%),
		linear-gradient(180deg, #f8fafc 0%, #ffffff 40%);
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.wcp-ac__bubble {
	max-width: 88%;
	padding: 10px 12px;
	border-radius: 14px;
	font-size: 14px;
	line-height: 1.45;
	white-space: pre-wrap;
	word-break: break-word;
}

.wcp-ac__bubble--bot {
	align-self: flex-start;
	background: var(--wcp-ac-bot);
	color: #1a2332;
	border-bottom-left-radius: 4px;
}

.wcp-ac__bubble--user {
	align-self: flex-end;
	background: var(--wcp-ac-user);
	color: #fff;
	border-bottom-right-radius: 4px;
}

.wcp-ac__bubble--error {
	align-self: center;
	background: #fff4f4;
	color: #8a1f1f;
	border: 1px solid #f0c7c7;
	font-size: 13px;
}

.wcp-ac__typing {
	align-self: flex-start;
	display: inline-flex;
	gap: 5px;
	padding: 12px 14px;
	background: var(--wcp-ac-bot);
	border-radius: 14px;
	border-bottom-left-radius: 4px;
}

.wcp-ac__typing span {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #8aa0b5;
	animation: wcpAcDot 1s infinite ease-in-out;
}

.wcp-ac__typing span:nth-child(2) {
	animation-delay: 0.15s;
}

.wcp-ac__typing span:nth-child(3) {
	animation-delay: 0.3s;
}

@keyframes wcpAcDot {
	0%,
	80%,
	100% {
		opacity: 0.35;
		transform: translateY(0);
	}
	40% {
		opacity: 1;
		transform: translateY(-3px);
	}
}

.wcp-ac__composer {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	padding: 12px;
	border-top: 1px solid var(--wcp-ac-line);
	background: #fff;
}

.wcp-ac__input {
	flex: 1 1 auto;
	resize: none;
	min-height: 42px;
	max-height: 110px;
	padding: 10px 12px;
	border: 1px solid var(--wcp-ac-line);
	border-radius: 12px;
	font: inherit;
	font-size: 14px;
	line-height: 1.4;
	color: #1a2332;
	background: #fff;
}

.wcp-ac__input:focus {
	outline: 2px solid rgba(10, 187, 181, 0.35);
	border-color: var(--wcp-ac-teal);
}

.wcp-ac__send {
	flex: 0 0 auto;
	width: 42px;
	height: 42px;
	border: 0;
	border-radius: 12px;
	background: var(--wcp-ac-teal);
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s ease, transform 0.15s ease;
}

.wcp-ac__send:hover,
.wcp-ac__send:focus-visible {
	background: #089e99;
	outline: none;
}

.wcp-ac__send:disabled {
	opacity: 0.55;
	cursor: not-allowed;
	transform: none;
}

.wcp-ac .screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

@media (max-width: 480px) {
	.wcp-ac {
		right: 12px;
		bottom: 12px;
	}

	.wcp-ac__panel {
		width: calc(100vw - 24px);
		height: min(70vh, calc(100vh - 90px));
		bottom: 66px;
	}
}
