/* Veltron Live Chat & Smart AI Shopping Concierge (Storefront) */
:where(#wsp-lc-portal) {
	--wsp-lc-accent: #c5a059;
	--wsp-lc-accent-hover: #a9843d;
	--wsp-lc-header-bg: #171615;
	--wsp-lc-header-text: #ffffff;
	--wsp-lc-surface: #ffffff;
	--wsp-lc-text: #1a1816;
	--wsp-lc-user-bg: #1f1d1b;
	--wsp-lc-user-text: #ffffff;
	--wsp-lc-bot-bg: #f6f3ec;
	--wsp-lc-bot-text: #1a1816;
	--wsp-lc-width: 392px;
	--wsp-lc-height: 580px;
	--wsp-lc-radius: 20px;
	--wsp-lc-bottom: 22px;
	--wsp-lc-side: 22px;
	--wsp-lc-bottom-mob: 82px;
}

#wsp-lc-portal.wsp-lc-portal {
	position: fixed;
	inset-block-end: var(--wsp-lc-bottom);
	inset-inline-end: var(--wsp-lc-side);
	z-index: 2147483646;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Vazirmatn", Tahoma, sans-serif;
	color: var(--wsp-lc-text);
	line-height: 1.5;
	box-sizing: border-box;
}

#wsp-lc-portal.wsp-lc-portal.is-pos-top {
	inset-block-end: auto;
	inset-block-start: var(--wsp-lc-bottom);
}

#wsp-lc-portal.wsp-lc-portal.is-pos-middle {
	inset-block-end: auto;
	inset-block-start: 50%;
	transform: translateY(-50%);
}

#wsp-lc-portal button {
	all: unset;
	box-sizing: border-box;
	font-family: inherit;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-transform: none;
	letter-spacing: normal;
	min-height: 0;
	line-height: 1.25;
}

#wsp-lc-portal input,
#wsp-lc-portal textarea,
#wsp-lc-portal select {
	font-family: inherit;
	min-height: 0;
	box-sizing: border-box;
}

#wsp-lc-portal button:focus-visible,
#wsp-lc-portal a:focus-visible {
	outline: 2px solid var(--wsp-lc-accent);
	outline-offset: 2px;
}

#wsp-lc-portal svg {
	flex-shrink: 0;
	pointer-events: none;
}

#wsp-lc-portal button svg,
#wsp-lc-portal button span,
#wsp-lc-portal button i,
#wsp-lc-portal button strong,
#wsp-lc-portal button small {
	pointer-events: none;
}

#wsp-lc-portal.is-pos-start {
	inset-inline-end: auto;
	inset-inline-start: var(--wsp-lc-side);
}

#wsp-lc-portal *,
#wsp-lc-portal *::before,
#wsp-lc-portal *::after {
	box-sizing: border-box;
}

/* Trigger hidden mode (when summoned only by shortcode/Elementor button) */
#wsp-lc-portal.is-trigger-hidden .wsp-lc-launcher-wrap {
	display: none;
}

/* Launcher Wrapper & Proactive Teaser */
.wsp-lc-launcher-wrap {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 10px;
}

#wsp-lc-portal.is-pos-top .wsp-lc-launcher-wrap {
	flex-direction: column-reverse;
}

#wsp-lc-portal.is-pos-start .wsp-lc-launcher-wrap {
	align-items: flex-start;
}

.wsp-lc-teaser {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 6px;
	max-width: 280px;
	background: var(--wsp-lc-surface);
	color: var(--wsp-lc-text);
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 16px;
	padding: 6px 8px 6px 12px;
	box-shadow: 0 14px 36px rgba(15, 23, 42, 0.18);
	font-size: 13px;
	font-weight: 500;
}

.wsp-lc-teaser.is-entering {
	animation: wspLcPopIn 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

#wsp-lc-portal[dir="rtl"] .wsp-lc-teaser {
	padding: 6px 12px 6px 8px;
}

#wsp-lc-portal button.wsp-lc-teaser-body {
	flex: 1 1 auto;
	justify-content: flex-start;
	text-align: start;
	padding: 5px 2px;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.45;
	color: var(--wsp-lc-text);
}

#wsp-lc-portal button.wsp-lc-teaser-close {
	flex: 0 0 26px;
	width: 26px;
	height: 26px;
	border: 0;
	background: rgba(15, 23, 42, 0.06);
	color: #475569;
	cursor: pointer;
	border-radius: 50%;
	padding: 0;
	margin-top: 2px;
}

#wsp-lc-portal button.wsp-lc-teaser-close:hover {
	background: rgba(15, 23, 42, 0.14);
	color: var(--wsp-lc-text);
}

/* Launcher Button Presets */
#wsp-lc-portal button.wsp-lc-launcher {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	border: 0;
	cursor: pointer;
	background: var(--wsp-lc-header-bg);
	color: var(--wsp-lc-header-text);
	box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24), 0 0 0 1px rgba(255, 255, 255, 0.12);
	transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

#wsp-lc-portal button.wsp-lc-launcher:hover {
	transform: translateY(-2px);
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
}

#wsp-lc-portal.is-launcher-orb_pill button.wsp-lc-launcher {
	height: 54px;
	padding: 0 18px;
	border-radius: 999px;
	font-size: 13.5px;
	font-weight: 700;
}

#wsp-lc-portal.is-launcher-floating_orb button.wsp-lc-launcher {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	padding: 0;
}

