.wpdsac-chat {
	--wpdsac-accent: #2563eb;
	--wpdsac-accent-text: #fff;
	--wpdsac-surface: #ffffff;
	--wpdsac-text: #172033;
	--wpdsac-bot-message: #eff4ff;
	--wpdsac-bot-text: #172033;
	--wpdsac-user-message: #2563eb;
	--wpdsac-user-text: #fff;
	--wpdsac-input: #fff;
	--wpdsac-input-text: #172033;
	--wpdsac-send: #2563eb;
	--wpdsac-send-text: #fff;
	--wpdsac-muted: #64748b;
	--wpdsac-border: #dce2ee;
	--wpdsac-width: 380px;
	--wpdsac-radius: 18px;
	--wpdsac-toggle-radius: 18px;
	--wpdsac-message-radius: 14px;
	--wpdsac-input-radius: 18px;
	--wpdsac-font-size: 16px;
	--wpdsac-panel-padding: 18px;
	--wpdsac-messages-height: 320px;
	--wpdsac-launcher-size: 60px;
	--wpdsac-shadow-opacity: 16%;
	--wpdsac-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--wpdsac-offset-x: 24px;
	--wpdsac-offset-y: 24px;
	position: relative;
	z-index: 9999;
	box-sizing: border-box;
	width: min(100%, var(--wpdsac-width));
	color: var(--wpdsac-text);
	font: 400 var(--wpdsac-font-size)/1.5 var(--wpdsac-font-family);
}

.wpdsac-chat [hidden] {
	display: none !important;
}

.wpdsac-chat .wpdsac-chat__intro-bubble {
	position: absolute;
	right: 0;
	bottom: calc(var(--wpdsac-launcher-size) + 12px);
	box-sizing: border-box;
	width: min(320px, calc(100vw - 32px));
	min-width: 0 !important;
	max-width: calc(100vw - 32px);
	height: auto !important;
	padding: 12px 16px;
	border: 1px solid var(--wpdsac-border);
	border-radius: 16px 16px 4px;
	background: rgb(255 255 255 / 78%);
	background: color-mix(in srgb, var(--wpdsac-surface) 78%, transparent);
	-webkit-backdrop-filter: blur(14px) saturate(135%);
	backdrop-filter: blur(14px) saturate(135%);
	box-shadow: 0 12px 32px rgb(23 32 51 / var(--wpdsac-shadow-opacity));
	color: var(--wpdsac-text);
	font: inherit;
	line-height: 1.4;
	text-align: left !important;
	white-space: normal !important;
	overflow: hidden;
	overflow-wrap: anywhere;
	word-break: normal;
	cursor: pointer;
}

.wpdsac-chat.is-expanded .wpdsac-chat__intro-bubble {
	display: none;
}

body > .wpdsac-chat.wpdsac-position--bottom-right {
	position: fixed;
	right: var(--wpdsac-offset-x);
	bottom: var(--wpdsac-offset-y);
}

body > .wpdsac-chat.wpdsac-position--bottom-left {
	position: fixed;
	bottom: var(--wpdsac-offset-y);
	left: var(--wpdsac-offset-x);
}

.wpdsac-chat__toggle,
.wpdsac-chat__form button {
	box-sizing: border-box;
	border: 0;
	cursor: pointer;
}

.wpdsac-chat__toggle {
	display: flex;
	gap: 20px;
	justify-content: space-between;
	width: 100%;
	padding: 14px 18px;
	border-radius: var(--wpdsac-toggle-radius);
	background: var(--wpdsac-accent);
	color: var(--wpdsac-accent-text);
	font: inherit;
	font-weight: 700;
}

.wpdsac-chat:not(.is-expanded) {
	width: var(--wpdsac-launcher-size);
}

.wpdsac-chat:not(.is-expanded) .wpdsac-chat__toggle {
	align-items: center;
	justify-content: center;
	width: var(--wpdsac-launcher-size);
	height: var(--wpdsac-launcher-size);
	padding: 0;
	border-radius: 50%;
	box-shadow: 0 10px 30px rgb(23 32 51 / var(--wpdsac-shadow-opacity));
}

