/* CAPECTG LMS Chatbot — Navy / Gold / Parchment brand skin */
#capectg-chatbot-root,
#capectg-chatbot-root * {
	box-sizing: border-box;
}

#capectg-chatbot-root {
	--capectg-navy: #14192B;
	--capectg-gold: #B08D2B;
	--capectg-gold-ink: #8C6D1F;
	--capectg-parchment: #F6F1E4;
	--capectg-white: #FFFFFF;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Plus Jakarta Sans", Arial, sans-serif;
	position: fixed;
	z-index: 999999;
	right: 20px;
	bottom: 96px; /* Stacked above the site's existing WhatsApp floating button, not on top of it. */
}

/* Floating launcher bubble — the icon itself IS the button, no separate
   background circle behind it. */
.capectg-cb-launcher {
	width: 70px;
	height: 70px;
	border-radius: 50%;
	background: transparent !important;
	border: none !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	cursor: pointer;
	padding: 0;
	margin: 0;
	line-height: 0;
	box-shadow: 0 0 0 0 rgba(176, 141, 43, 0.55);
	transition: transform 0.15s ease;
	animation: capectg-cb-pulse 2.6s ease-out 1.5s 3;
}
.capectg-cb-launcher:hover {
	transform: scale(1.06);
}
.capectg-cb-launcher svg {
	width: 68px !important;
	height: 64px !important;
	display: block !important;
	flex-shrink: 0;
	visibility: visible !important;
	opacity: 1 !important;
	filter: drop-shadow(0 6px 14px rgba(20, 25, 43, 0.5));
}

@keyframes capectg-cb-pulse {
	0% { box-shadow: 0 0 0 0 rgba(176, 141, 43, 0.55); }
	70% { box-shadow: 0 0 0 14px rgba(176, 141, 43, 0); }
	100% { box-shadow: 0 0 0 0 rgba(176, 141, 43, 0); }
}

.capectg-cb-bubble-hint {
	position: absolute;
	right: 70px;
	bottom: 14px;
	background: var(--capectg-parchment);
	color: var(--capectg-navy);
	border: 1px solid var(--capectg-gold);
	padding: 8px 12px;
	border-radius: 10px;
	font-size: 14px;
	white-space: nowrap;
	box-shadow: 0 4px 10px rgba(20, 25, 43, 0.15);
	animation: capectg-cb-fade-in 0.3s ease 1.2s both;
}
@keyframes capectg-cb-fade-in {
	from { opacity: 0; transform: translateY(4px); }
	to { opacity: 1; transform: translateY(0); }
}

/* Chat panel */
.capectg-cb-panel {
	position: absolute;
	right: 0;
	bottom: 76px;
	width: 360px;
	max-width: calc(100vw - 32px);
	height: 520px;
	max-height: calc(100vh - 120px);
	background: var(--capectg-parchment);
	border-radius: 14px;
	border: 1px solid var(--capectg-gold);
	box-shadow: 0 16px 40px rgba(20, 25, 43, 0.28);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.capectg-cb-header {
	background: var(--capectg-navy);
	color: var(--capectg-parchment);
	padding: 14px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 3px solid var(--capectg-gold);
	flex-shrink: 0;
}
.capectg-cb-header-title {
	font-weight: 600;
	font-size: 16px;
	letter-spacing: 0.02em;
}
.capectg-cb-header-sub {
	font-size: 12px;
	color: var(--capectg-gold);
	margin-top: 2px;
}
.capectg-cb-close {
	background: transparent;
	border: none;
	color: var(--capectg-parchment);
	cursor: pointer;
	font-size: 20px;
	line-height: 1;
	padding: 2px 6px;
}
.capectg-cb-close:hover {
	color: var(--capectg-gold);
}

.capectg-cb-messages {
	flex: 1;
	overflow-y: auto;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.capectg-cb-msg {
	max-width: 84%;
	padding: 10px 13px;
	border-radius: 12px;
	font-size: 15.5px;
	line-height: 1.5;
	white-space: pre-wrap;
	word-wrap: break-word;
}
.capectg-cb-msg-bot {
	align-self: flex-start;
	background: var(--capectg-white);
	color: var(--capectg-navy);
	border: 1px solid rgba(20, 25, 43, 0.08);
	border-bottom-left-radius: 3px;
}
.capectg-cb-msg-user {
	align-self: flex-end;
	background: var(--capectg-navy);
	color: var(--capectg-parchment);
	border-bottom-right-radius: 3px;
}
.capectg-cb-msg-error {
	align-self: flex-start;
	background: #FBEAEA;
	color: #7A2020;
	border: 1px solid #E4B5B5;
}
.capectg-cb-typing {
	align-self: flex-start;
	font-size: 13px;
	color: var(--capectg-gold-ink);
	font-style: italic;
}

.capectg-cb-inputbar {
	display: flex;
	gap: 8px;
	padding: 10px;
	border-top: 1px solid rgba(20, 25, 43, 0.1);
	background: var(--capectg-white);
	flex-shrink: 0;
}
.capectg-cb-input {
	flex: 1;
	resize: none;
	border: 1px solid rgba(20, 25, 43, 0.18);
	border-radius: 8px;
	padding: 9px 11px;
	font-size: 16px; /* 16px+ prevents iOS Safari from auto-zooming on focus */
	font-family: inherit;
	max-height: 80px;
	color: var(--capectg-navy);
	background: var(--capectg-parchment);
}
.capectg-cb-input:focus {
	outline: 2px solid var(--capectg-gold);
	outline-offset: 1px;
}
.capectg-cb-send {
	background: var(--capectg-gold);
	color: var(--capectg-navy);
	border: none;
	border-radius: 8px;
	padding: 0 16px;
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	flex-shrink: 0;
}
.capectg-cb-send:hover {
	background: var(--capectg-gold-ink);
	color: var(--capectg-parchment);
}
.capectg-cb-send:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

@media (max-width: 420px) {
	#capectg-chatbot-root {
		right: 12px;
		bottom: 84px;
	}
	.capectg-cb-panel {
		width: calc(100vw - 24px);
		right: -8px;
	}
}
