.swa-root,
.swa-root * {
	box-sizing: border-box;
}

.swa-root {
	--swa-accent: #1f2937;
	--swa-desktop-bottom: 20px;
	--swa-mobile-bottom: 12px;
	--swa-side: 20px;
	--swa-text: #172033;
	--swa-muted: #667085;
	--swa-border: #e7eaf0;
	--swa-surface: #fff;
	--swa-soft: #f7f8fa;
	position: fixed;
	bottom: var(--swa-desktop-bottom);
	bottom: max(var(--swa-desktop-bottom), env(safe-area-inset-bottom, 0px));
	z-index: 2147482000;
	font-family: inherit;
	font-size: 14px;
	line-height: 1.55;
	color: var(--swa-text);
	text-align: start;
}

.swa-root.swa-position-right {
	right: var(--swa-side);
}

.swa-root.swa-position-left {
	left: var(--swa-side);
}

.swa-root [hidden] {
	display: none !important;
}

.swa-root button,
.swa-root input,
.swa-root textarea {
	font: inherit;
}

.swa-launcher {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	min-height: 50px;
	margin: 0;
	padding: 0 18px;
	border: 0;
	border-radius: 999px;
	background: var(--swa-accent);
	box-shadow: 0 10px 30px rgba(17, 24, 39, .2), 0 2px 7px rgba(17, 24, 39, .12);
	color: #fff;
	cursor: pointer;
	appearance: none;
	transition: transform .18s ease, box-shadow .18s ease;
}

.swa-launcher:hover {
	transform: translateY(-1px);
	box-shadow: 0 12px 34px rgba(17, 24, 39, .24), 0 3px 9px rgba(17, 24, 39, .14);
}

.swa-launcher:focus-visible,
.swa-root button:focus-visible,
.swa-root a:focus-visible,
.swa-root input:focus-visible,
.swa-root textarea:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--swa-accent) 32%, transparent);
	outline-offset: 2px;
}

.swa-launcher-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	flex: 0 0 24px;
}

.swa-launcher-icon svg,
.swa-launcher-icon img {
	display: block;
	width: 24px;
	height: 24px;
	object-fit: contain;
}

.swa-launcher-icon svg {
	fill: currentColor;
}

.swa-launcher-label {
	font-weight: 650;
	white-space: nowrap;
}

.swa-panel {
	position: absolute;
	bottom: 64px;
	display: flex;
	flex-direction: column;
	width: min(400px, calc(100vw - 24px));
	height: min(620px, calc(100vh - 110px));
	min-height: 390px;
	overflow: hidden;
	border: 1px solid rgba(20, 30, 48, .08);
	border-radius: 24px;
	background: var(--swa-surface);
	box-shadow: 0 28px 80px rgba(16, 24, 40, .18), 0 5px 18px rgba(16, 24, 40, .07);
	transform-origin: bottom right;
	animation: swa-panel-in .2s ease-out both;
}

.swa-position-right .swa-panel {
	right: 0;
}

.swa-position-left .swa-panel {
	left: 0;
	transform-origin: bottom left;
}

.swa-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 62px;
	padding: 11px 14px 11px 18px;
	border-bottom: 1px solid var(--swa-border);
	background: linear-gradient(180deg, #fff 0%, #fcfcfd 100%);
}

.swa-header-title-wrap {
	display: flex;
	align-items: center;
	gap: 9px;
	min-width: 0;
}

.swa-header-title {
	overflow: hidden;
	font-size: 15px;
	font-weight: 700;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.swa-status-dot {
	width: 9px;
	height: 9px;
	flex: 0 0 9px;
	border-radius: 50%;
	background: #22a06b;
	box-shadow: 0 0 0 3px rgba(34, 160, 107, .12);
}

.swa-icon-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #596273;
	cursor: pointer;
	appearance: none;
}

.swa-icon-button:hover {
	background: var(--swa-soft);
}

.swa-close-symbol,
.swa-send-symbol {
	display: block;
	font-family: Arial, sans-serif;
	font-weight: 400;
	line-height: 1;
}

.swa-close-symbol {
	font-size: 25px;
	transform: translateY(-1px);
	transition: transform .16s ease;
	}

.swa-close:hover .swa-close-symbol {
	transform: translateY(-1px) rotate(8deg);
}

