/*!
 * VYBE WhatsApp Live Chat - front-end styles
 * (c) S.Veerakannan, VYBE Techno - GPL-2.0-or-later
 */

/* ---------------------------------------------------------------- *
 * Base
 * ---------------------------------------------------------------- */
.vwlc,
.vwlc *,
.vwlc *::before,
.vwlc *::after {
	box-sizing: border-box;
}

.vwlc[hidden],
.vwlc [hidden] {
	display: none !important;
}

.vwlc-slot[data-layout="floating"] {
	display: none;
}

.vwlc {
	--vwlc-x: 20px;
	--vwlc-y: 20px;
	--vwlc-z: 99999;
	--vwlc-w: 360px;
	--vwlc-radius: 20px;
	--vwlc-header-bg: #075e54;
	--vwlc-header-fg: #ffffff;
	--vwlc-button-bg: #25d366;
	--vwlc-button-fg: #0b141a;
	--vwlc-bubble-bg: #0e7c6b;
	--vwlc-bubble-fg: #ffffff;
	--vwlc-window-bg: #e5ddd5;
	--vwlc-gutter: 12px;
	--vwlc-win-w: min(var(--vwlc-w), calc(100vw - var(--vwlc-x) - var(--vwlc-gutter)));

	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.45;
	letter-spacing: normal;
	text-transform: none;
	text-align: start;
	color: #111b21;
	-webkit-text-size-adjust: 100%;
}

.vwlc.vwlc--font-inherit {
	font-family: inherit;
}

.vwlc.vwlc--center {
	--vwlc-win-w: min(var(--vwlc-w), calc(100vw - 2 * var(--vwlc-gutter)));
}

/* Resets so theme styles for generic elements don't leak in. */
.vwlc button,
.vwlc a,
.vwlc input,
.vwlc ul,
.vwlc li,
.vwlc img,
.vwlc form {
	margin: 0;
	text-transform: none;
	letter-spacing: normal;
}

.vwlc button {
	-webkit-appearance: none;
	appearance: none;
	border: 0;
	padding: 0;
	min-width: 0;
	min-height: 0;
	font: inherit;
	line-height: 1;
	cursor: pointer;
	text-shadow: none;
}

.vwlc a {
	text-decoration: none;
}

.vwlc img {
	max-width: none;
	height: auto;
	border: 0;
	box-shadow: none;
}

.vwlc svg {
	display: block;
	flex: none;
	fill: currentColor;
}

/* ---------------------------------------------------------------- *
 * Placement
 * ---------------------------------------------------------------- */
.vwlc--floating {
	position: fixed;
	z-index: var(--vwlc-z);
	bottom: calc(var(--vwlc-y) + env(safe-area-inset-bottom, 0px));
}

.vwlc--floating.vwlc--right {
	right: calc(var(--vwlc-x) + env(safe-area-inset-right, 0px));
}

.vwlc--floating.vwlc--left {
	left: calc(var(--vwlc-x) + env(safe-area-inset-left, 0px));
}

.vwlc--floating.vwlc--center {
	left: 0;
	right: 0;
	width: -moz-fit-content;
	width: fit-content;
	margin-inline: auto;
}

.vwlc--bubble {
	position: relative;
	display: block;
	z-index: var(--vwlc-z);
}

.vwlc--bubble.vwlc--left { text-align: left; }
.vwlc--bubble.vwlc--center { text-align: center; }
.vwlc--bubble.vwlc--right { text-align: right; }

.vwlc--window {
	position: relative;
	display: block;
	width: 100%;
	max-width: var(--vwlc-w);
	margin: 1em 0;
}

.vwlc--window.vwlc--center { margin-left: auto; margin-right: auto; }
.vwlc--window.vwlc--right { margin-left: auto; margin-right: 0; }
.vwlc--window.vwlc--left { margin-left: 0; margin-right: auto; }

/* ---------------------------------------------------------------- *
 * Bubble
 * ---------------------------------------------------------------- */