#wsp-lc-portal.is-launcher-floating_orb .wsp-lc-launcher-label {
	display: none;
}

#wsp-lc-portal.is-launcher-minimal_dock button.wsp-lc-launcher {
	height: 44px;
	padding: 0 16px;
	border-radius: 12px;
	font-size: 13px;
	font-weight: 600;
}

.wsp-lc-launcher-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--wsp-lc-accent);
	color: #ffffff;
	flex-shrink: 0;
}

#wsp-lc-portal.is-launcher-floating_orb .wsp-lc-launcher-icon {
	width: 100%;
	height: 100%;
	background: transparent;
}

.wsp-lc-launcher-badge {
	position: absolute;
	top: -5px;
	inset-inline-end: -4px;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	border-radius: 999px;
	background: #ef4444;
	color: #ffffff;
	font-size: 11px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 6px rgba(239, 68, 68, 0.45);
}

/* Tidio Signature Launcher: Floating Speech Bubble + Circular Action Orb */
.wsp-lc-tidio-dock {
	display: flex;
	align-items: center;
	gap: 12px;
}

#wsp-lc-portal button.wsp-lc-tidio-speech {
	background: #ffffff;
	color: #18181b;
	border: 1px solid rgba(15, 23, 42, 0.08);
	border-radius: 999px;
	padding: 10px 18px;
	font-size: 13.5px;
	font-weight: 600;
	box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
	cursor: pointer;
	white-space: nowrap;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#wsp-lc-portal button.wsp-lc-tidio-speech:hover {
	transform: translateY(-2px);
	box-shadow: 0 14px 34px rgba(15, 23, 42, 0.2);
}

#wsp-lc-portal button.wsp-lc-tidio-orb,
#wsp-lc-portal button.wsp-lc-floating-close {
	position: relative;
	width: 58px;
	height: 58px;
	border-radius: 50%;
	border: 0;
	padding: 0;
	background: var(--wsp-lc-header-bg);
	color: var(--wsp-lc-header-text);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 14px 34px rgba(15, 23, 42, 0.28), 0 0 0 2px rgba(255, 255, 255, 0.16);
	transition: transform 0.2s ease, background-color 0.2s ease;
}

#wsp-lc-portal button.wsp-lc-tidio-orb:hover,
#wsp-lc-portal button.wsp-lc-floating-close:hover {
	transform: scale(1.06);
}

#wsp-lc-portal button.wsp-lc-floating-close {
	position: absolute;
	inset-block-end: 0;
	inset-inline-end: 0;
	width: 52px;
	height: 52px;
	background: var(--wsp-lc-accent);
	color: #ffffff;
	box-shadow: 0 12px 28px rgba(15, 23, 42, 0.24), 0 0 0 2px rgba(255, 255, 255, 0.9);
}

#wsp-lc-portal.is-pos-start button.wsp-lc-floating-close {
	inset-inline-end: auto;
	inset-inline-start: 0;
}

#wsp-lc-portal.is-pos-top button.wsp-lc-floating-close {
	inset-block-end: auto;
	inset-block-start: 0;
}

#wsp-lc-portal.is-pos-middle button.wsp-lc-floating-close {
	inset-block-end: auto;
	inset-block-start: 50%;
	transform: translateY(-50%);
}

/* Chat Window */
.wsp-lc-window {
	position: absolute;
	inset-block-end: 66px;
	inset-inline-end: 0;
	width: min(var(--wsp-lc-width), calc(100vw - 24px));
	/* Never taller than the viewport minus the launcher + header clearance.
	   100dvh handles mobile browser chrome; the calc() fallback covers older engines. */
	height: min(var(--wsp-lc-height), calc(100vh - 104px));
	height: min(var(--wsp-lc-height), calc(100dvh - 112px));
	max-height: calc(100dvh - 112px);
	max-width: calc(100vw - 24px);
	background: var(--wsp-lc-surface);
	border-radius: var(--wsp-lc-radius);
	box-shadow: 0 24px 64px rgba(15, 23, 42, 0.26), 0 0 0 1px rgba(15, 23, 42, 0.08);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transform-origin: bottom right;
}

#wsp-lc-portal.is-pos-start .wsp-lc-window {
	inset-inline-end: auto;
	inset-inline-start: 0;
	transform-origin: bottom left;
}

#wsp-lc-portal.is-pos-top .wsp-lc-window {
	inset-block-end: auto;
	inset-block-start: 66px;
	height: min(var(--wsp-lc-height), calc(100dvh - 96px));
	max-height: calc(100dvh - 96px);
	transform-origin: top right;
}

#wsp-lc-portal.is-pos-top.is-pos-start .wsp-lc-window {
	transform-origin: top left;
}

#wsp-lc-portal.is-pos-middle .wsp-lc-window {
	inset-block-end: auto;
	inset-block-start: 50%;
	inset-inline-end: 72px;
	height: min(var(--wsp-lc-height), calc(100dvh - 40px));
	max-height: calc(100dvh - 40px);
	transform: translateY(-50%);
}

#wsp-lc-portal.is-pos-middle.is-pos-start .wsp-lc-window {
	inset-inline-end: auto;
	inset-inline-start: 72px;
}

