.pa-chatbot {
	position: fixed;
	right: 22px;
	bottom: 110px;
	z-index: 9999;
	font-family: var(--font-body, "Plus Jakarta Sans", sans-serif);
}

.pa-chatbot__toggle {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	min-height: 58px;
	padding: 0 18px 0 8px;
	border: 0;
	border-radius: 999px;
	background: #151515;
	color: #fff;
	font-weight: 800;
	box-shadow: 0 16px 35px rgba(0, 0, 0, 0.24);
	cursor: pointer;
}

.pa-chatbot__toggle-avatar {
	display: block;
	flex: 0 0 auto;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background-position: 50% 28%;
	background-size: 185%;
	background-color: #fff;
	box-shadow: 0 0 0 3px #d0003b;
}

.pa-chatbot__panel {
	position: absolute;
	right: 0;
	bottom: 74px;
	display: flex;
	width: min(380px, calc(100vw - 28px));
	max-height: min(640px, calc(100vh - 112px));
	overflow: hidden;
	flex-direction: column;
	border: 1px solid rgba(21, 21, 21, 0.12);
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.pa-chatbot__panel[hidden] {
	display: none;
}

.pa-chatbot__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 18px;
	background: #151515;
	color: #fff;
}

.pa-chatbot__avatar {
	flex: 0 0 auto;
	width: 58px;
	height: 58px;
	border: 2px solid rgba(255, 255, 255, 0.72);
	border-radius: 50%;
	background-position: 50% 28%;
	background-size: 185%;
	background-color: #fff;
}

.pa-chatbot__identity {
	min-width: 0;
	flex: 1;
}

.pa-chatbot__header h2 {
	margin: 0;
	color: inherit;
	font-size: 18px;
	line-height: 1.25;
}

.pa-chatbot__identity p {
	margin: 3px 0 0;
	color: rgba(255, 255, 255, 0.74);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.35;
}

.pa-chatbot__close {
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 50%;
	background: transparent;
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.pa-chatbot__messages {
	display: flex;
	min-height: 220px;
	padding: 16px;
	overflow-y: auto;
	flex: 1;
	flex-direction: column;
	gap: 10px;
	background: #f7f5f1;
}

.pa-chatbot__message {
	max-width: 88%;
	padding: 10px 12px;
	border-radius: 8px;
	font-size: 14px;
	line-height: 1.45;
	white-space: pre-wrap;
}

.pa-chatbot__message p {
	margin: 0;
}

.pa-chatbot__message p + p {
	margin-top: 10px;
}

.pa-chatbot__message a {
	color: inherit;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.pa-chatbot__message strong {
	font-weight: 800;
}

.pa-chatbot__message--bot {
	align-self: flex-start;
	background: #fff;
	color: #202020;
	box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.pa-chatbot__message--user {
	align-self: flex-end;
	background: #d0003b;
	color: #fff;
}

.pa-chatbot__form {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 10px;
	padding: 12px;
	border-top: 1px solid rgba(21, 21, 21, 0.1);
	background: #fff;
}

.pa-chatbot__input {
	min-height: 46px;
	max-height: 120px;
	resize: vertical;
	border: 1px solid rgba(21, 21, 21, 0.16);
	border-radius: 6px;
	padding: 10px 12px;
	font: inherit;
}

.pa-chatbot__trap {
	position: absolute;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
	opacity: 0;
	pointer-events: none;
}

.pa-chatbot__send {
	align-self: end;
	min-height: 46px;
	border: 0;
	border-radius: 6px;
	padding: 0 14px;
	background: #151515;
	color: #fff;
	font-weight: 800;
	cursor: pointer;
}

.pa-chatbot__send:disabled {
	cursor: wait;
	opacity: 0.65;
}

.pa-chatbot__note {
	margin: 0;
	padding: 0 12px 12px;
	background: #fff;
	color: #686868;
	font-size: 11px;
	line-height: 1.4;
}

@media (max-width: 600px) {
	.pa-chatbot {
		right: 10px;
		bottom: max(86px, calc(env(safe-area-inset-bottom) + 76px));
		left: 10px;
	}

	.pa-chatbot__toggle {
		margin-left: auto;
		min-height: 54px;
		padding: 0;
		border-radius: 50%;
	}

	.pa-chatbot__panel {
		right: 0;
		bottom: 66px;
		width: 100%;
		max-height: min(500px, calc(100dvh - 156px));
	}

	.pa-chatbot__toggle-text {
		display: none;
	}

	.pa-chatbot__toggle-avatar {
		width: 54px;
		height: 54px;
		box-shadow: 0 0 0 3px #d0003b, 0 12px 30px rgba(0, 0, 0, 0.25);
	}

	.pa-chatbot__header {
		gap: 10px;
		padding: 10px 12px;
	}

	.pa-chatbot__avatar {
		width: 44px;
		height: 44px;
	}

	.pa-chatbot__header h2 {
		font-size: 15px;
	}

	.pa-chatbot__identity p {
		font-size: 11px;
		line-height: 1.25;
	}

	.pa-chatbot__close {
		width: 30px;
		height: 30px;
		font-size: 18px;
	}

	.pa-chatbot__messages {
		min-height: 132px;
		padding: 10px;
		gap: 8px;
	}

	.pa-chatbot__message {
		max-width: 94%;
		padding: 8px 10px;
		font-size: 13px;
		line-height: 1.35;
	}

	.pa-chatbot__form {
		grid-template-columns: minmax(0, 1fr) auto;
		gap: 8px;
		padding: 9px 10px 6px;
	}

	.pa-chatbot__input {
		min-height: 42px;
		max-height: 84px;
		padding: 8px 10px;
		font-size: 16px;
		line-height: 1.3;
	}

	.pa-chatbot__send {
		min-height: 42px;
		padding: 0 12px;
		font-size: 14px;
	}

	.pa-chatbot__note {
		padding: 0 10px 9px;
		font-size: 10px;
		line-height: 1.3;
	}
}

@media (max-width: 600px) and (max-height: 620px) {
	.pa-chatbot {
		bottom: max(72px, calc(env(safe-area-inset-bottom) + 62px));
	}

	.pa-chatbot__panel {
		max-height: calc(100dvh - 138px);
	}

	.pa-chatbot__messages {
		min-height: 82px;
	}

	.pa-chatbot__message {
		font-size: 12px;
	}

	.pa-chatbot__note {
		display: none;
	}
}