.vwlc .vwlc__bubble,
.vwlc .vwlc__bubble:hover,
.vwlc .vwlc__bubble:focus,
.vwlc .vwlc__bubble:active {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: var(--vwlc-bubble-bg);
	color: var(--vwlc-bubble-fg);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

.vwlc .vwlc__bubble {
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.vwlc .vwlc__bubble:hover {
	transform: translateY(-1px) scale(1.05);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.32);
}

.vwlc .vwlc__bubble:focus-visible,
.vwlc .vwlc__close:focus-visible,
.vwlc .vwlc__start:focus-visible,
.vwlc .vwlc__send:focus-visible,
.vwlc .vwlc__agent:focus-visible,
.vwlc .vwlc__input:focus-visible {
	outline: 3px solid #111b21;
	outline-offset: 2px;
	box-shadow: 0 0 0 2px #ffffff;
}

.vwlc .vwlc__bubble--pill,
.vwlc .vwlc__bubble--pill:hover,
.vwlc .vwlc__bubble--pill:focus,
.vwlc .vwlc__bubble--pill:active {
	width: auto;
	height: 56px;
	padding: 0 22px 0 16px;
	border-radius: 999px;
	font-size: 15px;
	font-weight: 600;
	white-space: nowrap;
}

.vwlc__bubble-art {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.vwlc__bubble-img {
	width: 32px;
	height: 32px;
	border-radius: 6px;
	object-fit: cover;
}

.vwlc__badge {
	position: absolute;
	top: -3px;
	inset-inline-end: -3px;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 5px;
	border-radius: 11px;
	background: #d93025;
	color: #ffffff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	box-shadow: 0 0 0 2px #ffffff;
	animation: vwlc-pop 0.35s ease 0.4s both;
}

@keyframes vwlc-pop {
	from { transform: scale(0); }
	to { transform: scale(1); }
}

/* ---------------------------------------------------------------- *
 * Window
 * ---------------------------------------------------------------- */
.vwlc__window {
	position: absolute;
	bottom: calc(100% + 12px);
	display: flex;
	flex-direction: column;
	width: var(--vwlc-win-w);
	max-height: min(640px, calc(100vh - 120px));
	overflow: hidden;
	border-radius: var(--vwlc-radius);
	background: var(--vwlc-window-bg);
	color: #111b21;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
	visibility: hidden;
	opacity: 0;
	transform: translateY(10px) scale(0.98);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
}

@supports (height: 100dvh) {
	.vwlc__window {
		max-height: min(640px, calc(100dvh - var(--vwlc-y) - 100px));
	}
}

.vwlc__window:focus {
	outline: none;
}

.vwlc__window:focus-visible {
	outline: 3px solid #111b21;
	outline-offset: 2px;
}

.vwlc--open .vwlc__window {
	visibility: visible;
	opacity: 1;
	transform: none;
	transition-delay: 0s;
}

.vwlc--right .vwlc__window { right: 0; transform-origin: bottom right; }
.vwlc--left .vwlc__window { left: 0; transform-origin: bottom left; }
.vwlc--center .vwlc__window { left: 50%; margin-left: calc(var(--vwlc-win-w) / -2); transform-origin: bottom center; }

.vwlc--bubble.vwlc--right .vwlc__window { right: 0; left: auto; margin-left: 0; }
.vwlc--bubble.vwlc--left .vwlc__window { left: 0; right: auto; }

/* An inline bubble near the top of the screen opens its window downwards instead. */
.vwlc--bubble.vwlc--drop .vwlc__window {
	top: calc(100% + 12px);
	bottom: auto;
	transform: translateY(-10px) scale(0.98);
	transform-origin: top left;
}
.vwlc--bubble.vwlc--drop.vwlc--right .vwlc__window { transform-origin: top right; }
.vwlc--bubble.vwlc--drop.vwlc--open .vwlc__window { transform: none; }

/* Inline chat window: always open, part of the page flow. */
.vwlc--window .vwlc__window {
	position: relative;
	bottom: auto;
	left: auto;
	right: auto;
	width: 100%;
	max-height: none;
	margin: 0;
	visibility: visible;
	opacity: 1;
	transform: none;
	box-shadow: 0 2px 14px rgba(0, 0, 0, 0.18);
}

/* ---------------------------------------------------------------- *
 * Header
 * ---------------------------------------------------------------- */
.vwlc__header {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	background: var(--vwlc-header-bg);
	color: var(--vwlc-header-fg);
}

.vwlc__avatars {
	display: flex;
	align-items: center;
	flex: none;
}

.vwlc__avatars--stack .vwlc__avatar + .vwlc__avatar {
	margin-inline-start: -12px;
}

.vwlc__avatar {
	position: relative;
	display: inline-block;
	flex: none;
	width: 42px;
	height: 42px;
}

.vwlc__avatar--lg { width: 48px; height: 48px; }
.vwlc__avatar--md { width: 42px; height: 42px; }
.vwlc__avatar--sm { width: 36px; height: 36px; }

.vwlc__avatar-clip {
	position: absolute;
	inset: 0;
	overflow: hidden;
	border-radius: 50%;
	background: #54656f;
	box-shadow: 0 0 0 2px var(--vwlc-header-bg);
}

.vwlc__agent .vwlc__avatar-clip {
	box-shadow: none;
}

.vwlc__avatar-initial {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: #ffffff;
	font-size: 18px;
	font-weight: 700;
	line-height: 1;
}

.vwlc__avatar-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.vwlc__dot {
	position: absolute;
	right: -1px;
	bottom: -1px;
	width: 13px;
	height: 13px;
	border-radius: 50%;
	background: #25d366;
	box-shadow: 0 0 0 2px #ffffff;
}

.vwlc__header .vwlc__dot {
	box-shadow: 0 0 0 2px var(--vwlc-header-bg);
}

.vwlc--offline .vwlc__dot {
	background: #8696a0;
}

.vwlc__heading {
	min-width: 0;
	flex: 1;
}

.vwlc__title {
	font-size: 16px;
	font-weight: 700;
	line-height: 1.25;
	overflow-wrap: anywhere;
}

.vwlc__caption {
	margin-top: 2px;
	font-size: 13px;
	line-height: 1.3;
	opacity: 0.88;
}

.vwlc .vwlc__close,
.vwlc .vwlc__close:hover,
.vwlc .vwlc__close:focus,
.vwlc .vwlc__close:active {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	align-self: flex-start;
	width: 36px;
	height: 36px;
	margin: -4px -6px -4px 0;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	box-shadow: none;
}

.vwlc .vwlc__close:hover {
	background: rgba(127, 127, 127, 0.28);
}

.vwlc--rtl .vwlc__close {
	margin: -4px 0 -4px -6px;
}

/* ---------------------------------------------------------------- *
 * Body
 * ---------------------------------------------------------------- */
.vwlc__body {
	flex: 1 1 auto;
	min-height: 0;
	padding: 16px;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}

.vwlc__messages {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
}

.vwlc__msg {
	max-width: 90%;
	padding: 10px 12px;
	border-radius: 0 12px 12px 12px;
	background: #ffffff;
	color: #111b21;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.14);
	overflow-wrap: anywhere;
	word-wrap: break-word;
}

.vwlc--rtl .vwlc__msg {
	border-radius: 12px 0 12px 12px;
}

.vwlc__msg p { margin: 0 0 0.5em; }
.vwlc__msg p:last-child { margin-bottom: 0; }
.vwlc__msg ul,
.vwlc__msg ol { margin: 0.4em 0; padding-inline-start: 1.3em; }
.vwlc__msg ul { list-style: disc; }
.vwlc__msg ol { list-style: decimal; }
.vwlc__msg a { color: #027eb5; text-decoration: underline; }

.vwlc__msg--offline {
	background: #fff6dc;
	box-shadow: 0 0 0 1px #ecd488;
}

.vwlc__agents-heading {
	margin: 16px 0 8px;
	color: #3b4a54;
	font-size: 13px;
	font-weight: 600;
}

.vwlc__agents {
	display: grid;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.vwlc__agents-item {
	margin: 0;
	padding: 0;
	list-style: none;
}

.vwlc .vwlc__agent,
.vwlc .vwlc__agent:visited {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	border-radius: calc(var(--vwlc-radius) * 0.6);
	border-inline-start: 4px solid var(--vwlc-button-bg);
	background: #ffffff;
	color: #111b21;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.16);
	transition: box-shadow 0.15s ease, background-color 0.15s ease;
}

.vwlc .vwlc__agent:hover,
.vwlc .vwlc__agent:focus {
	background: #f7fafb;
	color: #111b21;
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.vwlc__agent > svg {
	color: var(--vwlc-header-bg);
}

.vwlc__agent-info {
	display: flex;
	flex: 1;
	flex-direction: column;
	min-width: 0;
}

.vwlc__agent-name {
	font-weight: 600;
	overflow-wrap: anywhere;
}

.vwlc__agent-role {
	color: #54656f;
	font-size: 13px;
}

/* ---------------------------------------------------------------- *
 * Footer: start button / typing form
 * ---------------------------------------------------------------- */
.vwlc__footer {
	padding: 12px 16px 16px;
	background: rgba(255, 255, 255, 0.55);
}

.vwlc .vwlc__start,
.vwlc .vwlc__start:visited,
.vwlc .vwlc__start:hover,
.vwlc .vwlc__start:focus {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: 46px;
	padding: 10px 18px;
	border-radius: var(--vwlc-radius);
	background: var(--vwlc-button-bg);
	color: var(--vwlc-button-fg);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
}

.vwlc .vwlc__start:hover {
	filter: brightness(0.94);
}

.vwlc__form {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
}

.vwlc .vwlc__input {
	flex: 1;
	min-width: 0;
	height: 46px;
	margin: 0;
	padding: 0 14px;
	border: 1px solid #c4cdd2;
	border-radius: var(--vwlc-radius);
	background: #ffffff;
	box-shadow: none;
	color: #111b21;
	font: inherit;
	font-size: 16px;
	line-height: normal;
}

.vwlc .vwlc__input::placeholder {
	color: #667781;
	opacity: 1;
}

.vwlc .vwlc__send,
.vwlc .vwlc__send:hover,
.vwlc .vwlc__send:focus,
.vwlc .vwlc__send:active {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: var(--vwlc-button-bg);
	color: var(--vwlc-button-fg);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
}

.vwlc--rtl .vwlc__send svg {
	transform: scaleX(-1);
}

/* ---------------------------------------------------------------- *
 * Small screens
 * ---------------------------------------------------------------- */
@media (max-width: 480px) {
	.vwlc__window {
		max-height: calc(100vh - 110px);
	}

	@supports (height: 100dvh) {
		.vwlc__window {
			max-height: calc(100dvh - var(--vwlc-y) - 100px);
		}
	}
}

/* ---------------------------------------------------------------- *
 * Admin preview (the widget is contained in a box instead of the viewport)
 * ---------------------------------------------------------------- */
.vwlc--preview.vwlc--floating {
	position: absolute;
	z-index: 5;
}

@supports (width: 1cqw) {
	.vwlc--preview {
		--vwlc-win-w: min(var(--vwlc-w), calc(100cqw - var(--vwlc-x) - var(--vwlc-gutter)));
	}

	.vwlc--preview.vwlc--center {
		--vwlc-win-w: min(var(--vwlc-w), calc(100cqw - 2 * var(--vwlc-gutter)));
	}

	.vwlc--preview .vwlc__window {
		max-height: min(640px, calc(100cqh - var(--vwlc-y) - 90px));
	}
}

/* ---------------------------------------------------------------- *
 * Motion and print
 * ---------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	.vwlc *,
	.vwlc *::before,
	.vwlc *::after {
		animation-duration: 0.01ms !important;
		animation-delay: 0s !important;
		transition-duration: 0.01ms !important;
		transition-delay: 0s !important;
	}
}

@media print {
	.vwlc {
		display: none !important;
	}
}

/* ---------------------------------------------------------------- *
 * [vybe_whatsapp_button]
 * ---------------------------------------------------------------- */
.vybe-wlc-btn,
.vybe-wlc-btn:visited {
	display: inline-flex;
	align-items: center;
	gap: 0.55em;
	padding: 0.7em 1.25em;
	border: 2px solid var(--vwlc-btn-bg, #25d366);
	border-radius: 999px;
	background: var(--vwlc-btn-bg, #25d366);
	color: var(--vwlc-btn-fg, #0b141a);
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	box-shadow: none;
	transition: filter 0.15s ease;
}

.vybe-wlc-btn:hover,
.vybe-wlc-btn:focus {
	color: var(--vwlc-btn-fg, #0b141a);
	text-decoration: none;
	filter: brightness(0.94);
}

.vybe-wlc-btn:focus-visible {
	outline: 3px solid #111b21;
	outline-offset: 2px;
}

.vybe-wlc-btn .vybe-wlc-btn__icon {
	flex: none;
}

.vybe-wlc-btn.vybe-wlc-btn--outline,
.vybe-wlc-btn.vybe-wlc-btn--outline:visited {
	background: transparent;
	color: var(--vwlc-btn-ol, #0b6b5e);
	border-color: currentColor;
}

.vybe-wlc-btn.vybe-wlc-btn--outline:hover,
.vybe-wlc-btn.vybe-wlc-btn--outline:focus {
	color: var(--vwlc-btn-ol, #0b6b5e);
}
