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

.jcc-chat-root {
	--jcc-accent: #0757a6;
	--jcc-shadow: 0 18px 55px rgba(16, 24, 40, .2);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	position: fixed;
	right: max(18px, env(safe-area-inset-right));
	bottom: max(84px, env(safe-area-inset-bottom));
	z-index: 999999;
	color: #17202a;
}

.jcc-launcher {
	min-height: 56px;
	border: 0;
	border-radius: 999px;
	padding: 0 21px 0 17px;
	background: var(--jcc-accent);
	color: #fff;
	display: flex;
	align-items: center;
	gap: 10px;
	font: 700 15px/1 inherit;
	cursor: pointer;
	box-shadow: 0 8px 25px rgba(16, 24, 40, .25);
	transition: transform .18s ease, box-shadow .18s ease;
}

.jcc-launcher:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 30px rgba(16, 24, 40, .28);
}

.jcc-launcher:focus-visible,
.jcc-chat-root button:focus-visible,
.jcc-chat-root input:focus-visible,
.jcc-chat-root textarea:focus-visible {
	outline: 3px solid rgba(55, 139, 231, .35);
	outline-offset: 2px;
}

.jcc-launcher svg {
	width: 25px;
	height: 25px;
	fill: currentColor;
}

.jcc-badge {
	position: absolute;
	top: -6px;
	right: -5px;
	min-width: 23px;
	height: 23px;
	padding: 0 6px;
	border: 2px solid #fff;
	border-radius: 999px;
	background: #dc2626;
	color: #fff;
	font-size: 12px;
	font-weight: 800;
	line-height: 19px;
	text-align: center;
}

.jcc-panel {
	position: absolute;
	right: 0;
	bottom: 70px;
	width: min(390px, calc(100vw - 28px));
	height: min(620px, calc(100vh - 175px));
	min-height: min(470px, calc(100vh - 175px));
	background: #fff;
	border: 1px solid rgba(16, 24, 40, .08);
	border-radius: 18px;
	box-shadow: var(--jcc-shadow);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transform-origin: bottom right;
	animation: jcc-open .18s ease-out;
}

@keyframes jcc-open {
	from { opacity: 0; transform: translateY(8px) scale(.98); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

.jcc-header {
	min-height: 72px;
	padding: 14px 14px 14px 18px;
	background: var(--jcc-accent);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

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

.jcc-brand-icon {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .16);
	display: grid;
	place-items: center;
	flex: 0 0 auto;
}

.jcc-brand-icon svg {
	width: 22px;
	height: 22px;
	fill: #fff;
}

.jcc-brand strong,
.jcc-brand small {
	display: block;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.jcc-brand strong { font-size: 16px; }
.jcc-brand small { margin-top: 3px; opacity: .85; font-size: 12px; }

.jcc-close {
	border: 0;
	border-radius: 50%;
	width: 38px;
	height: 38px;
	background: transparent;
	color: #fff;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}

.jcc-close:hover { background: rgba(255, 255, 255, .13); }

.jcc-view {
	min-height: 0;
	flex: 1;
	display: flex;
	flex-direction: column;
	background: #f7f8fa;
}

.jcc-prechat {
	padding: 22px;
	overflow-y: auto;
}

.jcc-welcome {
	font-size: 20px;
	line-height: 1.3;
	font-weight: 750;
	margin: 0 0 6px;
}

.jcc-intro {
	font-size: 14px;
	color: #667085;
	margin: 0 0 20px;
	line-height: 1.45;
}

.jcc-field { margin-bottom: 14px; }
.jcc-field label {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
	font-weight: 700;
}

.jcc-field input,
.jcc-field textarea,
.jcc-composer textarea {
	width: 100%;
	border: 1px solid #d0d5dd;
	border-radius: 9px;
	background: #fff;
	color: #17202a;
	font: 400 15px/1.4 inherit;
	padding: 11px 12px;
	box-shadow: none;
}

.jcc-field textarea { min-height: 88px; resize: vertical; }
.jcc-field input:focus,
.jcc-field textarea:focus,
.jcc-composer textarea:focus { border-color: var(--jcc-accent); }

.jcc-honeypot {
	position: absolute !important;
	left: -10000px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

.jcc-consent {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	font-size: 12px;
	line-height: 1.4;
	color: #475467;
	margin: 4px 0 16px;
}

.jcc-consent input {
	width: 17px;
	height: 17px;
	margin: 1px 0 0;
	flex: 0 0 auto;
}

.jcc-consent a { color: var(--jcc-accent); }

.jcc-primary {
	width: 100%;
	min-height: 46px;
	border: 0;
	border-radius: 9px;
	background: var(--jcc-accent);
	color: #fff;
	font: 750 15px/1 inherit;
	cursor: pointer;
}

.jcc-primary:disabled { opacity: .6; cursor: wait; }

.jcc-error {
	padding: 10px 12px;
	border-radius: 8px;
	background: #fef2f2;
	color: #b42318;
	font-size: 13px;
	line-height: 1.4;
	margin-bottom: 12px;
}

.jcc-messages {
	flex: 1;
	overflow-y: auto;
	padding: 18px 15px 10px;
	scroll-behavior: smooth;
}

.jcc-message-row {
	display: flex;
	margin-bottom: 12px;
}

.jcc-message-row.is-customer { justify-content: flex-end; }

.jcc-message {
	max-width: 82%;
	padding: 10px 12px 8px;
	border-radius: 13px 13px 13px 4px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(16, 24, 40, .09);
	font-size: 14px;
	line-height: 1.43;
	white-space: pre-wrap;
	word-break: break-word;
}

.is-customer .jcc-message {
	background: var(--jcc-accent);
	color: #fff;
	border-radius: 13px 13px 4px 13px;
}

.jcc-message small {
	display: block;
	margin-top: 5px;
	font-size: 10px;
	opacity: .66;
	text-align: right;
}

.jcc-composer {
	padding: 10px;
	border-top: 1px solid #e4e7ec;
	background: #fff;
	display: flex;
	align-items: flex-end;
	gap: 8px;
}

.jcc-composer textarea {
	min-height: 44px;
	max-height: 110px;
	resize: none;
	padding: 10px 11px;
}

.jcc-send {
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 10px;
	background: var(--jcc-accent);
	color: #fff;
	cursor: pointer;
	display: grid;
	place-items: center;
	flex: 0 0 auto;
}

.jcc-send svg { width: 20px; height: 20px; fill: currentColor; }
.jcc-send:disabled { opacity: .55; cursor: wait; }

.jcc-status-line {
	padding: 6px 12px;
	background: #fff;
	color: #667085;
	font-size: 11px;
	text-align: center;
}

@media (max-width: 680px) {
	.jcc-chat-root {
		right: max(12px, env(safe-area-inset-right));
		bottom: max(76px, calc(12px + env(safe-area-inset-bottom)));
	}
	.jcc-launcher {
		width: 58px;
		height: 58px;
		padding: 0;
		justify-content: center;
	}
	.jcc-launcher-label { display: none; }
	.jcc-panel {
		position: fixed;
		inset: 0;
		width: 100%;
		height: 100%;
		min-height: 0;
		border: 0;
		border-radius: 0;
		padding-bottom: env(safe-area-inset-bottom);
	}
	.jcc-header { padding-top: max(14px, env(safe-area-inset-top)); }
	.jcc-prechat { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
	.jcc-panel { animation: none; }
	.jcc-launcher { transition: none; }
}