.wsp-lc-window.is-entering {
	animation: wspLcPopIn 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.wsp-lc-pane {
	display: none;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
	overflow: hidden;
}

.wsp-lc-pane.is-pane-active {
	display: flex;
}

/* Tidio Home Welcome View + Bottom Navigation Tabs */
.wsp-lc-home-hero {
	background: linear-gradient(155deg, var(--wsp-lc-header-bg) 0%, var(--wsp-lc-user-bg) 100%);
	color: var(--wsp-lc-header-text);
	padding: 18px 18px 24px;
	border-bottom-left-radius: 20px;
	border-bottom-right-radius: 20px;
	flex-shrink: 0;
}

.wsp-lc-home-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 14px;
}

.wsp-lc-home-title {
	margin: 0 0 6px;
	font-size: 20px;
	font-weight: 800;
	color: var(--wsp-lc-header-text);
}

.wsp-lc-home-sub {
	margin: 0;
	font-size: 13px;
	opacity: 0.9;
	line-height: 1.5;
}

.wsp-lc-home-body {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 14px 16px;
	background: #f8fafc;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

#wsp-lc-portal button.wsp-lc-home-cta {
	width: 100%;
	border: 1px solid rgba(15, 23, 42, 0.08);
	background: #ffffff;
	color: var(--wsp-lc-text);
	border-radius: 14px;
	padding: 14px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	text-align: start;
	cursor: pointer;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
	transition: transform 0.16s ease, border-color 0.16s ease;
}

#wsp-lc-portal button.wsp-lc-home-cta:hover {
	transform: translateY(-1px);
	border-color: var(--wsp-lc-accent);
}

#wsp-lc-portal button.wsp-lc-home-cta strong {
	display: block;
	font-size: 14.5px;
	font-weight: 700;
	margin-bottom: 2px;
	color: var(--wsp-lc-text);
}

#wsp-lc-portal button.wsp-lc-home-cta span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	color: #64748b;
}

#wsp-lc-portal .wsp-lc-home-cta-icon {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--wsp-lc-accent);
	color: #ffffff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.wsp-lc-home-prompts {
	display: flex;
	flex-direction: column;
	gap: 7px;
}

.wsp-lc-home-ptitle {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #64748b;
	padding: 0 2px;
}

#wsp-lc-portal button.wsp-lc-home-qbtn {
	width: 100%;
	border: 1px solid rgba(15, 23, 42, 0.08);
	background: #ffffff;
	color: var(--wsp-lc-text);
	border-radius: 11px;
	padding: 10px 13px;
	font-size: 13px;
	font-weight: 600;
	display: flex;
	align-items: center;
	justify-content: space-between;
	text-align: start;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
}

#wsp-lc-portal button.wsp-lc-home-qbtn:hover {
	border-color: var(--wsp-lc-accent);
	background: #fafaf9;
}

.wsp-lc-bottom-tabs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	background: #ffffff;
	border-top: 1px solid rgba(15, 23, 42, 0.08);
	flex-shrink: 0;
}

#wsp-lc-portal button.wsp-lc-btab {
	position: relative;
	border: 0;
	background: transparent;
	color: #64748b;
	padding: 10px 8px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	font-size: 11.5px;
	font-weight: 700;
	cursor: pointer;
	border-radius: 0;
}

#wsp-lc-portal button.wsp-lc-btab.is-active {
	color: var(--wsp-lc-accent-hover);
}

.wsp-lc-btab-dot {
	position: absolute;
	top: 8px;
	inset-inline-end: 34%;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #ef4444;
}

#wsp-lc-portal button.wsp-lc-back-btn {
	width: 30px;
	height: 30px;
}

#wsp-lc-portal[dir="rtl"] .wsp-lc-back-btn svg,
#wsp-lc-portal[dir="rtl"] .wsp-lc-home-qbtn svg {
	transform: rotate(180deg);
}

#wsp-lc-portal.is-pos-start .wsp-lc-window {
	inset-inline-end: auto;
	inset-inline-start: 0;
	transform-origin: bottom left;
}

@keyframes wspLcPopIn {
	from {
		opacity: 0;
		transform: translateY(14px) scale(0.96);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

/* Header */
.wsp-lc-header {
	background: var(--wsp-lc-header-bg);
	color: var(--wsp-lc-header-text);
	padding: 15px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	flex-shrink: 0;
}

.wsp-lc-header-brand {
	display: flex;
	align-items: center;
	gap: 11px;
	min-width: 0;
}

.wsp-lc-avatar {
	position: relative;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--wsp-lc-accent);
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 16px;
	flex-shrink: 0;
	overflow: hidden;
}

.wsp-lc-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.wsp-lc-status-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	display: inline-block;
	background: #94a3b8;
	flex-shrink: 0;
}

.wsp-lc-status-dot.is-online {
	background: #22c55e;
	box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
}

.wsp-lc-header-meta {
	min-width: 0;
}

.wsp-lc-header-title {
	margin: 0;
	font-size: 14.5px;
	font-weight: 700;
	color: var(--wsp-lc-header-text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.wsp-lc-header-sub {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 11.5px;
	opacity: 0.86;
}

.wsp-lc-header-actions {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
}

.wsp-lc-lang-select {
	background: rgba(255, 255, 255, 0.14);
	color: var(--wsp-lc-header-text);
	border: 1px solid rgba(255, 255, 255, 0.24);
	border-radius: 8px;
	padding: 4px 6px;
	font-size: 11px;
	font-weight: 700;
	cursor: pointer;
	outline: none;
}

.wsp-lc-lang-select option {
	background: #18181b;
	color: #ffffff;
}

#wsp-lc-portal button.wsp-lc-icon-btn {
	width: 32px;
	height: 32px;
	padding: 0;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.18);
	background: rgba(255, 255, 255, 0.14);
	color: var(--wsp-lc-header-text);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.18s ease, transform 0.16s ease;
}