.wpdsac-chat:not(.is-expanded) .wpdsac-chat__toggle-title {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.wpdsac-chat.is-expanded.wpdsac-hide-header-icon .wpdsac-chat__icon {
	display: none;
}

.wpdsac-chat__panel {
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
	margin-bottom: 10px;
	padding: var(--wpdsac-panel-padding);
	border: 1px solid var(--wpdsac-border);
	border-radius: var(--wpdsac-radius);
	background: var(--wpdsac-surface);
	box-shadow: 0 18px 50px rgb(23 32 51 / var(--wpdsac-shadow-opacity));
	overflow: hidden;
}

.wpdsac-chat:not(.is-expanded) .wpdsac-chat__panel {
	display: none;
}

.wpdsac-chat__message {
	box-sizing: border-box;
	max-width: calc(100% - 40px);
	min-width: 0;
	margin: 0;
	padding: 12px 14px;
	border-radius: var(--wpdsac-message-radius) var(--wpdsac-message-radius) var(--wpdsac-message-radius) calc(var(--wpdsac-message-radius) / 3);
	background: var(--wpdsac-bot-message);
	color: var(--wpdsac-bot-text);
	white-space: pre-wrap;
	text-align: left;
	overflow-wrap: anywhere;
	word-break: normal;
}

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

.wpdsac-chat__messages {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
	max-height: var(--wpdsac-messages-height);
	padding: 2px;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.wpdsac-chat__message--user {
	max-width: 84%;
	border-radius: var(--wpdsac-message-radius) var(--wpdsac-message-radius) calc(var(--wpdsac-message-radius) / 3) var(--wpdsac-message-radius);
	background: var(--wpdsac-user-message);
	color: var(--wpdsac-user-text);
}

.wpdsac-chat__message-row {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	width: 100%;
	min-width: 0;
}

.wpdsac-chat__message-row--bot {
	justify-content: flex-start;
}

.wpdsac-chat__message-row--user {
	justify-content: flex-end;
}

.wpdsac-chat__avatar {
	box-sizing: border-box;
	width: 32px;
	height: 32px;
	flex: 0 0 32px;
	border: 1px solid var(--wpdsac-border);
	border-radius: 50%;
	background: var(--wpdsac-bot-message);
	object-fit: cover;
}

.wpdsac-chat__name-gate .wpdsac-chat__message-row {
	margin-bottom: 12px;
}

.wpdsac-chat__name-gate form {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 8px;
}

.wpdsac-chat__name-gate input,
.wpdsac-chat__name-gate button {
	min-height: 44px;
	box-sizing: border-box;
	border-radius: var(--wpdsac-input-radius);
	font: inherit;
}

.wpdsac-chat__name-gate input {
	min-width: 0;
	padding: 10px 12px;
	border: 1px solid var(--wpdsac-border);
}

.wpdsac-chat__name-gate button {
	padding: 8px 16px;
	border: 0;
	background: var(--wpdsac-send);
	color: var(--wpdsac-send-text);
	font-weight: 700;
	cursor: pointer;
}

.wpdsac-chat__quick-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 14px;
}

.wpdsac-chat__quick-actions + .wpdsac-chat__form {
	margin-top: 0;
}

.wpdsac-chat__quick-action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 8px 14px;
	border: 1px solid var(--wpdsac-accent);
	border-radius: 999px;
	background: transparent;
	color: var(--wpdsac-accent);
	font: inherit;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
}

.wpdsac-chat__quick-action:hover,
.wpdsac-chat__quick-action:focus-visible {
	background: var(--wpdsac-bot-message);
	color: var(--wpdsac-accent);
}

.wpdsac-chat__form {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 8px;
	width: 100%;
	min-width: 0;
	margin-top: 14px;
}

.wpdsac-chat__form input {
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
	min-height: 44px;
	padding: 11px 12px;
	border: 1px solid var(--wpdsac-border);
	border-radius: var(--wpdsac-input-radius);
	background: var(--wpdsac-input);
	color: var(--wpdsac-input-text);
	font: inherit;
}

.wpdsac-chat__form button {
	width: auto;
	min-width: max-content;
	min-height: 44px;
	max-width: none;
	padding: 0 16px;
	border-radius: var(--wpdsac-input-radius);
	background: var(--wpdsac-send);
	color: var(--wpdsac-send-text);
	font: inherit;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
}

.wpdsac-chat__form button:disabled {
	cursor: wait;
	opacity: 0.65;
}

.wpdsac-chat__lead {
	margin: 0 0 18px;
	padding: 12px;
	border: 1px solid var(--wpdsac-border);
	border-radius: var(--wpdsac-radius);
}

.wpdsac-chat__lead p {
	margin: 0 0 10px;
}

.wpdsac-chat__lead .wpdsac-chat__field-hint {
	margin: -4px 0 0;
	color: var(--wpdsac-muted);
	font-size: 12px;
}

.wpdsac-chat__lead form {
	display: grid;
	gap: 10px;
}

.wpdsac-chat__lead label:not(.wpdsac-chat__consent) span {
	display: block;
	margin-bottom: 3px;
	font-size: 13px;
}

.wpdsac-chat__lead input[type="text"],
.wpdsac-chat__lead input[type="email"],
.wpdsac-chat__lead input[type="tel"],
.wpdsac-chat__lead textarea {
	box-sizing: border-box;
	width: 100%;
	padding: 9px 10px;
	border: 1px solid var(--wpdsac-border);
	border-radius: calc(var(--wpdsac-radius) / 2);
	font: inherit;
}

.wpdsac-chat__lead textarea {
	resize: vertical;
}

.wpdsac-chat input:focus-visible,
.wpdsac-chat textarea:focus-visible,
.wpdsac-chat button:focus-visible,
.wpdsac-chat a:focus-visible {
	outline: 2px solid var(--wpdsac-accent);
	outline-offset: 2px;
}

.wpdsac-chat__consent {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 8px;
	font-size: 12px;
}

.wpdsac-chat__lead button {
	padding: 10px 14px;
	border: 0;
	border-radius: var(--wpdsac-radius);
	background: var(--wpdsac-accent);
	color: var(--wpdsac-accent-text);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.wpdsac-chat__lead button:disabled {
	cursor: wait;
	opacity: 0.65;
}

.wpdsac-chat__honeypot {
	position: absolute !important;
	left: -10000px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

.wpdsac-chat__status {
	margin: 10px 0 0;
	font-size: 13px;
	color: var(--wpdsac-muted);
}

@media (max-width: 480px) {
	body > .wpdsac-chat.is-expanded.wpdsac-position--bottom-left,
	body > .wpdsac-chat.is-expanded.wpdsac-position--bottom-right {
		right: 12px;
		bottom: 12px;
		left: 12px;
		width: auto;
	}

	.wpdsac-chat__name-gate form,
	.wpdsac-chat__form {
		grid-template-columns: 1fr;
	}

	.wpdsac-chat__form button {
		width: 100%;
		min-width: 0;
		max-width: none;
		padding: 11px 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wpdsac-chat *,
	.wpdsac-chat *::before,
	.wpdsac-chat *::after {
		scroll-behavior: auto !important;
		transition: none !important;
	}
}
