.lk-chat {
	--lk-chat-accent: #ffc300;
	--lk-chat-bubble-bg: #111;
	--lk-chat-bubble-fg: #fff;
	--lk-chat-panel-bg: #f5f5f5;
	--lk-chat-card-bg: #fff;
	--lk-chat-text: #1a1a1a;
	--lk-chat-muted: #6b6b6b;
	--lk-chat-border: #e5e5e5;
	position: fixed;
	right: 100px;
	bottom: 18px;
	z-index: 2147483000;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.45;
	color: var(--lk-chat-text);
}

.lk-chat *,
.lk-chat *::before,
.lk-chat *::after {
	box-sizing: border-box;
}

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

.lk-chat svg {
	display: block;
	overflow: visible;
}

.lk-chat svg path {
	fill: currentColor !important;
}

.lk-chat__success-check svg path {
	fill: #fff !important;
}

.lk-chat svg .lk-chat__bubble-shape {
	fill: #fff !important;
}

.lk-chat svg .lk-chat__dot {
	fill: #1a1a1a !important;
	transform-box: fill-box;
	transform-origin: center;
}

.lk-chat .lk-chat__bubble:hover .lk-chat__dot {
	animation: lk-chat-dot-bounce 1.2s infinite ease-in-out;
}

.lk-chat .lk-chat__bubble:hover .lk-chat__dot--2 {
	animation-delay: 0.18s;
}

.lk-chat .lk-chat__bubble:hover .lk-chat__dot--3 {
	animation-delay: 0.36s;
}

@keyframes lk-chat-dot-bounce {
	0%, 65%, 100% { transform: translateY(0); }
	30%          { transform: translateY(-3px); }
}