#wsp-lc-portal button.wsp-lc-icon-btn:hover {
	background: rgba(255, 255, 255, 0.26);
	transform: scale(1.06);
}

/* Body & Messages */
#wsp-lc-portal .wsp-lc-body {
	flex: 1 1 auto;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	background: #fafaf9;
}

#wsp-lc-portal .wsp-lc-bubble a {
	color: var(--wsp-lc-accent-hover);
	font-weight: 600;
	text-decoration: underline;
	word-break: break-all;
}

#wsp-lc-portal .wsp-lc-msg.is-visitor .wsp-lc-bubble a {
	color: #ffffff;
}

.wsp-lc-msg {
	display: flex;
	flex-direction: column;
	gap: 6px;
	max-width: 92%;
}

.wsp-lc-msg.is-visitor {
	align-self: flex-end;
	align-items: flex-end;
}

.wsp-lc-msg.is-ai,
.wsp-lc-msg.is-agent {
	align-self: flex-start;
	align-items: flex-start;
}

.wsp-lc-msg.is-system {
	align-self: center;
	max-width: 96%;
}

.wsp-lc-msg-sender {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 11px;
	font-weight: 600;
	color: #6b7280;
	padding-inline: 4px;
}

.wsp-lc-ai-pill {
	font-size: 10px;
	font-weight: 700;
	padding: 1px 6px;
	border-radius: 999px;
	background: rgba(197, 160, 89, 0.18);
	color: var(--wsp-lc-accent-hover);
}

.wsp-lc-bubble {
	padding: 10px 13px;
	border-radius: 16px;
	font-size: 13.5px;
	line-height: 1.55;
	white-space: pre-wrap;
	word-break: break-word;
}

.wsp-lc-msg.is-visitor .wsp-lc-bubble {
	background: var(--wsp-lc-user-bg);
	color: var(--wsp-lc-user-text);
	border-end-end-radius: 5px;
}

.wsp-lc-msg.is-ai .wsp-lc-bubble,
.wsp-lc-msg.is-agent .wsp-lc-bubble {
	background: var(--wsp-lc-bot-bg);
	color: var(--wsp-lc-bot-text);
	border: 1px solid rgba(0, 0, 0, 0.06);
	border-end-start-radius: 5px;
}

.wsp-lc-msg.is-system .wsp-lc-bubble {
	background: #f1f5f9;
	color: #475569;
	font-size: 12px;
	padding: 7px 12px;
	border-radius: 999px;
	text-align: center;
}

.wsp-lc-msg-time {
	font-size: 10.5px;
	color: #9ca3af;
	padding-inline: 4px;
}

/* Interactive WooCommerce Product Cards Inside Chat */
.wsp-lc-cards-rail {
	display: flex;
	flex-direction: column;
	gap: 9px;
	width: 100%;
	min-width: 245px;
	max-width: 320px;
}

.wsp-lc-pcard {
	background: #ffffff;
	border: 1px solid rgba(15, 23, 42, 0.1);
	border-radius: 14px;
	padding: 10px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.wsp-lc-pcard-top {
	display: flex;
	gap: 10px;
	align-items: flex-start;
}

.wsp-lc-pcard-img {
	width: 66px;
	height: 66px;
	border-radius: 10px;
	object-fit: cover;
	background: #f3f4f6;
	flex-shrink: 0;
	border: 1px solid rgba(0, 0, 0, 0.05);
}

.wsp-lc-pcard-info {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.wsp-lc-pcard-title {
	font-size: 13px;
	font-weight: 700;
	color: var(--wsp-lc-text);
	text-decoration: none;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.wsp-lc-pcard-title:hover {
	color: var(--wsp-lc-accent-hover);
}

.wsp-lc-pcard-price {
	font-size: 13px;
	font-weight: 700;
	color: var(--wsp-lc-accent-hover);
}

.wsp-lc-pcard-badges {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
}

.wsp-lc-stock-tag {
	font-size: 10.5px;
	font-weight: 700;
	padding: 2px 7px;
	border-radius: 999px;
	background: #ecfdf5;
	color: #047857;
}

.wsp-lc-stock-tag.is-out {
	background: #fef2f2;
	color: #b91c1c;
}

.wsp-lc-sale-tag {
	font-size: 10.5px;
	font-weight: 700;
	padding: 2px 6px;
	border-radius: 999px;
	background: #fef3c7;
	color: #92400e;
}

.wsp-lc-pcard-reason {
	font-size: 11.5px;
	color: #4b5563;
	background: #f8fafc;
	border-radius: 8px;
	padding: 5px 8px;
}

.wsp-lc-var-select {
	width: 100%;
	padding: 6px 8px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	font-size: 12px;
	background: #ffffff;
	color: var(--wsp-lc-text);
}

.wsp-lc-pcard-actions {
	display: flex;
	gap: 7px;
}

#wsp-lc-portal button.wsp-lc-atc-btn {
	flex: 1 1 auto;
	border: 0;
	border-radius: 9px;
	padding: 8px 10px;
	background: var(--wsp-lc-accent);
	color: #ffffff;
	font-size: 12.5px;
	font-weight: 700;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	transition: background 0.16s ease, opacity 0.16s ease;
}

#wsp-lc-portal button.wsp-lc-atc-btn:hover {
	background: var(--wsp-lc-accent-hover);
}

#wsp-lc-portal button.wsp-lc-atc-btn.is-added {
	background: #059669;
}

