#enerteq-chatbot-root {
	position: fixed;
	bottom: 20px;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
#enerteq-chatbot-root.ecb-pos-right { right: 20px; }
#enerteq-chatbot-root.ecb-pos-left  { left: 20px; }

/*
 * Baseline reset for every button inside the widget. The site's own theme
 * usually has its own generic `button` styling (uppercase text, its own
 * padding/colors, etc.) that would otherwise bleed into our widget, since a
 * plain element selector like that can end up competing with our classes.
 * This rule is deliberately scoped under the widget's ID so it always beats
 * the theme's styling, and every specific button rule below it is *also*
 * scoped under that same ID (plus its own class), which keeps it one level
 * more specific than this baseline -- so the specific styling always wins
 * over both the theme AND this reset, in the right order.
 */
#enerteq-chatbot-root button {
	box-sizing: border-box;
	margin: 0;
	font-family: inherit;
	text-transform: none;
	letter-spacing: normal;
	font-weight: 400;
	text-shadow: none;
	outline: none;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
}

#enerteq-chatbot-root .ecb-launcher {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 8px;
}
#enerteq-chatbot-root.ecb-pos-left .ecb-launcher { align-items: flex-start; }
#enerteq-chatbot-root.ecb-open .ecb-launcher-label { display: none; }

#enerteq-chatbot-root .ecb-launcher-label {
	display: flex;
	align-items: center;
	gap: 6px;
	background: #fff;
	max-width: 190px;
	padding: 8px 8px 8px 12px;
	border-radius: 16px;
	box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}
#enerteq-chatbot-root .ecb-launcher-label-text {
	color: #222;
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.3;
	text-align: left;
}
#enerteq-chatbot-root .ecb-launcher-close {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #f0f0f0;
	color: #888;
	font-size: 13px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

#enerteq-chatbot-root .ecb-bubble {
	width: 60px;
	height: 60px;
	padding: 0;
	border-radius: 50%;
	background: var(--ecb-color, #c1121f);
	color: #fff;
	border: none;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0,0,0,0.25);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 26px;
	line-height: 1;
	flex-shrink: 0;
	position: relative;
	transition: transform 0.15s ease;
}
#enerteq-chatbot-root .ecb-bubble:hover { transform: scale(1.06); }
#enerteq-chatbot-root .ecb-bubble-avatar {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
	display: block;
	pointer-events: none;
}
#enerteq-chatbot-root .ecb-bubble-badge {
	position: absolute;
	bottom: -2px;
	right: -2px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--ecb-color, #c1121f);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	line-height: 1;
	border: 2px solid #fff;
	box-shadow: 0 2px 6px rgba(0,0,0,0.25);
	pointer-events: none;
}

#enerteq-chatbot-root .ecb-window {
	display: none;
	flex-direction: column;
	width: 380px;
	max-width: calc(100vw - 40px);
	height: 540px;
	max-height: calc(100vh - 120px);
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 10px 40px rgba(0,0,0,0.25);
	overflow: hidden;
	position: absolute;
	bottom: 74px;
	transition: width 0.18s ease, height 0.18s ease;
}
#enerteq-chatbot-root.ecb-pos-right .ecb-window { right: 0; }
#enerteq-chatbot-root.ecb-pos-left  .ecb-window { left: 0; }
#enerteq-chatbot-root.ecb-open .ecb-window { display: flex; }

/* Expanded mode: a visitor can opt into a larger window (e.g. to read
   through several links/answers at once) via the header's expand button.
   Still capped by viewport size so it can never overflow on a small screen. */
#enerteq-chatbot-root.ecb-expanded .ecb-window {
	width: 560px;
	max-width: calc(100vw - 40px);
	height: 720px;
	max-height: calc(100vh - 80px);
}

#enerteq-chatbot-root .ecb-header {
	background: var(--ecb-color, #c1121f);
	color: #fff;
	padding: 14px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}
