/* --- Floating Button (WhatsApp style) --- */
.rubu-chat-btn {
	position: fixed;
	bottom: 24px;
	right: 24px;
	width: 60px;
	height: 60px;
	background: linear-gradient(145deg, #25D366, #128C7E);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2), 0 2px 5px rgba(0, 0, 0, 0.1);
	transition: all 0.25s ease-in-out;
	z-index: 9999;
	border: none;
	outline: none;
}
.rubu-chat-btn:hover {
	transform: scale(1.05);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}
.rubu-chat-btn svg {
	width: 32px;
	height: 32px;
	fill: white;
}

/* Chat Panel - Modern WhatsApp Web style */
.rubu-chat-panel {
	position: fixed;
	bottom: 100px;
	right: 24px;
	width: 380px;
	max-width: calc(100vw - 40px);
	height: 600px;
	max-height: calc(100vh - 120px);
	background-color: #fff;
	border-radius: 28px;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25), 0 5px 12px rgba(0, 0, 0, 0.15);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	z-index: 10000;
	transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.4, 1.1), opacity 0.2s;
	transform: scale(0.95);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}
.rubu-chat-panel.open {
	transform: scale(1);
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

/* Header */
.chat-header {
	background: #075E54;
	color: white;
	padding: 16px 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid rgba(0,0,0,0.1);
}
.header-info {
	display: flex;
	align-items: center;
	gap: 12px;
}
.avatar{
    width:40px;
    height:40px;
    border-radius:50%;
    overflow:hidden;
    flex-shrink:0;
}

.avatar img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}
.title-status h4 {
	font-size: 16px;
	font-weight: 600;
	margin-bottom: 2px;
}
.status {
	font-size: 12px;
	display: flex;
	align-items: center;
	gap: 5px;
	color: #DCF8C6;
}
.status-dot {
	width: 8px;
	height: 8px;
	background: #25D366;
	border-radius: 50%;
	display: inline-block;
	animation: pulse 1.5s infinite;
}
@keyframes pulse {
	0% { opacity: 0.4; transform: scale(0.8);}
	100% { opacity: 1; transform: scale(1);}
}
.close-chat {
	background: none;
	border: none;
	color: white;
	font-size: 26px;
	cursor: pointer;
	line-height: 1;
	padding: 0 8px;
	transition: 0.2s;
}
.close-chat:hover {
	opacity: 0.8;
}

/* Messages area */
.chat-messages {
	flex: 1;
	overflow-y: auto;
	padding: 16px 12px;
	background: #E5DDD5;
	display: flex;
	flex-direction: column;
	gap: 12px;
	scroll-behavior: smooth;
}
/* Custom scrollbar */
.chat-messages::-webkit-scrollbar {
	width: 5px;
}
.chat-messages::-webkit-scrollbar-track {
	background: #ddd;
}
.chat-messages::-webkit-scrollbar-thumb {
	background: #888;
	border-radius: 6px;
}

/* Bubbles */
.message {
	display: flex;
	max-width: 85%;
	animation: fadeSlideUp 0.2s ease;
}
@keyframes fadeSlideUp {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}
.message.bot {
	align-self: flex-start;
}
.message.user {
	align-self: flex-end;
}
.bubble {
	padding: 10px 14px;
	border-radius: 18px;
	font-size: 14px;
	line-height: 1.45;
	box-shadow: 0 1px 0.5px rgba(0,0,0,0.1);
	word-wrap: break-word;
}
.bot .bubble {
	background: white;
	border-top-left-radius: 4px;
	color: #111;
}
.user .bubble {
	background: #DCF8C6;
	border-bottom-right-radius: 4px;
	color: #075E54;
}
.message-time {
	font-size: 10px;
	margin-top: 4px;
	color: #6B6B6B;
	text-align: right;
	padding-right: 6px;
}

/* Typing indicator */
.typing-indicator {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 12px 14px;
	background: white;
	border-radius: 20px;
	width: fit-content;
	border-top-left-radius: 4px;
}
.typing-dot {
	width: 8px;
	height: 8px;
	background: #9b9b9b;
	border-radius: 50%;
	animation: typingBlink 1.4s infinite ease-in-out;
}
.typing-dot:nth-child(1) { animation-delay: 0s; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBlink {
	0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
	30% { transform: translateY(-5px); opacity: 1; }
}

/* Input area */
.chat-input-area {
	background: #F0F0F0;
	padding: 12px 16px;
	display: flex;
	align-items: center;
	gap: 10px;
	border-top: 1px solid #ddd;
}
.chat-input-area input {
	flex: 1;
	border: none;
	background: white;
	padding: 12px 16px;
	border-radius: 30px;
	outline: none;
	font-size: 14px;
	font-family: inherit;
	transition: 0.2s;
}
.chat-input-area input:focus {
	box-shadow: 0 0 0 2px #25D36680;
}
.send-btn {
	background: #25D366;
	border: none;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: 0.2s;
}
.send-btn:hover {
	background: #128C7E;
}
.send-btn svg {
	width: 20px;
	height: 20px;
	fill: white;
}

/* Mobile responsiveness */
@media (max-width: 500px) {
	.rubu-chat-panel {
		bottom: 80px;
		right: 12px;
		left: 12px;
		width: auto;
		max-width: none;
		height: 70vh;
	}
	.rubu-chat-btn {
		bottom: 18px;
		right: 18px;
		width: 55px;
		height: 55px;
	}
}