.igsb-chat,
.igsb-chat * {
	box-sizing: border-box;
}

.igsb-chat {
	--igsb-primary: #2563eb;
	--igsb-text: #172033;
	--igsb-muted: #6b7280;
	--igsb-border: #e6eaf0;
	--igsb-surface: #fff;
	--igsb-soft: #f4f6f9;
	position: fixed;
	right: 22px;
	bottom: 22px;
	z-index: 2147483000;
	color: var(--igsb-text);
	font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 14px;
	line-height: 1.45;
	text-align: left;
}

.igsb-chat--left {
	right: auto;
	left: 22px;
}

.igsb-launcher {
	display: grid;
	width: 58px;
	height: 58px;
	margin-left: auto;
	padding: 0;
	place-items: center;
	border: 0;
	border-radius: 50%;
	background: var(--igsb-primary);
	box-shadow: 0 12px 34px rgba(15, 23, 42, .25);
	color: #fff;
	cursor: pointer;
	transition: transform .18s ease, box-shadow .18s ease;
}

.igsb-chat--left .igsb-launcher {
	margin-right: auto;
	margin-left: 0;
}

.igsb-launcher:hover {
	transform: translateY(-2px);
	box-shadow: 0 16px 38px rgba(15, 23, 42, .3);
}

.igsb-launcher:focus-visible,
.igsb-icon-button:focus-visible,
.igsb-send:focus-visible,
.igsb-input:focus-visible,
.igsb-quick-button:focus-visible,
.igsb-handoff-button:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--igsb-primary) 34%, transparent);
	outline-offset: 2px;
}

.igsb-launcher svg {
	grid-area: 1 / 1;
	width: 29px;
	height: 29px;
	transition: opacity .16s ease, transform .18s ease;
}

.igsb-launcher-chat {
	opacity: 1;
	transform: scale(1);
}

.igsb-launcher-close {
	opacity: 0;
	transform: scale(.65) rotate(-30deg);
}

.igsb-chat--open .igsb-launcher-chat {
	opacity: 0;
	transform: scale(.65) rotate(30deg);
}

.igsb-chat--open .igsb-launcher-close {
	opacity: 1;
	transform: scale(1) rotate(0);
}

.igsb-unread {
	position: absolute;
	top: -3px;
	right: -3px;
	min-width: 21px;
	height: 21px;
	padding: 1px 5px 0;
	border: 2px solid #fff;
	border-radius: 99px;
	background: #ef4444;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 16px;
	text-align: center;
}

.igsb-panel {
	position: absolute;
	right: 0;
	bottom: 72px;
	display: flex;
	visibility: hidden;
	overflow: hidden;
	width: min(390px, calc(100vw - 28px));
	height: min(620px, calc(100vh - 118px));
	min-height: 430px;
	flex-direction: column;
	border: 1px solid rgba(15, 23, 42, .08);
	border-radius: 20px;
	background: var(--igsb-surface);
	box-shadow: 0 24px 70px rgba(15, 23, 42, .24);
	opacity: 0;
	transform: translateY(14px) scale(.97);
	transform-origin: right bottom;
	transition: opacity .18s ease, transform .18s ease, visibility .18s;
}

.igsb-chat--left .igsb-panel {
	right: auto;
	left: 0;
	transform-origin: left bottom;
}

.igsb-chat--open .igsb-panel {
	visibility: visible;
	opacity: 1;
	transform: translateY(0) scale(1);
}