#enerteq-chatbot-root .ecb-header-identity {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}
#enerteq-chatbot-root .ecb-avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	flex-shrink: 0;
	object-fit: cover;
	background: #fff;
	box-shadow: 0 0 0 2px rgba(255,255,255,0.5);
}
#enerteq-chatbot-root .ecb-header strong { font-size: 15px; display: block; }
#enerteq-chatbot-root .ecb-header span { font-size: 12px; opacity: 0.85; display: block; }
#enerteq-chatbot-root .ecb-header-actions {
	display: flex;
	align-items: center;
	gap: 4px;
	flex-shrink: 0;
}
#enerteq-chatbot-root .ecb-expand {
	background: transparent;
	border: none;
	color: #fff;
	font-size: 15px;
	cursor: pointer;
	line-height: 1;
	padding: 4px;
	opacity: 0.9;
}
#enerteq-chatbot-root .ecb-close {
	background: transparent;
	border: none;
	color: #fff;
	font-size: 20px;
	cursor: pointer;
	line-height: 1;
	padding: 4px;
}

#enerteq-chatbot-root .ecb-messages {
	flex: 1;
	overflow-y: auto;
	overflow-x: hidden;
	padding: 14px;
	background: #f7f7f8;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

#enerteq-chatbot-root .ecb-msg {
	max-width: 85%;
	padding: 9px 12px;
	border-radius: 12px;
	font-size: 13.5px;
	line-height: 1.4;
	white-space: pre-wrap;
	word-wrap: break-word;
}
#enerteq-chatbot-root .ecb-msg.bot { align-self: flex-start; background: #fff; border: 1px solid #e6e6e9; color: #222; border-bottom-left-radius: 3px; }
#enerteq-chatbot-root .ecb-msg.bot a { color: #0000ee; text-decoration: underline; word-break: break-word; }
#enerteq-chatbot-root .ecb-msg.bot a:visited { color: #551a8b; }
#enerteq-chatbot-root .ecb-msg.user { align-self: flex-end; background: var(--ecb-color, #c1121f); color: #fff; border-bottom-right-radius: 3px; }
#enerteq-chatbot-root .ecb-msg.human { align-self: flex-start; background: #fff3f2; border: 1px solid #f3c9c4; color: #222; border-bottom-left-radius: 3px; }
#enerteq-chatbot-root .ecb-msg.human a { color: #0000ee; text-decoration: underline; word-break: break-word; }
#enerteq-chatbot-root .ecb-msg.human a:visited { color: #551a8b; }
#enerteq-chatbot-root .ecb-msg-label {
	display: block;
	font-size: 10.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--ecb-color, #c1121f);
	margin-bottom: 3px;
}
#enerteq-chatbot-root .ecb-msg.system { align-self: center; background: transparent; color: #777; font-size: 12px; text-align: center; }

#enerteq-chatbot-root .ecb-typing { align-self: flex-start; font-size: 12px; color: #888; padding-left: 4px; }

#enerteq-chatbot-root .ecb-escalate-prompt {
	align-self: flex-start;
	background: #fff8e6;
	border: 1px solid #f2d98a;
	border-radius: 10px;
	padding: 10px;
	font-size: 13px;
	max-width: 90%;
}
#enerteq-chatbot-root .ecb-escalate-prompt .ecb-escalate-actions { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
#enerteq-chatbot-root .ecb-escalate-prompt button {
	border: none;
	border-radius: 6px;
	padding: 5px 8px;
	font-size: 11.5px;
	line-height: 1.3;
	cursor: pointer;
	flex: 1 1 auto;
	min-width: 0;
	max-width: 100%;
	white-space: normal;
	word-break: break-word;
}
#enerteq-chatbot-root .ecb-escalate-yes { background: var(--ecb-color, #c1121f); color: #fff; }
#enerteq-chatbot-root .ecb-escalate-no { background: #eee; color: #333; }

#enerteq-chatbot-root .ecb-handoff-form {
	padding: 12px;
	border-top: 1px solid #e6e6e9;
	background: #fff;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
