/**
 * Inboxxit Chat Lite - front-end widget styles
 *
 * The brand color is injected at runtime as the --ixcl-color custom property on
 * the .ixcl-root element (set from the site's saved setting), so this file stays
 * static and cacheable. Brand-aware accents (focus rings, launcher glow) are
 * derived from it with color-mix(). Every selector is namespaced .ixcl-* so
 * nothing else on the page is affected.
 *
 * Table of contents
 *   1. Root + launcher bubble
 *   2. Panel + header (avatar, name, status)
 *   3. Message list + typing indicator
 *   4. Input + lead forms
 *   5. Badge
 *   6. Left-hand position modifier
 */

/* 1. Root + launcher bubble ============================================== */
.ixcl-root {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 2147483000;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
/* Reset form controls so the host theme can't inflate or recolor the widget's
   own inputs, buttons and links. Themes commonly style bare button/input/a with
   their own fill, radius, padding and font; strip the native look here and let
   each control's own rules (with !important where needed) reassert the design. */
.ixcl-root input,
.ixcl-root textarea,
.ixcl-root button,
.ixcl-root a {
	box-sizing: border-box;
	margin: 0;
	font-family: inherit;
	line-height: 1.4;
	letter-spacing: normal;
	text-transform: none;
}
.ixcl-root input,
.ixcl-root textarea,
.ixcl-root button {
	font-size: 14px;
	-webkit-appearance: none;
	appearance: none;
}
.ixcl-root button {
	min-width: 0;
	min-height: 0;
	text-align: center;
	box-shadow: none;
}
/* The hidden attribute must win over the display:flex rules below. */
.ixcl-panel[hidden],
.ixcl-lead[hidden],
.ixcl-input[hidden],
.ixcl-teaser[hidden] {
	display: none;
}
.ixcl-bubble {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	/* !important + fixed box so host-theme button styles can't distort the
	   launcher into a padded rounded-rectangle or inflate its size. */
	flex: 0 0 auto;
	width: 56px !important;
	height: 56px !important;
	min-width: 0;
	min-height: 0;
	padding: 0 !important;
	border: 0;
	border-radius: 50% !important;
	background: linear-gradient(180deg, color-mix(in srgb, var(--ixcl-color, #2563EB) 88%, #fff) 0%, var(--ixcl-color, #2563EB) 100%);
	color: #fff;
	cursor: pointer;
	box-shadow: 0 6px 16px color-mix(in srgb, var(--ixcl-color, #2563EB) 34%, transparent), 0 2px 5px rgba(20, 30, 55, .16);
	transition: transform .18s ease, box-shadow .18s ease;
	-webkit-appearance: none;
	appearance: none;
}
.ixcl-bubble:hover {
	transform: scale(1.04);
}
.ixcl-bubble:active {
	transform: scale(.96);
}
.ixcl-bubble:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--ixcl-color, #2563EB) 45%, transparent);
	outline-offset: 3px;
}
/* Launcher icon: chat when closed, morphs to an X when open. */
.ixcl-ic {
	position: absolute;
	transition: opacity .18s ease, transform .18s ease;
}
.ixcl-ic--close {
	opacity: 0;
	transform: rotate(-90deg) scale(.6);
}
.ixcl-open .ixcl-ic--chat {
	opacity: 0;
	transform: rotate(90deg) scale(.6);
}
.ixcl-open .ixcl-ic--close {
	opacity: 1;
	transform: none;
}
.ixcl-badge-dot {
	position: absolute;
	top: -2px;
	right: -2px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #ef4444;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	box-shadow: 0 0 0 2px #fff;
}
.ixcl-open .ixcl-badge-dot,
.ixcl-seen .ixcl-badge-dot {
	display: none;
}
/* Teaser nudge floating above the launcher. */
.ixcl-teaser {
	position: absolute;
	right: 0;
	bottom: 86px;
	width: 236px;
	max-width: calc(100vw - 40px);
	padding: 13px 32px 13px 15px;
	background: #fff;
	color: #1f2937;
	border: 1px solid rgba(15, 23, 42, .08);
	border-radius: 16px;
	box-shadow: 0 10px 30px rgba(15, 23, 42, .16);
	font-size: 13.5px;
	line-height: 1.45;
	cursor: pointer;
	animation: ixcl-teaser-in .28s cubic-bezier(.16, 1, .3, 1);
}
.ixcl-teaser::after {
	content: "";
	position: absolute;
	right: 20px;
	bottom: -6px;
	width: 12px;
	height: 12px;
	background: #fff;
	border-right: 1px solid rgba(15, 23, 42, .08);
	border-bottom: 1px solid rgba(15, 23, 42, .08);
	transform: rotate(45deg);
}
.ixcl-teaser__x {
	position: absolute;
	top: 7px;
	right: 9px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 20px !important;
	height: 20px !important;
	padding: 0 !important;
	background: rgba(15, 23, 42, .4) !important;
	border: 0 !important;
	border-radius: 50% !important;
	color: #fff !important;
	line-height: 1;
	cursor: pointer;
	transition: background .15s ease;
}
.ixcl-teaser__x:hover {
	background: rgba(15, 23, 42, .55) !important;
}
.ixcl-open .ixcl-teaser {
	display: none;
}
@keyframes ixcl-teaser-in {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
	.ixcl-teaser { animation: none; }
}

/* 2. Panel + header ===================================================== */
.ixcl-panel {
	position: absolute;
	right: 0;
	bottom: 78px;
	display: flex;
	flex-direction: column;
	width: 344px;
	max-width: calc(100vw - 32px);
	height: 512px;
	max-height: calc(100vh - 120px);
	overflow: hidden;
	background: #fff;
	border: 1px solid rgba(15, 23, 42, .06);
	border-radius: 16px;
	box-shadow: 0 16px 46px rgba(20, 30, 55, .24);
}
.ixcl-panel:not([hidden]) {
	animation: ixcl-in .22s cubic-bezier(.16, 1, .3, 1);
}
@keyframes ixcl-in {
	from { opacity: 0; transform: translateY(12px) scale(.98); }
	to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
	.ixcl-panel:not([hidden]) { animation: none; }
	.ixcl-bubble { transition: none; }
}
.ixcl-head {
	position: relative;
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 14px 48px 14px 15px;
	background: var(--ixcl-color, #2563EB);
	color: #fff;
}
.ixcl-head > span {
	display: flex;
	align-items: center;
	gap: 11px;
	min-width: 0;
}
.ixcl-avatar {
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
	box-shadow: 0 0 0 2px rgba(255, 255, 255, .3);
}
.ixcl-avatar--fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, .2);
	color: #fff;
	font-size: 16px;
	font-weight: 600;
}
.ixcl-idtext {
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.ixcl-name {
	overflow: hidden;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: -.01em;
	white-space: nowrap;
	text-overflow: ellipsis;
}
.ixcl-status {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 2px;
	font-size: 12px;
	opacity: .9;
}
.ixcl-status::before {
	content: "";
	flex: 0 0 auto;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #4ade80;
	box-shadow: 0 0 0 2px rgba(74, 222, 128, .35);
}
.ixcl-close {
	position: absolute;
	top: 13px;
	right: 13px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 28px !important;
	height: 28px !important;
	padding: 0 !important;
	background: rgba(255, 255, 255, .16) !important;
	border: 0 !important;
	border-radius: 50% !important;
	color: #fff !important;
	line-height: 1;
	cursor: pointer;
	transition: background .15s ease;
}
.ixcl-close:hover {
	background: rgba(255, 255, 255, .3) !important;
}

/* 3. Message list ======================================================= */
.ixcl-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 9px;
	padding: 16px 15px;
	overflow-y: auto;
	background: #f6f8fb;
	scrollbar-width: thin;
	scrollbar-color: transparent transparent;
}
.ixcl-body:hover {
	scrollbar-color: rgba(15, 23, 42, .22) transparent;
}
.ixcl-body::-webkit-scrollbar {
	width: 8px;
}
.ixcl-body::-webkit-scrollbar-track {
	background: transparent;
}
.ixcl-body::-webkit-scrollbar-thumb {
	background-color: transparent;
	border: 2px solid transparent;
	border-radius: 999px;
	background-clip: content-box;
	transition: background-color .2s ease;
}
.ixcl-body:hover::-webkit-scrollbar-thumb {
	background-color: rgba(15, 23, 42, .22);
}
.ixcl-body::-webkit-scrollbar-thumb:hover {
	background-color: rgba(15, 23, 42, .34);
}
.ixcl-msg {
	max-width: 80%;
	padding: 9px 12px;
	font-size: 13px;
	line-height: 1.45;
	white-space: pre-wrap;
	word-wrap: break-word;
}
.ixcl-user {
	align-self: flex-end;
	background: var(--ixcl-color, #2563EB);
	color: #fff;
	border-radius: 13px 13px 4px 13px;
}
.ixcl-bot {
	align-self: flex-start;
	background: #fff;
	color: #1f2937;
	border: 1px solid #eceef2;
	border-radius: 13px 13px 13px 4px;
	box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
}
.ixcl-typing {
	display: flex;
	gap: 4px;
	align-items: center;
}
.ixcl-typing span {
	display: inline-block;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #c3cad5;
	animation: ixcl-blink 1.2s infinite ease-in-out;
}
.ixcl-typing span:nth-child(2) { animation-delay: .2s; }
.ixcl-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes ixcl-blink {
	0%, 80%, 100% { opacity: .3; }
	40% { opacity: 1; }
}

/* 4. Input + lead forms ================================================= */
.ixcl-lead,
.ixcl-input {
	padding: 12px;
	background: #fff;
	border-top: 1px solid #eceef2;
}
.ixcl-lead {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.ixcl-input {
	display: flex;
	/* Buttons sit by the last line as the message box grows. */
	align-items: flex-end;
	gap: 10px;
}
/* Inputs: force our own box so the theme can't inflate the font or padding. */
.ixcl-lead input,
.ixcl-input textarea {
	height: auto !important;
	color: #1f2937 !important;
	background: #fff !important;
	box-shadow: none !important;
	outline: none;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.ixcl-lead input {
	width: 100%;
	padding: 9px 12px !important;
	border: 1px solid #dfe3e8 !important;
	border-radius: 10px !important;
	font-size: 14px !important;
}
/* Message box: a one-row textarea that wraps; widget.js grows it up to 120px
   and then lets it scroll. Themes give bare textareas big min-heights,
   widths and resize handles, so pin the box here. */
.ixcl-input textarea {
	display: block;
	flex: 1;
	min-width: 0;
	width: auto !important;
	min-height: 0 !important;
	max-height: 120px !important;
	padding: 10px 15px !important;
	border: 1px solid #dfe3e8 !important;
	border-radius: 20px !important;
	font-size: 13px !important;
	line-height: 1.4 !important;
	overflow-y: hidden;
	resize: none !important;
	white-space: pre-wrap !important;
	overflow-wrap: break-word !important;
	scrollbar-width: thin;
	scrollbar-color: rgba(15, 23, 42, .22) transparent;
}
.ixcl-input textarea::placeholder {
	color: #9ca3af !important;
	opacity: 1 !important;
}
.ixcl-input textarea::-webkit-scrollbar {
	width: 6px;
}
.ixcl-input textarea::-webkit-scrollbar-thumb {
	background-color: rgba(15, 23, 42, .22);
	border-radius: 999px;
}
/* 16px on touch devices so iOS doesn't zoom the page on focus. */
@media (pointer: coarse) {
	.ixcl-input textarea {
		font-size: 16px !important;
	}
}
.ixcl-lead input:focus,
.ixcl-input textarea:focus {
	border-color: var(--ixcl-color, #2563EB) !important;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--ixcl-color, #2563EB) 16%, transparent) !important;
}
/* Buttons: force fill, shape and size against the host theme. */
.ixcl-lead button {
	width: 100%;
	padding: 12px !important;
	border: 0 !important;
	border-radius: 10px !important;
	background: var(--ixcl-color, #2563EB) !important;
	color: #fff !important;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: filter .15s ease;
}
.ixcl-input button {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px !important;
	height: 38px !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: var(--ixcl-color, #2563EB) !important;
	color: #fff !important;
	cursor: pointer;
	transition: filter .15s ease;
}
.ixcl-lead button:hover,
.ixcl-input button:hover {
	filter: brightness(.94);
}

/* 5. Badge ============================================================== */
.ixcl-badge {
	display: block;
	padding: 9px;
	background: #fff;
	color: #9aa3af !important;
	font-size: 11px;
	letter-spacing: .02em;
	text-align: center;
	text-decoration: none !important;
}
.ixcl-badge:hover {
	color: #6b7280 !important;
}

/* 6. Left-hand position modifier ======================================= */
.ixcl-root--left {
	right: auto;
	left: 20px;
}
.ixcl-root--left .ixcl-panel,
.ixcl-root--left .ixcl-teaser {
	right: auto;
	left: 0;
}
.ixcl-root--left .ixcl-teaser::after {
	right: auto;
	left: 20px;
}