#wsp-lc-portal button.wsp-lc-atc-btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.wsp-lc-view-btn {
	border: 1px solid rgba(15, 23, 42, 0.14);
	background: #ffffff;
	color: var(--wsp-lc-text);
	border-radius: 9px;
	padding: 7px 10px;
	font-size: 12px;
	font-weight: 600;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.wsp-lc-view-btn:hover {
	border-color: var(--wsp-lc-accent);
	color: var(--wsp-lc-accent-hover);
}

/* Quick Replies & Helpful Storefront Page Suggestions */
.wsp-lc-pages-row {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 4px 0 6px;
	width: 100%;
	max-width: 94%;
}

.wsp-lc-pages-label {
	font-size: 11px;
	font-weight: 700;
	color: #64748b;
	letter-spacing: 0.02em;
	padding-inline: 2px;
}

.wsp-lc-pages-list {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

#wsp-lc-portal a.wsp-lc-page-link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 8px 11px;
	background: #ffffff;
	border: 1px solid rgba(15, 23, 42, 0.11);
	border-radius: 12px;
	color: var(--wsp-lc-text);
	text-decoration: none;
	font-size: 12.5px;
	font-weight: 600;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
	transition: border-color 0.16s ease, background-color 0.16s ease, transform 0.14s ease;
}

#wsp-lc-portal a.wsp-lc-page-link:hover {
	border-color: var(--wsp-lc-accent);
	background: #fdfbf7;
	transform: translateY(-1px);
}

.wsp-lc-page-link-main {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	min-width: 0;
}

.wsp-lc-page-link-title {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wsp-lc-page-badge {
	flex-shrink: 0;
	font-size: 10.5px;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 999px;
	background: rgba(197, 160, 89, 0.16);
	color: #7c5c1f;
}

.wsp-lc-quick-row {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 4px 0;
}

#wsp-lc-portal button.wsp-lc-quick-chip {
	background: #ffffff;
	border: 1px solid rgba(197, 160, 89, 0.5);
	color: var(--wsp-lc-text);
	border-radius: 999px;
	padding: 6px 12px;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

#wsp-lc-portal button.wsp-lc-quick-chip:hover {
	background: var(--wsp-lc-accent);
	border-color: var(--wsp-lc-accent);
	color: #ffffff;
}

/* Pre-Chat Lead Card */
.wsp-lc-prechat {
	background: #ffffff;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 14px;
	padding: 13px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.wsp-lc-prechat strong {
	font-size: 12.5px;
}

.wsp-lc-prechat input {
	width: 100%;
	border: 1px solid #d1d5db;
	border-radius: 9px;
	padding: 8px 10px;
	font-size: 12.5px;
	outline: none;
}

.wsp-lc-prechat input:focus {
	border-color: var(--wsp-lc-accent);
}

.wsp-lc-prechat-btns {
	display: flex;
	gap: 8px;
}

#wsp-lc-portal button.wsp-lc-prechat-submit {
	flex: 1;
	background: var(--wsp-lc-accent);
	color: #ffffff;
	border: 0;
	border-radius: 9px;
	padding: 8px 12px;
	font-size: 12.5px;
	font-weight: 700;
	cursor: pointer;
}

#wsp-lc-portal button.wsp-lc-prechat-skip {
	background: transparent;
	border: 1px solid #d1d5db;
	color: #6b7280;
	border-radius: 9px;
	padding: 8px 10px;
	font-size: 12px;
	cursor: pointer;
}

/* Typing Dots */
.wsp-lc-typing-indicator {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 12px;
	background: var(--wsp-lc-bot-bg);
	border-radius: 14px;
	font-size: 12px;
	color: #6b7280;
	align-self: flex-start;
}

.wsp-lc-dots {
	display: inline-flex;
	gap: 3px;
}

.wsp-lc-dots i {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--wsp-lc-accent);
	display: block;
	animation: wspLcBounce 1.1s infinite ease-in-out;
}

.wsp-lc-dots i:nth-child(2) {
	animation-delay: 0.15s;
}

.wsp-lc-dots i:nth-child(3) {
	animation-delay: 0.3s;
}

@keyframes wspLcBounce {
	0%, 80%, 100% {
		transform: translateY(0);
		opacity: 0.45;
	}
	40% {
		transform: translateY(-4px);
		opacity: 1;
	}
}

/* Footer Composer */
.wsp-lc-footer {
	border-top: 1px solid rgba(15, 23, 42, 0.08);
	background: #ffffff;
	padding: 10px 12px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 0 1 auto;
	min-height: 0;
	max-height: 58%;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.wsp-lc-composer-row {
	display: flex;
	align-items: flex-end;
	gap: 8px;
}

.wsp-lc-textarea {
	flex: 1 1 auto;
	border: 1px solid #d1d5db;
	border-radius: 12px;
	padding: 9px 11px;
	font-size: 13px;
	font-family: inherit;
	resize: none;
	max-height: 92px;
	min-height: 38px;
	outline: none;
	background: #f9fafb;
	color: var(--wsp-lc-text);
}

.wsp-lc-textarea:focus {
	border-color: var(--wsp-lc-accent);
	background: #ffffff;
}

#wsp-lc-portal button.wsp-lc-send {
	width: 38px;
	height: 38px;
	padding: 0;
	border-radius: 50%;
	border: 0;
	background: var(--wsp-lc-accent);
	color: #ffffff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	flex-shrink: 0;
	box-shadow: 0 4px 12px rgba(197, 160, 89, 0.35);
	transition: background 0.16s ease, transform 0.15s ease;
}