.igsb-header {
	display: flex;
	min-height: 72px;
	align-items: center;
	gap: 11px;
	padding: 13px 12px 13px 15px;
	background: linear-gradient(135deg, var(--igsb-primary), color-mix(in srgb, var(--igsb-primary) 76%, #111827));
	color: #fff;
}

.igsb-avatar {
	display: grid;
	width: 42px;
	height: 42px;
	flex: 0 0 42px;
	place-items: center;
	border: 1px solid rgba(255, 255, 255, .28);
	border-radius: 14px;
	background: rgba(255, 255, 255, .16);
}

.igsb-avatar svg {
	width: 25px;
	height: 25px;
}

.igsb-header-copy {
	display: flex;
	min-width: 0;
	flex: 1 1 auto;
	flex-direction: column;
}

.igsb-header-copy strong {
	overflow: hidden;
	font-size: 15px;
	line-height: 1.3;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.igsb-header-copy span {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 3px;
	color: rgba(255, 255, 255, .82);
	font-size: 11px;
}

.igsb-header-copy i {
	width: 7px;
	height: 7px;
	border: 1px solid rgba(255, 255, 255, .55);
	border-radius: 50%;
	background: #48e08b;
	box-shadow: 0 0 0 3px rgba(72, 224, 139, .14);
}

.igsb-icon-button {
	display: grid;
	width: 34px;
	height: 34px;
	flex: 0 0 34px;
	padding: 0;
	place-items: center;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: rgba(255, 255, 255, .9);
	cursor: pointer;
}

.igsb-icon-button:hover {
	background: rgba(255, 255, 255, .13);
}

.igsb-icon-button svg {
	width: 19px;
	height: 19px;
}

.igsb-messages {
	overflow-x: hidden;
	overflow-y: auto;
	flex: 1 1 auto;
	padding: 20px 15px 15px;
	background:
		radial-gradient(circle at 92% 0, color-mix(in srgb, var(--igsb-primary) 6%, transparent), transparent 32%),
		#fafbfc;
	scroll-behavior: smooth;
}

.igsb-message {
	display: flex;
	margin: 0 0 13px;
	flex-direction: column;
	align-items: flex-start;
}

.igsb-message--user {
	align-items: flex-end;
}

.igsb-bubble {
	max-width: 86%;
	padding: 10px 13px;
	border: 1px solid var(--igsb-border);
	border-radius: 5px 16px 16px;
	background: #fff;
	box-shadow: 0 2px 7px rgba(15, 23, 42, .04);
	color: var(--igsb-text);
	font-size: 13.5px;
	line-height: 1.5;
	overflow-wrap: anywhere;
	white-space: pre-wrap;
}

.igsb-message--user .igsb-bubble {
	border-color: transparent;
	border-radius: 16px 16px 5px;
	background: var(--igsb-primary);
	box-shadow: none;
	color: #fff;
}

.igsb-sources {
	display: flex;
	max-width: 86%;
	flex-wrap: wrap;
	gap: 5px;
	margin-top: 6px;
}

.igsb-sources-label {
	width: 100%;
	color: var(--igsb-muted);
	font-size: 10px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .04em;
}

.igsb-sources a {
	display: block;
	overflow: hidden;
	max-width: 100%;
	padding: 4px 8px;
	border: 1px solid var(--igsb-border);
	border-radius: 99px;
	background: #fff;
	color: var(--igsb-primary);
	font-size: 11px;
	text-decoration: none;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.igsb-sources a:hover {
	border-color: color-mix(in srgb, var(--igsb-primary) 40%, var(--igsb-border));
}

.igsb-handoff {
	display: flex;
	width: min(86%, 310px);
	flex-wrap: wrap;
	gap: 7px;
	margin-top: 8px;
}

.igsb-handoff-label {
	width: 100%;
	margin-bottom: 1px;
	color: var(--igsb-muted);
	font-size: 11px;
	font-weight: 600;
}

.igsb-handoff-button {
	display: inline-flex;
	min-height: 35px;
	align-items: center;
	justify-content: center;
	padding: 7px 12px;
	border: 1px solid color-mix(in srgb, var(--igsb-primary) 32%, var(--igsb-border));
	border-radius: 10px;
	background: #fff;
	color: var(--igsb-primary);
	font-size: 12px;
	font-weight: 650;
	text-decoration: none;
	transition: background .15s ease, color .15s ease;
}

.igsb-handoff-button:hover {
	background: var(--igsb-primary);
	color: #fff;
}

.igsb-typing {
	display: flex;
	min-width: 55px;
	align-items: center;
	gap: 4px;
	padding-top: 14px;
	padding-bottom: 14px;
}

.igsb-typing i {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #9aa3b1;
	animation: igsb-bounce 1.1s infinite ease-in-out;
}

.igsb-typing i:nth-child(2) {
	animation-delay: .13s;
}

.igsb-typing i:nth-child(3) {
	animation-delay: .26s;
}

@keyframes igsb-bounce {
	0%, 60%, 100% { transform: translateY(0); opacity: .55; }
	30% { transform: translateY(-4px); opacity: 1; }
}

.igsb-quick-questions {
	display: flex;
	overflow-x: auto;
	flex: 0 0 auto;
	gap: 7px;
	padding: 9px 13px 7px;
	border-top: 1px solid #f0f2f5;
	background: #fff;
	scrollbar-width: none;
}

.igsb-quick-questions::-webkit-scrollbar {
	display: none;
}

.igsb-quick-button {
	flex: 0 0 auto;
	padding: 7px 10px;
	border: 1px solid var(--igsb-border);
	border-radius: 99px;
	background: var(--igsb-soft);
	color: #344054;
	font: inherit;
	font-size: 11.5px;
	cursor: pointer;
	white-space: nowrap;
}

.igsb-quick-button:hover {
	border-color: color-mix(in srgb, var(--igsb-primary) 38%, var(--igsb-border));
	background: color-mix(in srgb, var(--igsb-primary) 6%, #fff);
	color: var(--igsb-primary);
}

.igsb-form {
	display: flex;
	flex: 0 0 auto;
	align-items: flex-end;
	gap: 8px;
	padding: 10px 11px;
	border-top: 1px solid var(--igsb-border);
	background: #fff;
}

.igsb-input {
	display: block;
	overflow-y: auto;
	width: 100%;
	min-height: 42px;
	max-height: 112px;
	flex: 1 1 auto;
	resize: none;
	padding: 10px 12px;
	border: 1px solid var(--igsb-border);
	border-radius: 13px;
	background: #f8fafc;
	box-shadow: none;
	color: var(--igsb-text);
	font: inherit;
	font-size: 13px;
	line-height: 20px;
}

.igsb-input:focus {
	border-color: color-mix(in srgb, var(--igsb-primary) 55%, var(--igsb-border));
	background: #fff;
}

.igsb-send {
	display: grid;
	width: 42px;
	height: 42px;
	flex: 0 0 42px;
	padding: 0;
	place-items: center;
	border: 0;
	border-radius: 13px;
	background: var(--igsb-primary);
	color: #fff;
	cursor: pointer;
	transition: opacity .15s ease, transform .15s ease;
}

.igsb-send:hover {
	transform: translateY(-1px);
}

.igsb-send:disabled {
	opacity: .45;
	cursor: wait;
	transform: none;
}

.igsb-send svg {
	width: 21px;
	height: 21px;
}

.igsb-honeypot {
	position: absolute !important;
	left: -99999px !important;
	width: 1px !important;
	height: 1px !important;
	opacity: 0 !important;
}

.igsb-disclaimer {
	flex: 0 0 auto;
	margin: -3px 12px 8px;
	color: #9299a5;
	font-size: 9.5px;
	line-height: 1.3;
	text-align: center;
}

.igsb-chat .screen-reader-text {
	position: absolute !important;
	overflow: hidden;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

@media (max-width: 520px) {
	.igsb-chat {
		right: 14px;
		bottom: max(14px, env(safe-area-inset-bottom));
	}

	.igsb-chat--left {
		right: auto;
		left: 14px;
	}

	.igsb-panel {
		position: fixed;
		inset: 10px 10px max(82px, calc(env(safe-area-inset-bottom) + 72px));
		width: auto;
		height: auto;
		min-height: 0;
		border-radius: 18px;
		transform-origin: center bottom;
	}

	.igsb-bubble,
	.igsb-sources,
	.igsb-handoff {
		max-width: 91%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.igsb-chat *,
	.igsb-chat *::before,
	.igsb-chat *::after {
		scroll-behavior: auto !important;
		transition-duration: .01ms !important;
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
	}
}

