#ezchat-root, #ezchat-root * {
	box-sizing: border-box;
	font-family: "Open Sans", Arial, Helvetica, sans-serif;
	letter-spacing: normal;
}

/* Themes style every button/input on the page; inside the widget those rules make
   labels shout in capitals and add stray shadows. Neutralise them here once. */
#ezchat-root button,
#ezchat-root input,
#ezchat-root textarea,
#ezchat-root a {
	text-transform: none !important;
	letter-spacing: normal !important;
	min-width: 0 !important;
	box-shadow: none;
}
#ezchat-root textarea { resize: none !important; }

#ezchat-root {
	position: fixed;
	bottom: var(--ez-offset-desktop, 20px);
	z-index: 2147483000;
	--ez-color: #4B7BEC;
	--ez-from: #6B2FD9;
	--ez-to: #E91E8C;
	--ez-offset-desktop: 20px;
	--ez-offset-mobile: 16px;
	--ez-side-offset-desktop: 20px;
	--ez-side-offset-mobile: 12px;
}
#ezchat-root.ez-pos-right { right: var(--ez-side-offset-desktop, 20px); }
#ezchat-root.ez-pos-left  { left: var(--ez-side-offset-desktop, 20px); }

/* Bubble button — !important guards below defeat theme button resets
   (e.g. WoodMart's `:is(.btn,.button,button,...) { border-radius:0 }` which
   ties in CSS specificity with our class selector and wins on source order). */