#wsp-lc-portal button.wsp-lc-send:hover {
	background: var(--wsp-lc-accent-hover);
	transform: scale(1.05);
}

.wsp-lc-footer-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	font-size: 11px;
}

#wsp-lc-portal button.wsp-lc-human-link,
#wsp-lc-portal a.wsp-lc-human-link {
	border: 1px solid rgba(15, 23, 42, 0.12);
	background: #f8fafc;
	color: #334155;
	font-size: 11.5px;
	font-weight: 600;
	cursor: pointer;
	padding: 4px 10px;
	border-radius: 999px;
	text-decoration: none;
	gap: 5px;
	transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease;
}

#wsp-lc-portal button.wsp-lc-human-link:hover,
#wsp-lc-portal a.wsp-lc-human-link:hover {
	border-color: var(--wsp-lc-accent);
	background: #ffffff;
	color: var(--wsp-lc-accent-hover);
}

.wsp-lc-csat-bar {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 11px;
	color: #64748b;
}

#wsp-lc-portal button.wsp-lc-rate-btn {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	border: 1px solid rgba(15, 23, 42, 0.12);
	background: #ffffff;
	font-size: 12px;
	transition: transform 0.15s ease, border-color 0.15s ease;
}

#wsp-lc-portal button.wsp-lc-rate-btn:hover {
	transform: scale(1.1);
	border-color: var(--wsp-lc-accent);
}

/* Inline Shortcode / Elementor Card & Trigger */
.wsp-lc-inline-card {
	background: #ffffff;
	border: 1px solid rgba(15, 23, 42, 0.1);
	border-radius: 18px;
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.wsp-lc-inline-card-head {
	display: flex;
	align-items: center;
	gap: 9px;
	font-size: 16px;
}

.wsp-lc-inline-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #22c55e;
	box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
}

.wsp-lc-inline-desc {
	margin: 0;
	font-size: 13.5px;
	color: #4b5563;
}

.wsp-lc-inline-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
}

.wsp-lc-inline-chip {
	background: #f8fafc;
	border: 1px solid #cbd5e1;
	border-radius: 999px;
	padding: 6px 12px;
	font-size: 12.5px;
	font-weight: 600;
	cursor: pointer;
}

.wsp-lc-inline-chip:hover {
	border-color: #c5a059;
	background: #faf6ef;
}

.wsp-lc-inline-btn {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	border: 0;
	border-radius: 12px;
	padding: 11px 18px;
	background: #171615;
	color: #ffffff;
	font-size: 13.5px;
	font-weight: 700;
	cursor: pointer;
}

.wsp-lc-msg-error {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin: 4px 0 8px;
	padding: 10px 13px;
	border-radius: 12px;
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #991b1b;
	font-size: 12.5px;
	font-weight: 500;
	line-height: 1.4;
}

#wsp-lc-portal button.wsp-lc-retry-btn {
	flex-shrink: 0;
	padding: 5px 11px;
	border-radius: 999px;
	background: #dc2626;
	color: #ffffff;
	font-size: 11.5px;
	font-weight: 700;
}

#wsp-lc-portal button.wsp-lc-retry-btn:hover {
	background: #b91c1c;
}