.swa-messages {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 12px;
	min-height: 0;
	padding: 18px 15px;
	overflow-x: hidden;
	overflow-y: auto;
	background: var(--swa-soft);
	overscroll-behavior: contain;
	scrollbar-width: thin;
}

.swa-message-row {
	display: flex;
	flex-direction: column;
	max-width: 88%;
}

.swa-message-assistant {
	align-self: flex-start;
	align-items: flex-start;
}

.swa-message-user {
	align-self: flex-end;
	align-items: flex-end;
}

.swa-bubble {
	padding: 10px 13px;
	border: 1px solid var(--swa-border);
	border-radius: 17px 17px 17px 5px;
	background: var(--swa-surface);
	box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
	color: var(--swa-text);
	white-space: pre-wrap;
	word-break: break-word;
}

[dir="rtl"] .swa-message-assistant .swa-bubble {
	border-radius: 17px 17px 5px 17px;
}

.swa-message-user .swa-bubble {
	border-color: transparent;
	border-radius: 17px 17px 5px 17px;
	background: var(--swa-accent);
	color: #fff;
}

[dir="rtl"] .swa-message-user .swa-bubble {
	border-radius: 17px 17px 17px 5px;
}

.swa-products {
	display: grid;
	gap: 7px;
	width: min(320px, 82vw);
	margin-top: 7px;
}

.swa-product-card {
	display: flex;
	align-items: center;
	gap: 9px;
	min-height: 60px;
	padding: 6px 8px;
	border: 1px solid var(--swa-border);
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
	color: var(--swa-text);
	text-decoration: none;
	transition: border-color .16s ease, transform .16s ease;
}

