/* EW Live-Chat – Frontend-Widget */

#ewlc-root {
	--ewlc-accent: #f0a500;
	--ewlc-accent-dark: #e07b00;
	--ewlc-bg: #fff8e7;
	--ewlc-bottom: 96px;
	--ewlc-side: 22px;
	font-family: Arial, Helvetica, sans-serif;
}

.ewlc-bubble {
	position: fixed;
	bottom: var(--ewlc-bottom);
	z-index: 99998;
	display: flex;
	align-items: center;
	gap: 10px;
	border: 0;
	cursor: pointer;
	background: var(--ewlc-accent);
	color: #fff;
	border-radius: 32px;
	padding: 14px 20px;
	font-size: 16px;
	font-weight: bold;
	font-family: Arial, Helvetica, sans-serif;
	box-shadow: 0 4px 12px rgba(240, 165, 0, 0.35);
	transition: transform .15s ease;
}

.ewlc-bubble:hover {
	transform: translateY(-2px);
}

.ewlc-pos-right .ewlc-bubble,
.ewlc-pos-right .ewlc-panel {
	right: var(--ewlc-side);
}

.ewlc-pos-left .ewlc-bubble,
.ewlc-pos-left .ewlc-panel {
	left: var(--ewlc-side);
}

.ewlc-bubble svg {
	width: 22px;
	height: 22px;
	flex: 0 0 22px;
}

.ewlc-badge {
	position: absolute;
	top: -6px;
	right: -6px;
	background: #d32f2f;
	color: #fff;
	border-radius: 12px;
	min-width: 22px;
	height: 22px;
	line-height: 22px;
	font-size: 12px;
	text-align: center;
	padding: 0 6px;
}

.ewlc-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #9e9e9e;
	display: inline-block;
	flex: 0 0 10px;
}

.ewlc-dot.is-online {
	background: #35c65a;
	box-shadow: 0 0 0 3px rgba(53, 198, 90, .25);
}

.ewlc-panel {
	position: fixed;
	bottom: var(--ewlc-bottom);
	z-index: 99999;
	width: 360px;
	max-width: calc(100vw - 24px);
	height: 540px;
	max-height: calc(100vh - 40px);
	background: #fff;
	border-radius: 16px;
	overflow: hidden;
	display: none;
	flex-direction: column;
	box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
}

.ewlc-panel.is-open {
	display: flex;
}

.ewlc-head {
	background: var(--ewlc-accent-dark);
	color: #fff;
	padding: 16px 18px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.ewlc-head strong {
	display: block;
	font-size: 16px;
}

.ewlc-head span.ewlc-sub {
	font-size: 13px;
	opacity: .9;
	display: flex;
	align-items: center;
	gap: 7px;
	margin-top: 3px;
}

.ewlc-close {
	background: transparent;
	border: 0;
	color: #fff;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	padding: 0 4px;
}

.ewlc-body {
	flex: 1;
	overflow-y: auto;
	background: var(--ewlc-bg);
	padding: 16px;
}

.ewlc-msg {
	margin-bottom: 12px;
	display: flex;
}

.ewlc-msg.is-visitor {
	justify-content: flex-end;
}

.ewlc-msg span.ewlc-txt {
	display: inline-block;
	max-width: 82%;
	padding: 10px 14px;
	border-radius: 14px;
	font-size: 15px;
	line-height: 1.5;
	color: #333;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
	word-wrap: break-word;
	overflow-wrap: anywhere;
}

.ewlc-msg.is-visitor span.ewlc-txt {
	background: var(--ewlc-accent);
	color: #fff;
}

.ewlc-msg.is-system span.ewlc-txt {
	background: transparent;
	box-shadow: none;
	color: #7a6a4f;
	font-size: 13px;
	max-width: 100%;
	text-align: center;
}

.ewlc-msg small {
	display: block;
	font-size: 11px;
	opacity: .7;
	margin-top: 4px;
}

.ewlc-msg a {
	color: inherit;
	text-decoration: underline;
}

.ewlc-typing span.ewlc-txt {
	background: #fff;
	color: #888;
	font-style: italic;
}

.ewlc-foot {
	border-top: 1px solid #eee;
	padding: 12px;
	background: #fff;
}

.ewlc-foot textarea,
.ewlc-foot input[type="text"],
.ewlc-foot input[type="email"] {
	width: 100%;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 10px 12px;
	font-size: 15px;
	font-family: Arial, Helvetica, sans-serif;
	margin-bottom: 8px;
	box-sizing: border-box;
	resize: none;
	background: #fff;
	color: #333;
}

.ewlc-foot textarea:focus,
.ewlc-foot input:focus {
	outline: 2px solid var(--ewlc-accent);
	outline-offset: 1px;
}

.ewlc-send {
	background-color: var(--ewlc-accent);
	color: #ffffff;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 16px;
	font-weight: bold;
	border: 0;
	border-radius: 6px;
	padding: 12px 22px;
	width: 100%;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(240, 165, 0, 0.35);
}

.ewlc-send[disabled] {
	opacity: .6;
	cursor: default;
}

.ewlc-note {
	font-size: 11px;
	color: #888;
	line-height: 1.5;
	margin: 8px 0 0;
}

.ewlc-note a {
	color: var(--ewlc-accent-dark);
}

.ewlc-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.ewlc-error {
	color: #c62828;
	font-size: 13px;
	margin: 0 0 8px;
}

.ewlc-wa {
	display: inline-block;
	margin-top: 6px;
	font-size: 13px;
	color: var(--ewlc-accent-dark);
}

@media (max-width: 480px) {
	.ewlc-panel {
		width: calc(100vw - 16px);
		height: calc(100dvh - 100px);
		bottom: 12px;
	}

	.ewlc-pos-right .ewlc-panel {
		right: 8px;
	}

	.ewlc-pos-left .ewlc-panel {
		left: 8px;
	}

	.ewlc-bubble {
		bottom: var(--ewlc-bottom);
		font-size: 0;
		gap: 0;
		padding: 16px;
		border-radius: 50%;
	}

	.ewlc-bubble svg {
		width: 26px;
		height: 26px;
		flex: 0 0 26px;
	}

	.ewlc-bubble .ewlc-dot {
		display: none;
	}
}
