.lk-chat {
	--lk-chat-accent: #f07c00;
	--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: 24px;
	bottom: 24px;
	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);
}

/* CF7 styling inside the widget */
.lk-chat__card .wpcf7 form {
	margin: 0;
}

.lk-chat__card .wpcf7 p {
	margin: 0 0 8px;
}

.lk-chat__card .wpcf7 p:last-of-type {
	margin-bottom: 0;
}

.lk-chat__card label {
	display: block;
	font-weight: 500;
	margin-bottom: 3px;
	font-size: 13px;
	color: var(--lk-chat-text);
}

.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%;
	padding: 8px 10px;
	border: 1px solid var(--lk-chat-border);
	border-radius: 8px;
	font-size: 14px;
	font-family: inherit;
	background: #fafafa;
	color: var(--lk-chat-text);
	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;
	border-color: #999;
	background: #fff;
	box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08);
}

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

.lk-chat__card input[type="file"] {
	width: 100%;
	font-size: 13px;
	padding: 8px;
}

.lk-chat .lk-chat__card input[type="submit"],
.lk-chat .lk-chat__card button[type="submit"] {
	width: 100%;
	padding: 12px 16px;
	border: 0;
	background-color: var(--lk-chat-accent);
	color: #fff;
	font-weight: 600;
	border-radius: 3px;
	cursor: pointer;
	font-size: 15px;
	font-family: inherit;
	margin-top: 4px;
	line-height: 1.2;
	transition: filter 0.15s ease, transform 0.1s ease;
}

.lk-chat .lk-chat__card input[type="submit"]:hover,
.lk-chat .lk-chat__card button[type="submit"]:hover {
	filter: brightness(0.95);
	background-color: var(--lk-chat-accent);
	color: #fff;
	border-radius: 3px;
	padding: 12px 16px;
}

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

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

.lk-chat__card .wpcf7-spinner {
	display: none !important;
}

.lk-chat__card .wpcf7-response-output {
	margin: 12px 0 0 !important;
	border: 0 !important;
	padding: 10px 12px !important;
	border-radius: 8px;
	font-size: 13px;
	background: #f2f2f2;
	color: #333;
}

.lk-chat__card .wpcf7 form.invalid .wpcf7-response-output,
.lk-chat__card .wpcf7 form.unaccepted .wpcf7-response-output,
.lk-chat__card .wpcf7 form.failed .wpcf7-response-output {
	background: #fde7ea;
	color: #8a1321;
}

.lk-chat__card .wpcf7 form.sent .wpcf7-response-output {
	background: #e8f6ee;
	color: #1e6b3b;
}

/* Hide honeypot field — offscreen instead of display:none so it still submits */
.lk-chat__card .wpcf7-form-control-wrap.honungsfalla,
.lk-chat__card [data-name="honungsfalla"],
.lk-chat__card input[name="honungsfalla"],
.lk-chat__card input.wpcf7-honeypot,
.lk-chat__card .wpcf7cf-hidden {
	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;
}

.lk-chat__card .wpcf7-not-valid-tip {
	color: #b00020;
	font-size: 12px;
	margin-top: 4px;
	display: block;
}

.lk-chat__card .wpcf7-list-item {
	margin: 0 12px 0 0;
}

.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;
}

/* Hide Google reCAPTCHA v3 badge — compliance notice is shown inside the widget instead */
body .grecaptcha-badge {
	visibility: hidden !important;
}

.lk-chat__legal {
	font-size: 11px;
	color: var(--lk-chat-muted);
	line-height: 1.4;
	text-align: center;
	padding: 0 4px;
}

.lk-chat__legal a {
	color: var(--lk-chat-muted);
	text-decoration: underline;
}

.lk-chat__legal a:hover {
	color: var(--lk-chat-text);
}

@media (max-width: 480px) {
	.lk-chat {
		right: 16px;
		bottom: 16px;
	}
	.lk-chat .lk-chat__bubble {
		width: 54px;
		height: 54px;
	}
	.lk-chat__panel {
		width: calc(100vw - 32px);
		max-height: calc(100vh - 40px);
		max-height: calc(100dvh - 40px);
	}
	/* Prevent iOS Safari from zooming in on focused inputs (triggers when font-size < 16px) */
	.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;
	}
}