.swa-product-card:hover {
	border-color: color-mix(in srgb, var(--swa-accent) 45%, #d9dee7);
	color: var(--swa-text);
	transform: translateY(-1px);
}

.swa-product-image {
	width: 48px;
	height: 48px;
	flex: 0 0 48px;
	border-radius: 9px;
	background: #f8f8f8;
	object-fit: contain;
}

.swa-product-details {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-width: 0;
}

.swa-product-name {
	display: -webkit-box;
	overflow: hidden;
	font-size: 12.5px;
	font-weight: 650;
	line-height: 1.45;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.swa-product-price {
	margin-top: 2px;
	color: var(--swa-accent);
	font-size: 12px;
	font-weight: 700;
}

.swa-product-arrow {
	flex: 0 0 auto;
	color: #8a93a3;
	font-size: 22px;
	line-height: 1;
}

.swa-results-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: min(320px, 82vw);
	min-height: 39px;
	margin-top: 8px;
	padding: 7px 12px;
	border: 1px solid var(--swa-accent);
	border-radius: 11px;
	background: var(--swa-accent);
	color: #fff;
	font-size: 12.5px;
	font-weight: 700;
	line-height: 1.4;
	text-align: center;
	text-decoration: none;
	transition: filter .16s ease, transform .16s ease;
}

.swa-results-link:hover,
.swa-results-link:focus-visible {
	color: #fff;
	filter: brightness(.94);
	transform: translateY(-1px);
}

.swa-quick-replies {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	margin-top: 8px;
}

.swa-quick-reply {
	appearance: none;
	background: #fff;
	border: 1px solid var(--swa-accent);
	border-radius: 999px;
	color: var(--swa-accent);
	cursor: pointer;
	font: inherit;
	font-size: 12px;
	line-height: 1.4;
	padding: 6px 10px;
}

.swa-quick-reply:hover,
.swa-quick-reply:focus-visible {
	background: color-mix(in srgb, var(--swa-accent) 8%, #fff);
	outline: none;
}

[dir="ltr"] .swa-product-arrow {
	transform: rotate(180deg);
}

.swa-context-area {
	flex: 0 0 auto;
	min-height: 0;
	max-height: 48%;
	padding: 0 12px 10px;
	overflow-y: auto;
	background: var(--swa-soft);
}

.swa-context-area:empty {
	display: none;
}

.swa-context-card {
	padding: 11px;
	border: 1px solid var(--swa-border);
	border-radius: 13px;
	background: #fff;
}

.swa-context-title {
	margin: 0 0 5px;
	color: var(--swa-text);
	font-size: 13px;
	font-weight: 750;
	line-height: 1.5;
}

.swa-context-text {
	margin: 0 0 9px;
	color: #454e5e;
	font-size: 12.5px;
}

.swa-context-text:empty {
	display: none;
}

.swa-contact-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	margin-bottom: 10px;
}

.swa-contact-button {
	display: inline-flex;
	align-items: center;
	min-height: 34px;
	padding: 5px 10px;
	border: 1px solid var(--swa-border);
	border-radius: 9px;
	background: var(--swa-soft);
	color: var(--swa-text);
	font-size: 12px;
	font-weight: 600;
	text-decoration: none;
}

.swa-contact-button:hover {
	border-color: var(--swa-accent);
	color: var(--swa-accent);
}

.swa-lead-form {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 7px;
}

.swa-lead-form input {
	width: 100%;
	height: 38px;
	min-width: 0;
	margin: 0;
	padding: 7px 9px;
	border: 1px solid var(--swa-border);
	border-radius: 9px;
	background: #fff;
	box-shadow: none;
	color: var(--swa-text);
	font-size: 12.5px;
	appearance: none;
}

.swa-lead-form button {
	grid-column: 1 / -1;
	min-height: 38px;
	margin: 0;
	padding: 7px 12px;
	border: 0;
	border-radius: 9px;
	background: var(--swa-accent);
	color: #fff;
	font-size: 12.5px;
	font-weight: 650;
	cursor: pointer;
	appearance: none;
}

.swa-lead-form button:disabled {
	opacity: .6;
	cursor: wait;
}

.swa-lead-result,
.swa-lead-success {
	grid-column: 1 / -1;
	color: #16825d;
	font-size: 12px;
}

.swa-lead-result.is-error {
	color: #c43232;
}

.swa-footer {
	flex: 0 0 auto;
	padding: 12px;
	border-top: 1px solid var(--swa-border);
	background: #fff;
}

.swa-chat-form {
	display: flex;
	align-items: flex-end;
	gap: 7px;
	padding: 6px 6px 6px 10px;
	border: 1px solid transparent;
	border-radius: 18px;
	background: #f2f4f7;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.swa-chat-form:focus-within {
	border-color: color-mix(in srgb, var(--swa-accent) 55%, #d9dee7);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--swa-accent) 10%, transparent);
}

.swa-chat-form textarea {
	flex: 1 1 auto;
	width: 100%;
	height: 36px;
	max-height: 96px;
	margin: 0;
	padding: 7px 4px;
	resize: none;
	border: 0;
	outline: 0;
	background: transparent;
	box-shadow: none;
	color: var(--swa-text);
	line-height: 1.45;
	overflow-y: auto;
}

.swa-chat-form textarea::placeholder {
	color: #9aa1ad;
}

.swa-send {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	flex: 0 0 36px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--swa-accent);
	color: #fff;
	cursor: pointer;
	appearance: none;
}

.swa-send:disabled {
	opacity: .55;
	cursor: wait;
}

.swa-send-symbol {
	font-size: 21px;
	font-weight: 700;
	transform: translateY(-1px);
}

.swa-typing {
	display: flex;
	align-items: center;
	gap: 4px;
	min-width: 48px;
	min-height: 36px;
}

.swa-typing span {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #8d96a5;
	animation: swa-dot 1.1s infinite ease-in-out;
}

.swa-typing span:nth-child(2) {
	animation-delay: .12s;
}

.swa-typing span:nth-child(3) {
	animation-delay: .24s;
}

.swa-root .screen-reader-text {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

@keyframes swa-panel-in {
	from { opacity: 0; transform: translateY(10px) scale(.98); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes swa-dot {
	0%, 60%, 100% { transform: translateY(0); opacity: .55; }
	30% { transform: translateY(-3px); opacity: 1; }
}

@media (max-width: 600px) {
	.swa-root {
		--swa-side: max(12px, env(safe-area-inset-right));
		bottom: var(--swa-mobile-bottom);
		bottom: max(var(--swa-mobile-bottom), env(safe-area-inset-bottom, 0px));
	}

	.swa-root.swa-hide-mobile-label .swa-launcher {
		width: 52px;
		padding: 0;
	}

	.swa-root.swa-hide-mobile-label .swa-launcher-label {
		display: none;
	}

	.swa-panel,
	.swa-position-left .swa-panel,
	.swa-position-right .swa-panel {
		position: fixed;
		right: 8px;
		bottom: var(--swa-mobile-bottom);
		bottom: max(var(--swa-mobile-bottom), env(safe-area-inset-bottom, 0px));
		left: 8px;
		width: auto;
		height: min(78vh, 640px);
		height: min(78dvh, 640px);
		min-height: 390px;
		border-radius: 18px;
		transform-origin: bottom center;
	}

	.swa-launcher {
		min-height: 50px;
		padding-inline: 15px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.swa-panel,
	.swa-launcher,
	.swa-product-card,
	.swa-results-link,
	.swa-typing span {
		animation: none;
		transition: none;
	}
}
.swa-honeypot,
.swa-honeypot-input {
	position: absolute !important;
	left: -10000px !important;
	top: auto !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

/* Keep aggressive shop themes from restyling native buttons and textareas. */
#swa-root .swa-launcher {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	min-height: 50px !important;
	margin: 0 !important;
	padding: 0 18px !important;
	border: 0 !important;
	border-radius: 999px !important;
	background: var(--swa-accent) !important;
	box-shadow: 0 10px 30px rgba(17, 24, 39, .2), 0 2px 7px rgba(17, 24, 39, .12) !important;
	color: #fff !important;
	font: inherit !important;
	text-transform: none !important;
}

#swa-root .swa-icon-button,
#swa-root .swa-send {
	display: inline-grid !important;
	place-items: center !important;
	width: 36px !important;
	min-width: 36px !important;
	height: 36px !important;
	min-height: 36px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	box-shadow: none !important;
	font: inherit !important;
	line-height: 1 !important;
	text-transform: none !important;
	appearance: none !important;
}

#swa-root .swa-icon-button {
	background: transparent !important;
	color: #596273 !important;
}

#swa-root .swa-icon-button:hover {
	background: var(--swa-soft) !important;
}

#swa-root .swa-send {
	flex: 0 0 36px !important;
	background: var(--swa-accent) !important;
	color: #fff !important;
}

#swa-root .swa-close-symbol,
#swa-root .swa-send-symbol {
	display: block !important;
	width: auto !important;
	height: auto !important;
	min-width: 0 !important;
	visibility: visible !important;
	opacity: 1 !important;
	color: inherit !important;
}