.lk-chat .lk-chat__bubble {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background-color: var(--lk-chat-bubble-bg);
	color: var(--lk-chat-bubble-fg);
	border: 0;
	cursor: pointer;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	margin: 0;
	font-family: inherit;
	font-size: inherit;
	font-weight: normal;
	line-height: 1;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.lk-chat .lk-chat__bubble:hover,
.lk-chat .lk-chat__bubble:focus {
	transform: translateY(-2px);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
	background-color: var(--lk-chat-bubble-bg);
	color: var(--lk-chat-bubble-fg);
	border-radius: 50%;
}

.lk-chat .lk-chat__bubble:focus-visible {
	outline: 3px solid var(--lk-chat-accent);
	outline-offset: 3px;
}

.lk-chat.is-open .lk-chat__bubble {
	display: none;
}

.lk-chat__panel {
	position: absolute;
	right: 0;
	bottom: 0;
	width: min(380px, calc(100vw - 32px));
	max-height: min(640px, calc(100vh - 40px));
	max-height: min(640px, calc(100dvh - 40px));
	background: var(--lk-chat-panel-bg);
	border-radius: 16px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
	animation: lk-chat-in 0.22s ease;
}

@keyframes lk-chat-in {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.lk-chat__header {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 16px;
	background: var(--lk-chat-panel-bg);
}

.lk-chat__agent {
	font-weight: 600;
	font-size: 15px;
	color: var(--lk-chat-text);
	flex: 1;
}

.lk-chat .lk-chat__icon-btn {
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background-color: transparent;
	color: #333;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	margin: 0;
	font-family: inherit;
	font-size: inherit;
	font-weight: normal;
	line-height: 1;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.lk-chat .lk-chat__icon-btn:hover {
	background-color: rgba(0, 0, 0, 0.06);
	color: #000;
}

.lk-chat .lk-chat__icon-btn:focus-visible {
	outline: 2px solid var(--lk-chat-accent);
	outline-offset: 2px;
}

.lk-chat__body {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 14px;
	-webkit-overflow-scrolling: touch;
}

.lk-chat__message,
.lk-chat__success {
	display: flex;
	gap: 10px;
	align-items: flex-end;
}

.lk-chat__avatar {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #111;
	color: #fff;
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.lk-chat__bubble-message,
.lk-chat__success-text {
	background: #fff;
	border-radius: 14px;
	padding: 12px 14px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
	flex: 1;
}

.lk-chat__welcome-title {
	display: block;
	margin-bottom: 4px;
	font-weight: 600;
}

.lk-chat__welcome-text {
	font-size: 13px;
	line-height: 1.4;
}

.lk-chat__welcome-text p,
.lk-chat__success-text p {
	margin: 0;
}

.lk-chat__welcome-text p + p,
.lk-chat__success-text p + p {
	margin-top: 6px;
}

.lk-chat__card {
	background: var(--lk-chat-card-bg);
	border-radius: 14px;
	padding: 14px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* Amasty Customform layout overrides — collapse the form to fit our card */
.lk-chat__card .amform-form,
.lk-chat__card .amcform-page-wrap,
.lk-chat__card .amform-form-fieldset {
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
}

.lk-chat__card .amcform-page-titles,
.lk-chat__card .amform-page-titles,
.lk-chat__card .amcform-prev,
.lk-chat__card .amcform-next {
	display: none !important;
}

.lk-chat__card .amform-fieldset-wrapper,
.lk-chat__card .field {
	margin: 0 0 8px !important;
}

.lk-chat__card .field > .label,
.lk-chat__card label.label,
.lk-chat__card label {
	display: block;
	font-weight: 500;
	margin-bottom: 3px !important;
	font-size: 13px;
	color: var(--lk-chat-text);
	width: auto !important;
	text-align: left !important;
	padding: 0 !important;
	float: none !important;
}

.lk-chat__card .field > .control {
	width: 100% !important;
	float: none !important;
}

.lk-chat__card input[type="text"],
.lk-chat__card input[type="email"],
.lk-chat__card input[type="tel"],
.lk-chat__card input[type="url"],
.lk-chat__card input[type="number"],
.lk-chat__card textarea,
.lk-chat__card select {
	width: 100% !important;
	padding: 8px 10px !important;
	border: 1px solid var(--lk-chat-border) !important;
	border-radius: 8px !important;
	font-size: 14px !important;
	font-family: inherit !important;
	background: #fafafa !important;
	color: var(--lk-chat-text) !important;
	height: auto !important;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.lk-chat__card input[type="text"]:focus,
.lk-chat__card input[type="email"]:focus,
.lk-chat__card input[type="tel"]:focus,
.lk-chat__card input[type="url"]:focus,
.lk-chat__card input[type="number"]:focus,
.lk-chat__card textarea:focus,
.lk-chat__card select:focus {
	outline: none !important;
	border-color: #999 !important;
	background: #fff !important;
	box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08) !important;
}

.lk-chat__card textarea {
	height: 70px !important;
	min-height: 56px !important;
	resize: vertical !important;
}

.lk-chat__card input[type="file"] {
	width: 100% !important;
	font-size: 13px !important;
	padding: 8px !important;
	background: #fafafa !important;
	border: 1px dashed var(--lk-chat-border) !important;
	border-radius: 8px !important;
}

.lk-chat__card .actions-toolbar,
.lk-chat__card .actions-toolbar > .primary {
	margin: 0 !important;
	padding: 0 !important;
	width: 100% !important;
	float: none !important;
	text-align: left !important;
}

#lk-chat .lk-chat__card button,
#lk-chat .lk-chat__card button[type="submit"],
#lk-chat .lk-chat__card input[type="submit"],
#lk-chat .lk-chat__card .amcform-submit,
#lk-chat .lk-chat__card button.action,
#lk-chat .lk-chat__card button.action.primary,
#lk-chat .lk-chat__card .action.submit.primary,
#lk-chat .lk-chat__card [data-amcform-js="submit-button"] {
	width: 100% !important;
	padding: 12px 16px !important;
	border: 0 !important;
	border-color: transparent !important;
	background: #ffc300 !important;
	background-color: #ffc300 !important;
	background-image: none !important;
	color: #1a1a1a !important;
	text-shadow: none !important;
	box-shadow: none !important;
	font-weight: 700 !important;
	border-radius: 3px !important;
	cursor: pointer !important;
	font-size: 15px !important;
	font-family: inherit !important;
	margin: 4px 0 0 !important;
	line-height: 1.2 !important;
	text-transform: none !important;
	display: block !important;
	float: none !important;
	opacity: 1 !important;
	visibility: visible !important;
	transition: filter 0.15s ease, transform 0.1s ease;
}

#lk-chat .lk-chat__card button:hover,
#lk-chat .lk-chat__card button[type="submit"]:hover,
#lk-chat .lk-chat__card input[type="submit"]:hover,
#lk-chat .lk-chat__card .amcform-submit:hover,
#lk-chat .lk-chat__card button.action:hover,
#lk-chat .lk-chat__card button.action.primary:hover,
#lk-chat .lk-chat__card .action.submit.primary:hover,
#lk-chat .lk-chat__card [data-amcform-js="submit-button"]:hover {
	filter: brightness(0.95);
	background: #ffc300 !important;
	background-color: #ffc300 !important;
	background-image: none !important;
	color: #1a1a1a !important;
	border-radius: 3px !important;
	padding: 12px 16px !important;
}

#lk-chat .lk-chat__card button[type="submit"]:active,
#lk-chat .lk-chat__card input[type="submit"]:active,
#lk-chat .lk-chat__card .amcform-submit:active {
	transform: translateY(1px);
}

#lk-chat .lk-chat__card button[type="submit"].disabled,
#lk-chat .lk-chat__card button[type="submit"]:disabled,
#lk-chat .lk-chat__card input[type="submit"]:disabled {
	opacity: 0.6 !important;
	cursor: wait !important;
}

/* Hide Amasty's own loader — submit button text shows the loading state */
.lk-chat__card .amform-loader,
.lk-chat__card #form_submit_loading {
	display: none !important;
}

/* Validation error messages */
.lk-chat__card .mage-error,
.lk-chat__card .field-error {
	color: #b00020;
	font-size: 12px;
	margin-top: 4px;
	display: block;
}

.lk-chat__card .field._error input,
.lk-chat__card .field._error textarea {
	border-color: #b00020 !important;
}

/* Hide GDPR-block visual chrome — let the checkbox flow inline */
.lk-chat__card .amform-toolbar {
	margin-top: 8px !important;
}

.lk-chat__success-check {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #2ecc71;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

@media (max-width: 767px) {
	.lk-chat {
		right: 80px;
		bottom: 45px;
	}
	.lk-chat .lk-chat__bubble {
		width: 54px;
		height: 54px;
	}
	/* Pin panel to viewport (not to .lk-chat anchor) so it never bleeds offscreen */
	.lk-chat__panel {
		position: fixed;
		left: 16px;
		right: 16px;
		bottom: 16px;
		top: auto;
		width: auto;
		max-width: none;
		max-height: calc(100vh - 32px);
		max-height: calc(100dvh - 32px);
	}
	/* Prevent iOS Safari from zooming in on focused inputs */
	.lk-chat__card input[type="text"],
	.lk-chat__card input[type="email"],
	.lk-chat__card input[type="tel"],
	.lk-chat__card input[type="url"],
	.lk-chat__card input[type="number"],
	.lk-chat__card textarea,
	.lk-chat__card select {
		font-size: 16px !important;
	}
}