@media (max-width: 600px) {
	#wsp-lc-portal.wsp-lc-portal {
		inset-block-end: max(var(--wsp-lc-bottom-mob), env(safe-area-inset-bottom, 14px));
		inset-inline-end: min(var(--wsp-lc-side), 45vw);
	}
	#wsp-lc-portal.wsp-lc-portal.is-pos-top {
		inset-block-end: auto;
		inset-block-start: max(var(--wsp-lc-bottom-mob), env(safe-area-inset-top, 14px));
	}
	#wsp-lc-portal.wsp-lc-portal.is-pos-middle {
		inset-block-end: auto;
		inset-block-start: 50%;
		transform: translateY(-50%);
	}
	#wsp-lc-portal.is-pos-start {
		inset-inline-end: auto;
		inset-inline-start: min(var(--wsp-lc-side), 45vw);
	}
	/* On mobile launcher is icon-only + compact dismissible notification bubble */
	#wsp-lc-portal button.wsp-lc-tidio-speech,
	#wsp-lc-portal .wsp-lc-launcher-label {
		display: none !important;
	}
	#wsp-lc-portal button.wsp-lc-launcher {
		width: 56px !important;
		height: 56px !important;
		padding: 0 !important;
		border-radius: 50% !important;
	}
	#wsp-lc-portal .wsp-lc-launcher-icon {
		width: 100%;
		height: 100%;
		background: transparent;
	}
	#wsp-lc-portal button.wsp-lc-tidio-orb {
		width: 56px;
		height: 56px;
	}
	.wsp-lc-teaser {
		max-width: min(275px, calc(100vw - 32px));
	}
	#wsp-lc-portal button.wsp-lc-teaser-close {
		width: 28px;
		height: 28px;
		flex-basis: 28px;
	}
	/* Fullscreen mobile chat drawer: hide bottom-corner floating close orb so it NEVER overlaps Send button */
	#wsp-lc-portal button.wsp-lc-floating-close {
		display: none !important;
	}
	#wsp-lc-portal.wsp-lc-portal.is-open,
	#wsp-lc-portal.is-pos-start.is-open {
		top: 0 !important;
		right: 0 !important;
		bottom: 0 !important;
		left: 0 !important;
		inset: 0 !important;
		width: 100vw;
		height: 100dvh;
		z-index: 999999;
	}
	#wsp-lc-portal.is-open .wsp-lc-window,
	#wsp-lc-portal.is-pos-start.is-open .wsp-lc-window {
		position: relative;
		inset: auto !important;
		width: 100%;
		max-width: 100vw;
		height: 100%;
		max-height: 100dvh;
		border-radius: 0;
	}
	#wsp-lc-portal .wsp-lc-header,
	#wsp-lc-portal .wsp-lc-home-hero {
		padding-top: max(14px, env(safe-area-inset-top, 14px));
	}
	#wsp-lc-portal button.wsp-lc-icon-btn {
		width: 36px;
		height: 36px;
	}
	#wsp-lc-portal .wsp-lc-body,
	#wsp-lc-portal .wsp-lc-home-body {
		min-height: 0;
		-webkit-overflow-scrolling: touch;
	}
	#wsp-lc-portal .wsp-lc-textarea,
	#wsp-lc-portal .wsp-lc-prechat input,
	#wsp-lc-portal .wsp-lc-var-select {
		font-size: 16px;
	}
	#wsp-lc-portal .wsp-lc-pcard {
		width: 215px;
	}
	#wsp-lc-portal .wsp-lc-bottom-tabs {
		padding-bottom: env(safe-area-inset-bottom, 0px);
	}
}


/* ==========================================================================
   Short viewports (laptop 720p–900p, zoomed browsers, split screens)
   The bubble used to be pushed above the top edge because the panel kept its
   full 580px height while the viewport only had ~600px of usable space.
   ========================================================================== */
@media (max-height: 820px) {
	:where(#wsp-lc-portal) {
		--wsp-lc-height: 520px;
	}

	#wsp-lc-portal .wsp-lc-header,
	#wsp-lc-portal .wsp-lc-home-hero {
		padding-top: 12px;
		padding-bottom: 12px;
	}

	#wsp-lc-portal .wsp-lc-home-hero {
		border-bottom-left-radius: 16px;
		border-bottom-right-radius: 16px;
	}
}

@media (max-height: 720px) {
	:where(#wsp-lc-portal) {
		--wsp-lc-height: 460px;
	}

	#wsp-lc-portal .wsp-lc-window {
		height: min(var(--wsp-lc-height), calc(100dvh - 88px));
		max-height: calc(100dvh - 88px);
	}

	#wsp-lc-portal .wsp-lc-home-title {
		font-size: 17px;
	}

	#wsp-lc-portal .wsp-lc-home-cta {
		padding: 10px 12px;
	}

	#wsp-lc-portal .wsp-lc-teaser {
		max-width: 240px;
	}
}

@media (max-height: 620px) {
	:where(#wsp-lc-portal) {
		--wsp-lc-height: 420px;
	}

	#wsp-lc-portal .wsp-lc-home-quick-actions,
	#wsp-lc-portal .wsp-lc-home-brand-row {
		display: none;
	}
}

/* Landscape phones: go full-screen instead of a squeezed panel */
@media (max-height: 520px) and (orientation: landscape) {
	#wsp-lc-portal.wsp-lc-portal.is-open {
		inset: 0 !important;
		width: 100vw;
		height: 100dvh;
		z-index: 999999;
	}

	#wsp-lc-portal.is-open .wsp-lc-window {
		position: relative;
		inset: auto !important;
		width: 100% !important;
		max-width: 100vw;
		height: 100%;
		max-height: 100dvh;
		border-radius: 0;
		transform: none;
	}
}


/* JS-driven: viewport is too short for a floating bubble → full-screen sheet */
#wsp-lc-portal.is-viewport-tight.is-open,
#wsp-lc-portal.is-viewport-tight.is-pos-start.is-open {
	inset: 0 !important;
	top: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	left: 0 !important;
	width: 100vw;
	height: 100dvh;
	z-index: 999999;
	transform: none !important;
}

#wsp-lc-portal.is-viewport-tight.is-open .wsp-lc-window {
	position: relative;
	inset: auto !important;
	width: 100% !important;
	max-width: 100vw;
	height: 100% !important;
	max-height: 100dvh !important;
	border-radius: 0;
	transform: none;
}

#wsp-lc-portal.is-viewport-tight.is-open .wsp-lc-window .wsp-lc-footer {
	max-height: 46%;
}

