.ozc-widget {
	--ozc-navy: #255194;
	--ozc-navy-light: #1a3a6e;
	--ozc-teal: #00ccfe;
	--ozc-teal-dark: #25cbcb;
	--ozc-green: #00ff84;
	--ozc-pale: #abefff;
	--ozc-bg: #f2f9fc;
	--ozc-bot-bubble: #ffffff;
	--ozc-text: #0d1b2e;
	--ozc-muted: #5b6b7c;

	max-width: 440px;
	border-radius: 16px;
	overflow: hidden;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	box-shadow: 0 8px 30px rgba(11, 31, 58, 0.16);
	background: #fff;
	border: 1px solid #e3e8ee;
}

.ozc-header {
	background: linear-gradient(135deg, var(--ozc-navy) 0%, var(--ozc-navy-light) 60%, var(--ozc-teal-dark) 130%);
	color: #fff;
	padding: 18px 20px;
	font-weight: 700;
	font-size: 16px;
	letter-spacing: 0.2px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.ozc-header::before {
	content: "";
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--ozc-green);
	box-shadow: 0 0 0 3px rgba(0, 255, 132, 0.25);
	display: inline-block;
}

.ozc-messages {
	height: 400px;
	overflow-y: auto;
	padding: 16px;
	background: var(--ozc-bg);
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ozc-messages::-webkit-scrollbar {
	width: 6px;
}
.ozc-messages::-webkit-scrollbar-thumb {
	background: #ccd5de;
	border-radius: 3px;
}

.ozc-msg {
	max-width: 86%;
	padding: 11px 14px;
	border-radius: 16px;
	font-size: 14px;
	line-height: 1.5;
	word-break: break-word;
	color: var(--ozc-text);
}

.ozc-msg-user {
	align-self: flex-end;
	background: linear-gradient(135deg, var(--ozc-navy) 0%, var(--ozc-navy-light) 100%);
	color: #fff;
	border-bottom-right-radius: 4px;
}

.ozc-msg-bot {
	align-self: flex-start;
	background: var(--ozc-bot-bubble);
	border: 1px solid #dcecf5;
	border-bottom-left-radius: 4px;
	box-shadow: 0 1px 2px rgba(37, 81, 148, 0.06);
}

/* Typography for rendered markdown inside bot bubbles */
.ozc-msg-bot p {
	margin: 0 0 8px 0;
}
.ozc-msg-bot p:last-child {
	margin-bottom: 0;
}
.ozc-msg-bot h3,
.ozc-msg-bot h4,
.ozc-msg-bot h5,
.ozc-msg-bot h6 {
	margin: 12px 0 6px 0;
	font-size: 14.5px;
	font-weight: 700;
	color: var(--ozc-navy);
}
.ozc-msg-bot h3:first-child,
.ozc-msg-bot h4:first-child {
	margin-top: 0;
}
.ozc-msg-bot strong {
	color: var(--ozc-navy);
	font-weight: 700;
}
.ozc-msg-bot ul,
.ozc-msg-bot ol {
	margin: 4px 0 10px 0;
	padding-left: 20px;
}
.ozc-msg-bot li {
	margin-bottom: 4px;
}
.ozc-msg-bot li::marker {
	color: var(--ozc-teal-dark);
	font-weight: 700;
}

.ozc-typing {
	opacity: 0.65;
}

.ozc-inputbar {
	display: flex;
	border-top: 1px solid #dcecf5;
	background: #fff;
	padding: 10px;
	gap: 8px;
}

.ozc-inputbar input {
	flex: 1;
	border: 1px solid #cfe6f2;
	border-radius: 24px;
	padding: 11px 16px;
	font-size: 14px;
	outline: none;
	background: var(--ozc-bg);
	color: var(--ozc-text);
	transition: border-color 0.15s ease;
}

.ozc-inputbar input:focus {
	border-color: var(--ozc-teal);
	background: #fff;
}

.ozc-inputbar button {
	border: none;
	background: linear-gradient(135deg, var(--ozc-teal) 0%, var(--ozc-teal-dark) 100%);
	color: #fff;
	border-radius: 24px;
	padding: 0 20px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.15s ease, transform 0.05s ease;
}

.ozc-inputbar button:disabled {
	opacity: 0.5;
	cursor: default;
}

.ozc-inputbar button:hover:not(:disabled) {
	opacity: 0.92;
}

.ozc-inputbar button:active:not(:disabled) {
	transform: scale(0.97);
}

.ozc-widget.ozc-ended .ozc-inputbar {
	background: var(--ozc-bg);
}

.ozc-widget.ozc-ended .ozc-inputbar input::placeholder {
	color: var(--ozc-muted);
	font-style: italic;
}

@media (max-width: 480px) {
	.ozc-widget {
		max-width: 100%;
		border-radius: 0;
	}
}

/* ---- Launcher button + modal popup (used by [cxi_chat_button]) ---- */

.ozc-launcher-btn {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 999998;
	border: none;
	border-radius: 999px;
	padding: 14px 22px;
	font-size: 14px;
	font-weight: 700;
	color: #fff;
	background: linear-gradient(135deg, #255194 0%, #1a3a6e 60%, #25cbcb 130%);
	box-shadow: 0 6px 20px rgba(11, 31, 58, 0.28);
	cursor: pointer;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ozc-launcher-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 26px rgba(11, 31, 58, 0.34);
}

.ozc-modal-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(11, 31, 58, 0.45);
	z-index: 999999;
	align-items: flex-end;
	justify-content: flex-end;
	padding: 24px;
}

.ozc-modal-overlay.ozc-modal-visible {
	display: flex;
}

.ozc-modal-panel {
	position: relative;
	max-width: 440px;
	width: 100%;
}

.ozc-modal-panel .ozc-widget {
	max-width: 100%;
}

.ozc-modal-close {
	position: absolute;
	top: -14px;
	right: -14px;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: none;
	background: #fff;
	color: #0d1b2e;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 3px 10px rgba(11, 31, 58, 0.25);
	z-index: 1;
}

.ozc-modal-close:hover {
	background: #f2f9fc;
}

@media (max-width: 480px) {
	.ozc-modal-overlay {
		padding: 0;
		align-items: stretch;
		justify-content: stretch;
	}
	.ozc-modal-panel {
		max-width: 100%;
		height: 100%;
	}
	.ozc-modal-panel .ozc-widget {
		height: 100%;
		border-radius: 0;
	}
	.ozc-modal-close {
		top: 10px;
		right: 10px;
	}
}
