/* ============================================================
   eDecor contact panel — launcher + multi-channel panel
   ------------------------------------------------------------
   Markup: inc/chat-panel.php   Behaviour: js/chat-panel.js
   Own file because LiteSpeed reuses style.css minified filenames.
   ============================================================ */

.edecor-chat {
	--ec-brand: #274C4F;
	--ec-brand-2: #456A6D;
	--ec-tint: #EEF4F5;
	--ec-line: #dde7e9;
	--ec-wa: #25D366;
	--ec-ink: #1c2b2d;
	--ec-muted: #6b7f81;

	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 999998;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 14px;
	font-family: inherit;
}

/* The Blocksy consent banner (z-index 999999) must own the screen until the
   visitor answers it; Blocksy drops .cookie-notification from the DOM on
   accept/decline, so this rule self-reverts. Same guard the Click to Chat
   widget needed — see style.css "COOKIE CONSENT vs WHATSAPP BUTTON". */
body:has(.cookie-notification) .edecor-chat {
	visibility: hidden;
	pointer-events: none;
}

/* ---------- Launcher ---------- */

.edecor-chat__launcher {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 0 20px 0 0;
	border: 0;
	border-radius: 999px;
	background: #fff;
	color: var(--ec-brand);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	box-shadow: 0 6px 20px rgba(39, 76, 79, .18), 0 1px 3px rgba(0, 0, 0, .10);
	transition: transform .18s ease, box-shadow .18s ease;
	-webkit-tap-highlight-color: transparent;
}

.edecor-chat__launcher:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 28px rgba(39, 76, 79, .26), 0 2px 6px rgba(0, 0, 0, .12);
}

.edecor-chat__launcher:focus-visible {
	outline: 3px solid var(--ec-brand);
	outline-offset: 3px;
}

.edecor-chat__launcher-ico {
	position: relative;
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: linear-gradient(140deg, var(--ec-brand-2), var(--ec-brand));
	color: #fff;
}

.edecor-chat__launcher-ico svg {
	display: block;
	width: 24px;
	height: 24px;
}

/* The pulse ring — soft, and it stops once the panel has been opened. */
.edecor-chat__launcher-ico::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	pointer-events: none;
	animation: edecor-chat-pulse 2.8s ease-out infinite;
}

.edecor-chat.is-open .edecor-chat__launcher-ico::after,
.edecor-chat.is-seen .edecor-chat__launcher-ico::after,
.edecor-chat__launcher:hover .edecor-chat__launcher-ico::after {
	animation: none;
}

@keyframes edecor-chat-pulse {
	0% {
		box-shadow: 0 0 0 0 rgba(39, 76, 79, .45);
	}

	70% {
		box-shadow: 0 0 0 16px rgba(39, 76, 79, 0);
	}

	100% {
		box-shadow: 0 0 0 0 rgba(39, 76, 79, 0);
	}
}

/* Icon swap: chat bubble when shut, X when open. */
.edecor-chat__launcher-open,
.edecor-chat__launcher-shut {
	grid-area: 1 / 1;
	display: grid;
	place-items: center;
	transition: opacity .16s ease, transform .16s ease;
}

.edecor-chat__launcher-shut {
	opacity: 0;
	transform: rotate(-90deg) scale(.6);
}

.edecor-chat.is-open .edecor-chat__launcher-open {
	opacity: 0;
	transform: rotate(90deg) scale(.6);
}

.edecor-chat.is-open .edecor-chat__launcher-shut {
	opacity: 1;
	transform: none;
}

.edecor-chat__launcher-label {
	white-space: nowrap;
}

.edecor-chat.is-open .edecor-chat__launcher-label {
	display: none;
}

.edecor-chat.is-open .edecor-chat__launcher {
	padding: 0;
}

.edecor-chat__badge {
	position: absolute;
	top: -2px;
	left: 36px;
	display: grid;
	place-items: center;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	border-radius: 999px;
	background: #e2464a;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
	box-shadow: 0 0 0 2px #fff;
}

.edecor-chat.is-seen .edecor-chat__badge,
.edecor-chat.is-open .edecor-chat__badge {
	display: none;
}

/* ---------- Panel ---------- */

.edecor-chat__panel {
	width: min(360px, calc(100vw - 32px));
	max-height: min(78vh, 620px);
	overflow: hidden auto;
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 24px 60px rgba(18, 40, 42, .26), 0 2px 8px rgba(0, 0, 0, .10);
	transform-origin: bottom right;
	overscroll-behavior: contain;
}

.edecor-chat__panel[hidden] {
	display: none;
}

.edecor-chat.is-open .edecor-chat__panel {
	animation: edecor-chat-in .26s cubic-bezier(.2, .9, .3, 1.2) both;
}