#swa-root .swa-chat-form {
	display: flex !important;
	align-items: flex-end !important;
	gap: 7px !important;
	margin: 0 !important;
	padding: 6px 6px 6px 10px !important;
	border: 1px solid transparent !important;
	border-radius: 18px !important;
	background: #f2f4f7 !important;
	box-shadow: none !important;
}

#swa-root .swa-chat-form:focus-within {
	border-color: color-mix(in srgb, var(--swa-accent) 42%, #d9dee7) !important;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--swa-accent) 9%, transparent) !important;
}

#swa-root #swa-message-input {
	display: block !important;
	flex: 1 1 auto !important;
	width: 100% !important;
	min-width: 0 !important;
	height: 36px !important;
	min-height: 36px !important;
	max-height: 96px !important;
	margin: 0 !important;
	padding: 7px 5px !important;
	border: 0 !important;
	border-radius: 0 !important;
	outline: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	color: var(--swa-text) !important;
	font: inherit !important;
	line-height: 1.45 !important;
	resize: none !important;
	appearance: none !important;
}

#swa-root .swa-quick-reply,
#swa-root .swa-lead-form button {
	margin: 0 !important;
	box-shadow: none !important;
	font: inherit !important;
	text-transform: none !important;
}

#swa-root .swa-quick-reply {
	min-height: 32px !important;
	padding: 6px 11px !important;
	border: 1px solid color-mix(in srgb, var(--swa-accent) 42%, #d9dee7) !important;
	border-radius: 999px !important;
	background: #fff !important;
	color: var(--swa-accent) !important;
}

#swa-root .swa-lead-form input {
	height: 38px !important;
	min-height: 38px !important;
	margin: 0 !important;
	padding: 7px 9px !important;
	border: 1px solid var(--swa-border) !important;
	border-radius: 10px !important;
	background: #fff !important;
	box-shadow: none !important;
}

@media (max-width: 600px) {
	#swa-root.swa-hide-mobile-label .swa-launcher {
		width: 52px !important;
		min-width: 52px !important;
		padding: 0 !important;
	}

	#swa-root:not(.swa-hide-mobile-label) .swa-launcher {
		padding-inline: 15px !important;
	}
}
