/*
 * CQI Bot public widget styles. Self-contained, no CDN font or icon
 * dependency. Accent colour is set per-site via a CSS custom property
 * so branding never requires editing this file.
 */

.cqi-bot-launcher {
	position: fixed;
	bottom: 20px;
	right: 20px;
	z-index: 999999;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	border: none;
	background: var(--cqi-bot-accent, #0FC5B8);
	color: #FFFFFF;
	font-size: 24px;
	font-weight: 400;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
	overflow: hidden;
	padding: 0;
}

.cqi-bot-launcher img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
}

.cqi-bot-launcher.cqi-bot-position-bottom-left {
	right: auto;
	left: 20px;
}

.cqi-bot-panel {
	position: fixed;
	bottom: 88px;
	right: 20px;
	z-index: 999999;
	width: 340px;
	max-width: calc(100vw - 40px);
	height: 460px;
	max-height: calc(100vh - 120px);
	display: none;
	flex-direction: column;
	background: #FFFFFF;
	border-radius: 12px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
	overflow: hidden;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.cqi-bot-panel.is-open {
	display: flex;
}

.cqi-bot-panel__header {
	background: var(--cqi-bot-accent, #0FC5B8);
	color: #FFFFFF;
	padding: 14px 16px;
	font-size: 15px;
	font-weight: 600;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.cqi-bot-panel__header-actions {
	display: flex;
	align-items: center;
	gap: 10px;
}

.cqi-bot-panel__handoff-link {
	background: none;
	border: none;
	color: #FFFFFF;
	font-size: 12px;
	font-weight: 600;
	text-decoration: underline;
	cursor: pointer;
	padding: 0;
}

.cqi-bot-panel__close {
	background: none;
	border: none;
	color: #FFFFFF;
	font-size: 18px;
	font-weight: 400;
	cursor: pointer;
	line-height: 1;
}

.cqi-bot-panel__handoff-offer {
	padding: 10px 14px;
	border-top: 1px solid #E2E4E8;
	background: #F9FAFA;
}

.cqi-bot-handoff__intro {
	margin: 0 0 8px;
	font-size: 12px;
	font-weight: 600;
	color: #1D2327;
}

.cqi-bot-handoff__button {
	display: inline-block;
	width: 100%;
	box-sizing: border-box;
	text-align: center;
	background: var(--cqi-bot-accent, #0FC5B8);
	color: #FFFFFF;
	text-decoration: none;
	font-size: 13px;
	font-weight: 600;
	padding: 8px 10px;
	border: none;
	border-radius: 8px;
	margin-bottom: 8px;
	cursor: pointer;
}

.cqi-bot-handoff__email-form {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.cqi-bot-handoff__email-form input {
	border: 1px solid #E2E4E8;
	border-radius: 8px;
	padding: 7px 9px;
	font-size: 13px;
	font-weight: 400;
}

.cqi-bot-handoff__note {
	margin: 6px 0 0;
	font-size: 12px;
	font-weight: 400;
	color: #1D2327;
}

.cqi-bot-panel__messages {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 12px 14px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.cqi-bot-message {
	max-width: 85%;
	padding: 8px 12px;
	border-radius: 12px;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.4;
}

.cqi-bot-message.is-user {
	align-self: flex-end;
	background: var(--cqi-bot-accent, #0FC5B8);
	color: #FFFFFF;
}

.cqi-bot-message.is-assistant {
	align-self: flex-start;
	background: #F1F2F4;
	color: #1D2327;
}

.cqi-bot-sources {
	align-self: flex-start;
	max-width: 85%;
	font-size: 10px;
	font-weight: 400;
	color: #8A919C;
	padding: 0 2px;
}

.cqi-bot-sources a {
	color: #8A919C;
	text-decoration: underline;
}

.cqi-bot-sources a:hover,
.cqi-bot-sources a:focus {
	color: var(--cqi-bot-accent, #0FC5B8);
}

.cqi-bot-visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.cqi-bot-panel__form {
	display: flex;
	border-top: 1px solid #E2E4E8;
	padding: 8px;
	gap: 8px;
}

.cqi-bot-panel__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 6px 10px 8px;
	border-top: 1px solid #F1F2F4;
}

.cqi-bot-panel__notice {
	font-size: 10px;
	font-weight: 400;
	color: #8A919C;
}

.cqi-bot-panel__clear-link {
	background: none;
	border: none;
	font-size: 10px;
	font-weight: 600;
	color: #8A919C;
	text-decoration: underline;
	cursor: pointer;
	padding: 0;
	flex-shrink: 0;
}

.cqi-bot-panel__input {
	flex: 1 1 auto;
	border: 1px solid #E2E4E8;
	border-radius: 8px;
	padding: 8px 10px;
	font-size: 13px;
	font-weight: 400;
}

.cqi-bot-panel__send {
	border: none;
	border-radius: 8px;
	background: var(--cqi-bot-accent, #0FC5B8);
	color: #FFFFFF;
	font-size: 13px;
	font-weight: 600;
	padding: 8px 14px;
	cursor: pointer;
}

.cqi-bot-panel__send:focus-visible,
.cqi-bot-launcher:focus-visible,
.cqi-bot-panel__close:focus-visible,
.cqi-bot-panel__input:focus-visible {
	outline: 2px solid var(--cqi-bot-accent, #0FC5B8);
	outline-offset: 2px;
}
