/* Reset & Scoped Styles for RabComms AI Chat Widget */
#rc-ai-chat-root {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.5;
	color: #0F172A;
}

/* Floating Trigger Button (Deep Blue Pill #0E7AA8) */
#rc-chat-toggle-btn {
	height: 50px;
	padding: 0 18px;
	border-radius: 25px;
	background: #0E7AA8;
	color: #FFFFFF;
	border: none;
	cursor: pointer;
	box-shadow: 0 4px 20px rgba(14, 122, 168, 0.45);
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s;
	font-weight: 700;
	font-size: 14px;
	letter-spacing: 0.2px;
}
#rc-chat-toggle-btn:hover {
	transform: scale(1.04);
	background: #09597A;
}

.rc-btn-icon-open {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}
.rc-btn-label {
	font-weight: 700;
	color: #FFFFFF;
	font-size: 14px;
}

/* Pulsing Green Online Indicator (#25D366) */
.rc-chat-online-badge {
	position: absolute;
	top: -2px;
	right: -2px;
	width: 14px;
	height: 14px;
	background: #25D366;
	border: 2.5px solid #FFFFFF;
	border-radius: 50%;
	box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
	animation: rcPulseRing 2s infinite;
}
@keyframes rcPulseRing {
	0% {
		box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
	}
	70% {
		box-shadow: 0 0 0 8px rgba(37, 211, 102, 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
	}
}

.rc-btn-icon-close {
	font-size: 20px;
	font-weight: bold;
	line-height: 1;
}

/* Chat Window Frame */
#rc-chat-window {
	position: absolute;
	bottom: 66px;
	right: 0;
	width: 385px;
	max-width: calc(100vw - 32px);
	height: 600px;
	max-height: calc(100vh - 100px);
	background: #FFFFFF;
	border-radius: 16px;
	box-shadow: 0 16px 42px rgba(15, 23, 42, 0.22);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid rgba(226, 232, 240, 0.95);
	animation: rcSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes rcSlideUp {
	from { opacity: 0; transform: translateY(16px) scale(0.96); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Branded Gradient Header (#2E3F56 to #0E7AA8) */
.rc-chat-header {
	background: linear-gradient(135deg, #2E3F56 0%, #0E7AA8 100%);
	color: #FFFFFF;
	padding: 14px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.rc-header-info {
	display: flex;
	align-items: center;
	gap: 12px;
}
.rc-avatar-wrap {
	position: relative;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.15);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #FFFFFF;
	border: 1.5px solid rgba(255, 255, 255, 0.4);
}
.rc-status-dot {
	position: absolute;
	bottom: 0;
	right: 0;
	width: 10px;
	height: 10px;
	background: #25D366;
	border-radius: 50%;
	border: 2px solid #0E7AA8;
}
.rc-header-title {
	font-weight: 700;
	font-size: 15px;
	line-height: 1.2;
}
.rc-header-sub {
	font-size: 11px;
	opacity: 0.9;
	margin-top: 2px;
}
#rc-chat-close-btn {
	background: transparent;
	border: none;
	color: #FFFFFF;
	font-size: 18px;
	cursor: pointer;
	padding: 4px 8px;
	border-radius: 4px;
	opacity: 0.85;
}
#rc-chat-close-btn:hover {
	opacity: 1;
	background: rgba(255, 255, 255, 0.15);
}

/* Chat Messages Container */
#rc-chat-messages {
	flex: 1;
	padding: 14px;
	overflow-y: auto;
	background: #F8FAFC;
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.rc-msg {
	display: flex;
	flex-direction: column;
	max-width: 88%;
}
.rc-msg-bot {
	align-self: flex-start;
}
.rc-msg-user {
	align-self: flex-end;
}
.rc-msg-bubble {
	padding: 11px 14px;
	border-radius: 12px;
	font-size: 13.5px;
	line-height: 1.5;
	word-break: break-word;
}
.rc-msg-bot .rc-msg-bubble {
	background: #FFFFFF;
	color: #1E293B;
	border-top-left-radius: 2px;
	border: 1px solid #E2E8F0;
	box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.rc-msg-user .rc-msg-bubble {
	background: #0E7AA8;
	color: #FFFFFF;
	border-top-right-radius: 2px;
}
.rc-msg-time {
	font-size: 10px;
	color: #94A3B8;
	margin-top: 4px;
	padding: 0 4px;
}
.rc-msg-user .rc-msg-time {
	text-align: right;
}

/* Service-First Tap Funnel (Clean Interactive Cards) */
.rc-services-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 4px;
	margin-bottom: 4px;
	width: 100%;
}
.rc-service-option-btn {
	background: #FFFFFF;
	color: #1E293B;
	border: 1px solid #CBD5E1;
	border-left: 4px solid #0E7AA8;
	border-radius: 8px;
	padding: 11px 14px;
	font-size: 13px;
	font-weight: 600;
	text-align: left;
	cursor: pointer;
	transition: all 0.15s ease;
	display: block;
	width: 100%;
	box-sizing: border-box;
	box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.rc-service-option-btn:hover {
	background: #F0F9FF;
	border-color: #0E7AA8;
	transform: translateX(2px);
}
.rc-services-list.rc-selected .rc-service-option-btn {
	pointer-events: none;
	opacity: 0.5;
}
.rc-services-list.rc-selected .rc-service-option-btn.rc-active {
	opacity: 1;
	background: #F0F9FF;
	border-color: #0E7AA8;
	font-weight: 700;
}

/* Bold Green WhatsApp CTA Button (Strict Specification 3) */
.rc-wa-cta-btn {
	background-color: #25D366 !important;
	color: #FFFFFF !important;
	font-weight: 800 !important;
	font-size: 0.95rem;
	text-align: center;
	display: block;
	padding: 12px 18px;
	border-radius: 8px;
	text-decoration: none !important;
	margin: 10px 0 6px;
	box-shadow: 0 3px 10px rgba(37, 211, 102, 0.35);
	transition: background-color 0.2s, transform 0.15s, box-shadow 0.2s;
	width: 100%;
	box-sizing: border-box;
}
.rc-wa-cta-btn:hover {
	background-color: #1EBE5D !important;
	color: #FFFFFF !important;
	transform: translateY(-1px);
	box-shadow: 0 4px 14px rgba(37, 211, 102, 0.45);
}

/* Typing Indicator */
.rc-typing-indicator {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 8px 12px;
	background: #FFFFFF;
	border: 1px solid #E2E8F0;
	border-radius: 12px;
	width: fit-content;
}
.rc-typing-dot {
	width: 6px;
	height: 6px;
	background: #94A3B8;
	border-radius: 50%;
	animation: rcTypingBounce 1.4s infinite ease-in-out both;
}
.rc-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.rc-typing-dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes rcTypingBounce {
	0%, 80%, 100% { transform: scale(0); }
	40% { transform: scale(1); }
}

/* Input Form */
#rc-chat-form {
	padding: 12px 14px;
	background: #FFFFFF;
	border-top: 1px solid #E2E8F0;
}
.rc-input-wrap {
	display: flex;
	gap: 8px;
	align-items: center;
}
#rc-chat-input {
	flex: 1;
	border: 1.5px solid #CBD5E1;
	border-radius: 20px;
	padding: 9px 14px;
	font-size: 13.5px;
	outline: none;
	background: #FFFFFF;
	color: #0F172A;
}
#rc-chat-input:focus {
	border-color: #0E7AA8;
	box-shadow: 0 0 0 2px rgba(14, 122, 168, 0.15);
}
#rc-chat-send-btn {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: #D64532;
	color: #FFFFFF;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: background-color 0.2s, transform 0.15s;
}
#rc-chat-send-btn:hover {
	background: #B93827;
	transform: scale(1.05);
}
.rc-input-footer {
	text-align: center;
	font-size: 10px;
	color: #94A3B8;
	margin-top: 6px;
}

/* Mobile responsive */
@media (max-width: 480px) {
	#rc-ai-chat-root {
		bottom: 16px;
		right: 16px;
	}
	#rc-chat-window {
		position: fixed;
		bottom: 0;
		right: 0;
		left: 0;
		width: 100vw;
		max-width: 100vw;
		height: 90vh;
		max-height: 90vh;
		border-radius: 16px 16px 0 0;
	}
}