.ez-bubble {
	width: 64px !important;
	height: 64px !important;
	border-radius: 50% !important;
	background: linear-gradient(135deg, var(--ez-from), var(--ez-color) 55%, var(--ez-to)) !important;
	box-shadow: 0 10px 28px rgba(107,47,217,.35), 0 0 0 4px rgba(255,255,255,.6) !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	cursor: pointer !important;
	border: none !important;
	padding: 0 !important;
	position: relative;
	transition: transform .18s ease;
	overflow: visible;
}
.ez-bubble:hover { transform: scale(1.06); }
.ez-bubble svg { width: 27px; height: 27px; fill: #fff; }
.ez-bubble::before {
	content: '';
	position: absolute;
	inset: -8px;
	border-radius: 50%;
	border: 2px solid rgba(255,255,255,.55);
	animation: ez-bubble-ring 2.6s ease-out infinite;
	pointer-events: none;
}
@keyframes ez-bubble-ring {
	0%   { transform: scale(.82); opacity: .7; }
	75%  { opacity: 0; }
	100% { transform: scale(1.32); opacity: 0; }
}
.ez-bubble-online {
	position: absolute;
	bottom: 1px;
	right: 1px;
	width: 15px;
	height: 15px;
	border-radius: 50% !important;
	background: #4ade80;
	border: 2.5px solid #fff;
	box-shadow: 0 0 0 0 rgba(74,222,128,.6);
	animation: ez-live-pulse 1.8s infinite;
}
.ez-bubble .ez-badge {
	position: absolute;
	top: -4px;
	right: -4px;
	background: #ff3b30;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	min-width: 18px;
	height: 18px;
	border-radius: 9px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 4px;
	border: 2px solid #fff;
}
.ez-teaser {
	position: absolute;
	bottom: 6px;
	right: 72px;
	background: #fff;
	color: #222;
	padding: 10px 30px 10px 14px;
	border-radius: 14px;
	box-shadow: 0 6px 20px rgba(0,0,0,.14);
	font-size: 13px;
	line-height: 1.35;
	max-width: 200px;
	max-height: 84px;
	overflow: hidden;
	cursor: pointer;
	animation: ez-pop .25s ease;
}
.ez-teaser-text { display: block; }
.ez-teaser-close {
	position: absolute !important;
	top: 3px;
	right: 4px;
	width: 20px !important;
	height: 20px !important;
	padding: 0 !important;
	border: none !important;
	background: none !important;
	color: #9c93b5;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
}
.ez-teaser-close:hover { color: #444; }
#ezchat-root.ez-pos-left .ez-teaser { right: auto; left: 72px; }

/* An unanswered reply waiting while the visitor browses on. */
.ez-teaser-reply {
	border-left: 3px solid var(--ez-color);
	font-weight: 500;
	animation: ez-teaser-in .35s ease;
}
@keyframes ez-teaser-in {
	from { opacity: 0; transform: translateX(12px); }
	to   { opacity: 1; transform: translateX(0); }
}

.ez-bubble.ez-attention { animation: ez-attention 1.1s ease-in-out 4; }
@keyframes ez-attention {
	0%, 55%, 100% { transform: translateY(0) scale(1); }
	15%           { transform: translateY(-8px) scale(1.08); }
	30%           { transform: translateY(0) scale(1); }
	42%           { transform: translateY(-4px) scale(1.04); }
}
.ez-bubble.ez-attention::before {
	border-color: var(--ez-color);
	animation-duration: 1.1s;
}

@media (prefers-reduced-motion: reduce) {
	.ez-bubble.ez-attention { animation: none; }
	.ez-teaser-reply { animation: none; }
}

/* Panel */
.ez-panel {
	position: absolute;
	bottom: 76px;
	right: 0;
	width: 360px;
	max-width: calc(100vw - 32px);
	height: 520px;
	max-height: calc(100vh - 140px);
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 20px 60px rgba(0,0,0,.25);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	animation: ez-pop .2s ease;
}
#ezchat-root.ez-pos-left .ez-panel { right: auto; left: 0; }

.ez-header {
	background: linear-gradient(120deg, var(--ez-from), var(--ez-color) 60%, var(--ez-to));
	color: #fff;
	padding: 16px 18px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.ez-header-left { display: flex; align-items: center; gap: 10px; }
.ez-header-avatar-wrap { flex-shrink: 0; }
.ez-header-avatar { width: 38px; height: 38px; border-radius: 50% !important; object-fit: cover; flex-shrink: 0; border: 2px solid rgba(255,255,255,.5); display: block; }
.ez-header-title-row { display: flex; align-items: center; gap: 8px; }
.ez-header-title { font-weight: 700; font-size: 15.5px; }
.ez-header-sub { font-size: 12px; opacity: .85; margin-top: 2px; }
.ez-live-badge { display: inline-flex; align-items: center; gap: 4px; background: rgba(255,255,255,.2); padding: 2px 8px; border-radius: 10px; font-size: 10.5px; font-weight: 600; }
.ez-live-dot { width: 6px; height: 6px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 0 rgba(74,222,128,.6); animation: ez-live-pulse 1.8s infinite; }
@keyframes ez-live-pulse {
	0% { box-shadow: 0 0 0 0 rgba(74,222,128,.6); }
	70% { box-shadow: 0 0 0 5px rgba(74,222,128,0); }
	100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); }
}

.ez-bubble-avatar { width: 100%; height: 100%; border-radius: 50% !important; object-fit: cover; }
.ez-bubble-default-avatar { width: 100%; height: 100%; border-radius: 50%; display: block; }

.ez-products { align-self: flex-start; max-width: 90%; }
.ez-products-title { font-size: 11px; color: #9c93b5; font-weight: 600; margin-bottom: 6px; }
.ez-products-list { display: flex; flex-direction: column; gap: 6px; }
.ez-product-card {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	background: #fff !important;
	border: 1px solid #ecebf3 !important;
	border-radius: 12px !important;
	padding: 8px !important;
	text-decoration: none;
	color: inherit;
	cursor: pointer;
	text-align: left;
	height: auto !important;
	transition: border-color .15s ease, transform .15s ease;
}
.ez-product-card:hover { border-color: var(--ez-color) !important; transform: translateY(-1px); }
.ez-product-img { width: 58px !important; height: 58px !important; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: #f3f3f7; display: block; }
.ez-product-info { min-width: 0; flex: 1; }
.ez-product-name { font-size: 12.5px; color: #222; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ez-product-price { font-size: 12.5px; color: var(--ez-color); font-weight: 700; margin-top: 2px; }
.ez-product-stock { font-size: 11px; margin-top: 2px; }
.ez-product-stock.is-in { color: #1a7f37; }
.ez-product-stock.is-out { color: #b0483c; }

/* In-panel product preview */
.ez-quickview {
	position: absolute;
	inset: 0;
	background: rgba(24, 20, 40, .55);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 14px;
	z-index: 5;
	animation: ez-pop .18s ease;
}
.ez-qv-box {
	position: relative;
	background: #fff;
	border-radius: 14px;
	padding: 14px;
	width: 100%;
	max-height: 100%;
	overflow-y: auto;
	text-align: center;
}
.ez-qv-close {
	position: absolute !important;
	top: 6px;
	right: 6px;
	width: 28px !important;
	height: 28px !important;
	border-radius: 50% !important;
	border: none !important;
	background: rgba(0,0,0,.06) !important;
	color: #444;
	font-size: 17px;
	line-height: 1;
	cursor: pointer;
	padding: 0 !important;
}
.ez-qv-img { width: 100%; max-width: 210px; max-height: 190px; object-fit: contain; border-radius: 10px; margin: 4px auto 10px; display: block; background: #f6f7fb; }
.ez-qv-name { font-size: 14px; font-weight: 600; color: #222; line-height: 1.35; }
.ez-qv-price { font-size: 16px; font-weight: 700; color: var(--ez-color); margin-top: 6px; }
.ez-qv-stock { font-size: 12px; margin-top: 4px; }
.ez-qv-stock.is-in { color: #1a7f37; }
.ez-qv-stock.is-out { color: #b0483c; }
.ez-qv-desc { font-size: 12.5px; color: #6c6880; margin-top: 8px; line-height: 1.4; text-align: left; }
.ez-qv-open {
	display: block;
	margin-top: 12px;
	background: linear-gradient(120deg, var(--ez-from), var(--ez-color) 60%, var(--ez-to));
	color: #fff !important;
	border-radius: 10px;
	padding: 11px 14px;
	font-size: 13.5px;
	font-weight: 600;
	text-decoration: none !important;
}
.ez-close {
	background: rgba(255,255,255,.18) !important;
	border: none !important;
	color: #fff;
	width: 28px !important;
	height: 28px !important;
	border-radius: 50% !important;
	cursor: pointer;
	font-size: 16px;
	line-height: 1;
}

.ez-body {
	flex: 1;
	overflow-y: auto;
	padding: 14px;
	background: #f6f7fb;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ez-msg { max-width: 82%; padding: 9px 12px; border-radius: 14px; font-size: 13.5px; line-height: 1.4; word-wrap: break-word; }
.ez-msg-customer { align-self: flex-end; background: var(--ez-color); color: #fff; border-bottom-right-radius: 4px; }
.ez-msg-admin, .ez-msg-ai { align-self: flex-start; background: #fff; color: #222; border: 1px solid #ecebf3; border-bottom-left-radius: 4px; }
.ez-msg-ai { border-color: #e3d6fa; }
/* Line breaks used to come from innerText inserting <br>; the text is now built as
   safe DOM nodes, so the whitespace has to be preserved here instead. */
.ez-msg-text { white-space: pre-wrap; }
.ez-msg-link { color: inherit; text-decoration: underline; word-break: break-word; }
.ez-msg-customer .ez-msg-link { color: #fff; }
.ez-msg-admin .ez-msg-link, .ez-msg-ai .ez-msg-link { color: var(--ez-color); }

.ez-msg-label { font-size: 10.5px; color: #9c93b5; margin-bottom: 3px; font-weight: 600; }
.ez-msg-time { font-size: 10px; opacity: .55; margin-top: 4px; display: flex; align-items: center; gap: 3px; }
.ez-msg-tick { font-size: 11px; letter-spacing: -3px; padding-right: 3px; opacity: .7; }
.ez-msg-tick.is-read { color: #6fe0ff; opacity: 1; }

.ez-typing { padding: 12px 14px; }
.ez-typing-dots { display: inline-flex; gap: 3px; }
.ez-typing-dots span { width: 6px; height: 6px; border-radius: 50%; background: #b9b4cc; animation: ez-typing-bounce 1.2s infinite ease-in-out; }
.ez-typing-dots span:nth-child(2) { animation-delay: .15s; }
.ez-typing-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes ez-typing-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

.ez-closed-banner {
	text-align: center;
	font-size: 12px;
	color: #8b6b1f;
	background: #fff6df;
	border-top: 1px solid #f2e3b3;
	padding: 8px 14px;
}

.ez-prechat { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.ez-prechat input, .ez-prechat textarea {
	border: 1px solid #e3e2ec;
	border-radius: 10px !important;
	padding: 10px 12px !important;
	font-size: 13.5px !important;
	line-height: 1.35 !important;
	width: 100%;
	resize: none !important;
	outline: none;
	margin: 0 !important;
	min-height: 0 !important;
}
.ez-prechat input { height: 42px !important; }
.ez-prechat textarea { height: 76px !important; max-height: 76px !important; }
.ez-prechat input:focus, .ez-prechat textarea:focus { border-color: var(--ez-color); }
.ez-field-hint { font-size: 11.5px; color: #8b8a99; margin-top: -6px; line-height: 1.35; }

.ez-footer { padding: 10px; border-top: 1px solid #eee; display: flex; gap: 8px; background: #fff; align-items: flex-end; }

/* Themes commonly force a tall min-height on every textarea (WoodMart does), which
   turned the chat input into a box the size of the panel itself, complete with a
   drag handle. These have to be !important to survive that. */
.ez-footer textarea {
	flex: 1;
	border: 1px solid #e3e2ec;
	border-radius: 20px !important;
	padding: 11px 14px !important;
	font-size: 13.5px !important;
	line-height: 1.3 !important;
	resize: none !important;
	min-height: 42px !important;
	height: 42px !important;
	max-height: 96px !important;
	overflow-y: auto;
	outline: none;
	box-shadow: none !important;
	margin: 0 !important;
	display: block;
}
.ez-footer textarea:focus { border-color: var(--ez-color); }
.ez-attach {
	background: none !important;
	border: none !important;
	color: #9c93b5;
	width: 36px !important;
	height: 40px !important;
	font-size: 18px;
	cursor: pointer;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}
.ez-attach:hover { color: var(--ez-color); }
.ez-attach:disabled { opacity: .5; cursor: default; }

.ez-attachment-link { display: block; margin-top: 4px; }
.ez-attachment-img { max-width: 100%; max-height: 160px; border-radius: 10px; display: block; }
.ez-attachment-file {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 4px;
	padding: 6px 10px;
	border-radius: 8px;
	background: rgba(0,0,0,.06);
	color: inherit;
	text-decoration: none;
	font-size: 12.5px;
}
.ez-msg-customer .ez-attachment-file { background: rgba(255,255,255,.2); color: #fff; }

.ez-send {
	background: var(--ez-color) !important;
	border: none !important;
	color: #fff;
	width: 40px !important;
	height: 40px !important;
	border-radius: 50% !important;
	cursor: pointer;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}
.ez-send svg {
	width: 18px !important;
	height: 18px !important;
	fill: #fff !important;
	stroke: none !important;
	display: block !important;
	opacity: 1 !important;
	visibility: visible !important;
	margin: 0 !important;
}
.ez-send:disabled { opacity: .5; cursor: default; }
.ez-send-fallback { font-size: 17px !important; color: #fff !important; line-height: 1 !important; }

.ez-btn-primary {
	background: linear-gradient(120deg, var(--ez-from), var(--ez-color) 60%, var(--ez-to)) !important;
	color: #fff;
	border: none !important;
	border-radius: 10px !important;
	padding: 11px !important;
	font-size: 13.5px;
	font-weight: 600;
	cursor: pointer;
}
.ez-btn-primary:disabled { opacity: .6; cursor: default; }

.ez-channels { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 14px; background: #fff; }
.ez-channel-btn {
	flex: 1 1 30%;
	min-width: 84px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 9px;
	border-radius: 10px;
	font-size: 12.5px;
	font-weight: 600;
	text-decoration: none;
	color: #fff;
	white-space: nowrap;
}
.ez-channel-whatsapp { background: #25D366; }
.ez-channel-telegram { background: #229ED9; }
.ez-channel-viber { background: #7360F2; }
.ez-channel-messenger { background: linear-gradient(45deg, #00B2FF, #006AFF); }
.ez-channel-instagram { background: linear-gradient(45deg, #F58529, #DD2A7B, #8134AF, #515BD4); }
.ez-channel-phone { background: #4B7BEC; }
.ez-channel-btn svg { width: 15px; height: 15px; fill: #fff; }

.ez-notice {
	align-self: center;
	text-align: center;
	font-size: 12px;
	color: #7a7490;
	background: #eeecf6;
	border-radius: 10px;
	padding: 7px 12px;
	max-width: 90%;
	line-height: 1.35;
}

/* The product the visitor is looking at, offered with their first message. */
.ez-attach-chip {
	position: relative;
	display: flex;
	align-items: center;
	gap: 9px;
	margin: 0 10px 6px;
	padding: 7px 26px 7px 8px;
	background: #f6f7fb;
	border: 1px solid #e6e4f0;
	border-left: 3px solid var(--ez-color);
	border-radius: 10px;
}
.ez-attach-img { width: 38px !important; height: 38px !important; border-radius: 6px; object-fit: cover; flex-shrink: 0; background: #fff; display: block; }
.ez-attach-info { min-width: 0; flex: 1; }
.ez-attach-label { font-size: 10.5px; color: #9c93b5; font-weight: 600; }
.ez-attach-name { font-size: 12px; color: #222; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ez-attach-price { font-size: 12px; color: var(--ez-color); font-weight: 700; margin-top: 1px; }
.ez-attach-remove {
	position: absolute !important;
	top: 3px;
	right: 4px;
	width: 20px !important;
	height: 20px !important;
	padding: 0 !important;
	border: none !important;
	background: none !important;
	color: #9c93b5;
	font-size: 15px;
	line-height: 1;
	cursor: pointer;
}

.ez-qv-buy {
	display: block;
	width: 100%;
	margin-top: 12px;
	background: var(--ez-color) !important;
	color: #fff !important;
	border: none !important;
	border-radius: 10px !important;
	padding: 11px 14px !important;
	font-size: 13.5px;
	font-weight: 600;
	cursor: pointer;
}
.ez-qv-buy:disabled { opacity: .6; cursor: default; }
.ez-qv-added { margin-top: 10px; font-size: 12.5px; color: #1a7f37; font-weight: 600; }
.ez-qv-checkout {
	display: block;
	margin-top: 8px;
	background: #1a7f37;
	color: #fff !important;
	border-radius: 10px;
	padding: 11px 14px;
	font-size: 13.5px;
	font-weight: 600;
	text-decoration: none !important;
}
.ez-qv-open { margin-top: 8px; }
.ez-qv-operator {
	display: block;
	width: 100%;
	margin-top: 8px;
	background: #fff !important;
	color: var(--ez-color) !important;
	border: 1px solid var(--ez-color) !important;
	border-radius: 10px !important;
	padding: 10px 14px !important;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

.ez-order-product { font-size: 12.5px; color: #6c6880; margin-top: 4px; }
.ez-order-form { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; text-align: left; }
.ez-order-form input, .ez-order-form textarea {
	border: 1px solid #e3e2ec;
	border-radius: 10px !important;
	padding: 10px 12px !important;
	font-size: 13.5px !important;
	line-height: 1.35 !important;
	width: 100%;
	outline: none;
	margin: 0 !important;
	min-height: 0 !important;
}
.ez-order-form input { height: 42px !important; }
.ez-order-form textarea { height: 60px !important; }
.ez-order-form input:focus, .ez-order-form textarea:focus { border-color: var(--ez-color); }
.ez-order-submit {
	background: linear-gradient(120deg, var(--ez-from), var(--ez-color) 60%, var(--ez-to)) !important;
	color: #fff !important;
	border: none !important;
	border-radius: 10px !important;
	padding: 12px !important;
	font-size: 13.5px;
	font-weight: 600;
	cursor: pointer;
}
.ez-order-submit:disabled { opacity: .6; cursor: default; }
.ez-order-error { font-size: 12.5px; color: #b0483c; }

.ez-operator-bar { padding: 0; background: #fff; text-align: center; line-height: 1; }
.ez-operator-btn {
	background: none !important;
	border: none !important;
	color: var(--ez-color);
	font-size: 12px !important;
	font-weight: 600;
	cursor: pointer;
	padding: 6px 4px !important;
	margin: 0 !important;
	height: auto !important;
	min-height: 0 !important;
	line-height: 1.2 !important;
	text-decoration: underline;
}
.ez-operator-btn:disabled { opacity: .5; cursor: default; }

@keyframes ez-pop { from { opacity: 0; transform: translateY(8px) scale(.98);} to { opacity: 1; transform: translateY(0) scale(1);} }

@media (max-width: 480px) {
	/* Pinned by top AND bottom instead of a 100vh calculation: on phones 100vh
	   ignores the browser's address bar, so the panel grew taller than the screen
	   and its header scrolled out of view above the viewport. Fixed positioning
	   with both edges set can never overflow, and the notch is accounted for. */
	.ez-panel,
	#ezchat-root.ez-pos-left .ez-panel {
		position: fixed;
		top: calc(10px + env(safe-area-inset-top, 0px));
		left: 10px;
		right: 10px;
		bottom: calc(var(--ez-offset-mobile, 16px) + 62px);
		width: auto;
		max-width: none;
		height: auto;
		max-height: none;
	}
	#ezchat-root { bottom: var(--ez-offset-mobile, 16px); }
	#ezchat-root.ez-pos-right { right: var(--ez-side-offset-mobile, 12px); }
	#ezchat-root.ez-pos-left { left: var(--ez-side-offset-mobile, 12px); }
}