@keyframes edecor-chat-in {
	from {
		opacity: 0;
		transform: translateY(12px) scale(.94);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

/* Head */

.edecor-chat__head {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 18px 46px 18px 18px;
	background: linear-gradient(135deg, var(--ec-brand-2), var(--ec-brand));
	color: #fff;
}

.edecor-chat__emblem {
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: #fff;
	object-fit: contain;
	padding: 3px;
}

.edecor-chat__head-text {
	min-width: 0;
}

.edecor-chat__title {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.25;
	color: #fff;
}

.edecor-chat__status {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 3px 0 0;
	font-size: 12.5px;
	line-height: 1.3;
	color: rgba(255, 255, 255, .88);
}

.edecor-chat__dot {
	flex: 0 0 auto;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #b9c9cb;
}

.edecor-chat__status.is-open .edecor-chat__dot {
	background: #34d47a;
	box-shadow: 0 0 0 3px rgba(52, 212, 122, .28);
}

.edecor-chat__status.is-shut .edecor-chat__dot {
	background: #f0b429;
}

.edecor-chat__close {
	position: absolute;
	top: 10px;
	right: 10px;
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .14);
	color: #fff;
	cursor: pointer;
	transition: background .15s ease;
}

.edecor-chat__close:hover {
	background: rgba(255, 255, 255, .28);
}

.edecor-chat__close:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.edecor-chat__close svg {
	display: block;
	width: 16px;
	height: 16px;
}

/* Body */

.edecor-chat__body {
	padding: 16px 14px 6px;
	background: var(--ec-tint);
}

.edecor-chat__lead {
	margin: 0 0 12px;
	padding: 0 4px;
	font-size: 13px;
	line-height: 1.45;
	color: var(--ec-muted);
}

.edecor-chat__row {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 10px;
	padding: 12px;
	border-radius: 13px;
	background: #fff;
	text-decoration: none;
	box-shadow: 0 1px 2px rgba(18, 40, 42, .07), 0 4px 12px rgba(18, 40, 42, .05);
	transition: transform .16s ease, box-shadow .16s ease;
}

.edecor-chat__row:hover,
.edecor-chat__row:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 3px 6px rgba(18, 40, 42, .10), 0 10px 22px rgba(18, 40, 42, .12);
	text-decoration: none;
}

.edecor-chat__row:focus-visible {
	outline: 2px solid var(--ec-brand);
	outline-offset: 2px;
}

.edecor-chat__ico {
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	color: #fff;
}

.edecor-chat__ico svg {
	display: block;
	width: 21px;
	height: 21px;
}

.edecor-chat__ico--wa {
	background: var(--ec-wa);
}

.edecor-chat__ico--tel {
	background: linear-gradient(140deg, var(--ec-brand-2), var(--ec-brand));
}

.edecor-chat__ico--mail {
	background: #8aa4a6;
}

.edecor-chat__row-text {
	display: block;
	min-width: 0;
	flex: 1 1 auto;
}

.edecor-chat__row-title {
	display: block;
	font-size: 14.5px;
	font-weight: 600;
	line-height: 1.25;
	color: var(--ec-ink);
	overflow-wrap: anywhere;
}

.edecor-chat__row-sub {
	display: block;
	margin-top: 2px;
	font-size: 12px;
	line-height: 1.35;
	color: var(--ec-muted);
}

.edecor-chat__chev {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	color: #b3c4c6;
}

.edecor-chat__chev svg {
	display: block;
	width: 16px;
	height: 16px;
}

/* Foot */

.edecor-chat__foot {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 7px;
	margin: 0;
	padding: 12px 16px 14px;
	background: var(--ec-tint);
	font-size: 11.5px;
	line-height: 1.4;
	color: var(--ec-muted);
	text-align: center;
}

.edecor-chat__foot a {
	color: var(--ec-brand);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* ---------- Phones ---------- */

@media (max-width: 600px) {
	.edecor-chat {
		right: 14px;
		bottom: 14px;
		gap: 12px;
	}

	/* Label would eat the screen; the circle alone is the tap target. */
	.edecor-chat__launcher-label {
		display: none;
	}

	.edecor-chat__launcher {
		padding: 0;
	}

	.edecor-chat__badge {
		left: 34px;
	}

	.edecor-chat__panel {
		width: calc(100vw - 28px);
		max-height: min(74vh, 560px);
	}
}

/* ---------- Motion off ---------- */

@media (prefers-reduced-motion: reduce) {

	.edecor-chat *,
	.edecor-chat *::after {
		animation: none !important;
		transition: none !important;
	}

	.edecor-chat__launcher:hover,
	.edecor-chat__row:hover {
		transform: none;
	}
}

/* ============================================================
   Click to Chat — the inline button that stays on product pages
   ============================================================ */

.ht-ctc .ht-ctc-cta {
	border-radius: 999px !important;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
	font-weight: 500;
}