#enerteq-chatbot-root .ecb-handoff-form input {
	box-sizing: border-box;
	padding: 8px 10px;
	border: 1px solid #ddd;
	border-radius: 8px;
	font-size: 13px;
	font-family: inherit;
}
#enerteq-chatbot-root .ecb-hf-consent {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	font-size: 11.5px;
	line-height: 1.4;
	color: #555;
	cursor: pointer;
}
#enerteq-chatbot-root .ecb-hf-consent input {
	margin-top: 2px;
	flex-shrink: 0;
}
#enerteq-chatbot-root .ecb-hf-consent a { color: inherit; }
#enerteq-chatbot-root .ecb-hf-error {
	font-size: 11.5px;
	color: #b3261e;
	background: #fdecea;
	border-radius: 6px;
	padding: 6px 8px;
}
#enerteq-chatbot-root .ecb-handoff-form .ecb-handoff-actions { display: flex; flex-wrap: wrap; gap: 6px; }
#enerteq-chatbot-root .ecb-handoff-form button {
	flex: 1 1 auto;
	min-width: 0;
	max-width: 100%;
	border: none;
	border-radius: 8px;
	padding: 7px 8px;
	font-size: 12px;
	white-space: normal;
	word-break: break-word;
	cursor: pointer;
}
#enerteq-chatbot-root .ecb-handoff-submit { background: var(--ecb-color, #c1121f); color: #fff; }
#enerteq-chatbot-root .ecb-handoff-cancel { background: #eee; color: #333; }

#enerteq-chatbot-root .ecb-input-row {
	display: flex;
	border-top: 1px solid #e6e6e9;
	background: #fff;
	padding: 10px;
	gap: 8px;
}
#enerteq-chatbot-root .ecb-input-row input {
	box-sizing: border-box;
	flex: 1;
	border: 1px solid #ddd;
	border-radius: 20px;
	padding: 9px 14px;
	font-size: 13.5px;
	font-family: inherit;
	outline: none;
}
#enerteq-chatbot-root .ecb-input-row input:focus { border-color: var(--ecb-color, #c1121f); }
#enerteq-chatbot-root .ecb-send {
	background: var(--ecb-color, #c1121f);
	color: #fff;
	border: none;
	border-radius: 50%;
	width: 48px;
	height: 48px;
	cursor: pointer;
	font-size: 19px;
	flex-shrink: 0;
}
#enerteq-chatbot-root .ecb-send:disabled { opacity: 0.5; cursor: default; }

#enerteq-chatbot-root .ecb-mic {
	background: #f0f0f0;
	color: #555;
	border: none;
	border-radius: 50%;
	width: 48px;
	height: 48px;
	cursor: pointer;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s ease, color 0.15s ease;
}
#enerteq-chatbot-root .ecb-mic-icon {
	width: 30px;
	height: 30px;
	fill: currentColor;
}
#enerteq-chatbot-root .ecb-mic.ecb-mic-listening {
	background: #c1121f;
	color: #fff;
	animation: ecb-mic-pulse 1.4s ease-in-out infinite;
}
@keyframes ecb-mic-pulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(193,18,31,0.4); }
	50% { box-shadow: 0 0 0 6px rgba(193,18,31,0); }
}

#enerteq-chatbot-root .ecb-footer-link {
	display: none;
	text-align: center;
	font-size: 11px;
	padding: 6px;
	background: #fff;
	border-top: 1px solid #f0f0f0;
}
#enerteq-chatbot-root .ecb-footer-link.ecb-visible { display: block; }
#enerteq-chatbot-root .ecb-footer-link button {
	background: none;
	border: none;
	color: #666;
	text-decoration: underline;
	cursor: pointer;
	font-size: 11px;
}

#enerteq-chatbot-root .ecb-footer-clear {
	text-align: center;
	padding: 3px 6px 5px;
	background: #fff;
}
#enerteq-chatbot-root .ecb-footer-clear button {
	background: none;
	border: none;
	color: #aaa;
	text-decoration: underline;
	cursor: pointer;
	font-size: 9.5px;
}

#enerteq-chatbot-root .ecb-disclaimer {
	background: #fff;
	border-top: 1px solid #f0f0f0;
	padding: 3px 10px 6px;
	text-align: center;
}
#enerteq-chatbot-root .ecb-disclaimer-toggle {
	background: none;
	border: none;
	color: #aaa;
	text-decoration: underline;
	cursor: pointer;
	font-size: 9.5px;
	padding: 0;
}
#enerteq-chatbot-root .ecb-disclaimer-content {
	margin-top: 6px;
	padding: 8px 10px;
	background: #f7f7f8;
	border: 1px solid #e6e6e9;
	border-radius: 8px;
	font-size: 10.5px;
	line-height: 1.5;
	color: #666;
	text-align: left;
	white-space: pre-wrap;
	max-height: 140px;
	overflow-y: auto;
}

@media (max-width: 420px) {
	#enerteq-chatbot-root .ecb-window { width: calc(100vw - 40px); }
}