/* Measured placement wins over fixed-height/media-query assumptions, including middle anchors. */
#wsp-lc-portal.wsp-lc-portal.is-open.is-viewport-fitted{transform:none!important}
#wsp-lc-portal.is-open.is-viewport-fitted .wsp-lc-window{position:fixed!important;inset:auto!important;inset-block:auto!important;inset-inline:auto!important;left:var(--wsp-lc-fit-x)!important;top:var(--wsp-lc-fit-y)!important;right:auto!important;bottom:auto!important;width:var(--wsp-lc-fit-w)!important;height:var(--wsp-lc-fit-h)!important;max-width:var(--wsp-lc-fit-w)!important;max-height:var(--wsp-lc-fit-h)!important;min-width:0!important;min-height:0!important;transform:none!important;animation:none!important}
#wsp-lc-portal.is-viewport-fitted .wsp-lc-body,#wsp-lc-portal.is-viewport-fitted .wsp-lc-home-body{min-height:0;overflow-y:auto;overscroll-behavior:contain}
#wsp-lc-portal.is-fitted-sheet .wsp-lc-window{border-radius:12px}
#wsp-lc-portal.is-fitted-sheet .wsp-lc-launcher-wrap,#wsp-lc-portal.is-fitted-sheet .wsp-lc-floating-close{visibility:hidden;pointer-events:none}

/* Fitted layout: keep real controls/composer intact; content, not controls, scrolls. */
#wsp-lc-portal.is-viewport-fitted .wsp-lc-floating-close{visibility:hidden;pointer-events:none}
#wsp-lc-portal .wsp-lc-header-brand{flex:1 1 auto;min-width:0}
#wsp-lc-portal .wsp-lc-header-meta{flex:1 1 auto;min-width:0;overflow:hidden}
#wsp-lc-portal .wsp-lc-header-sub{min-width:0}
#wsp-lc-portal .wsp-lc-header-sub span:last-child{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
#wsp-lc-portal .wsp-lc-header-actions{flex:0 0 auto;max-width:100%}
#wsp-lc-portal button.wsp-lc-icon-btn{flex:0 0 auto}
#wsp-lc-portal .wsp-lc-lang-select{min-width:0;max-width:58px;box-sizing:border-box}
#wsp-lc-portal .wsp-lc-home-body>*,#wsp-lc-portal .wsp-lc-home-prompts>*,#wsp-lc-portal .wsp-lc-body>*{flex-shrink:0}
#wsp-lc-portal .wsp-lc-home-hero{overflow-wrap:anywhere}
#wsp-lc-portal .wsp-lc-footer{flex:0 0 auto;max-height:55%;padding-bottom:max(10px,env(safe-area-inset-bottom,0px))}
#wsp-lc-portal .wsp-lc-composer-row{flex:0 0 auto;min-width:0}
#wsp-lc-portal .wsp-lc-textarea{min-width:0;width:0;box-sizing:border-box;overflow-y:auto}
#wsp-lc-portal .wsp-lc-footer-meta{flex-wrap:wrap;min-width:0}
#wsp-lc-portal .wsp-lc-footer-meta>*{max-width:100%;overflow-wrap:anywhere}
#wsp-lc-portal.is-fit-narrow .wsp-lc-header{flex-wrap:wrap;gap:6px;padding:8px 10px}
#wsp-lc-portal.is-fit-narrow .wsp-lc-header-brand{flex-basis:100%;gap:8px}
#wsp-lc-portal.is-fit-narrow .wsp-lc-header-actions{margin-inline-start:auto}
#wsp-lc-portal.is-fit-compact .wsp-lc-header,#wsp-lc-portal.is-fit-compact .wsp-lc-home-hero{padding:8px 10px}
#wsp-lc-portal.is-fit-compact .wsp-lc-home-top{margin-bottom:6px}
#wsp-lc-portal.is-fit-compact .wsp-lc-home-title{font-size:17px;margin-bottom:4px}
#wsp-lc-portal.is-fit-compact .wsp-lc-home-sub{max-height:3em;overflow-y:auto}
#wsp-lc-portal.is-fit-compact .wsp-lc-footer{padding:6px 8px;gap:4px}
#wsp-lc-portal.is-fit-compact button.wsp-lc-btab{padding:5px 8px;gap:1px}
#wsp-lc-portal.is-fit-tiny .wsp-lc-header-brand>.wsp-lc-avatar,#wsp-lc-portal.is-fit-tiny .wsp-lc-header-sub,#wsp-lc-portal.is-fit-tiny .wsp-lc-home-sub{display:none}
#wsp-lc-portal.is-fit-tiny .wsp-lc-home-hero{display:grid;grid-template-columns:1fr auto;align-items:center;gap:8px}
#wsp-lc-portal.is-fit-tiny .wsp-lc-home-top{grid-column:2;grid-row:1;margin:0}
#wsp-lc-portal.is-fit-tiny .wsp-lc-home-top>.wsp-lc-avatar{display:none}
#wsp-lc-portal.is-fit-tiny .wsp-lc-home-title{grid-column:1;grid-row:1;min-width:0;margin:0;font-size:15px}
#wsp-lc-portal.is-fit-tiny .wsp-lc-header{flex-wrap:nowrap}
#wsp-lc-portal.is-fit-tiny .wsp-lc-header-brand{flex-basis:auto}
#wsp-lc-portal.is-fit-tiny .wsp-lc-textarea{max-height:54px}
#wsp-lc-portal.is-fit-tiny .wsp-lc-footer-meta{display:none}
#wsp-lc-portal button:focus-visible,#wsp-lc-portal a:focus-visible,#wsp-lc-portal select:focus-visible,#wsp-lc-portal textarea:focus-visible,#wsp-lc-portal input:focus-visible{outline:2px solid var(--wsp-lc-accent);outline-offset:2px}
