/* ── Chat Widget General Styles ───────────────────────── */
.rrc-ai-chat-widget {
	position: fixed;
	bottom: 30px;
	right: 30px;
	z-index: 999999;
	font-family: 'Inter Tight', 'Inter', sans-serif;
}

/* Tooltip Bubble */
.rrc-ai-chat-tooltip {
	position: absolute;
	right: 75px;
	top: 50%;
	transform: translateY(-50%);
	background: #ffffff;
	color: #0f172a;
	padding: 10px 16px;
	border-radius: 14px;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
	border: 1px solid #e2e8f0;
	font-size: 13px;
	font-weight: 700;
	white-space: nowrap;
	opacity: 1;
	pointer-events: none;
	transition: all 0.3s ease;
	animation: rrcBubbleBounce 3s infinite ease-in-out;
}

.rrc-ai-chat-tooltip::after {
	content: '';
	position: absolute;
	right: -6px;
	top: 50%;
	transform: translateY(-50%) rotate(45deg);
	width: 12px;
	height: 12px;
	background: #ffffff;
	border-right: 1px solid #e2e8f0;
	border-top: 1px solid #e2e8f0;
}

/* Hide tooltip when chat window is expanded */
.rrc-ai-chat-widget:not(.collapsed) .rrc-ai-chat-tooltip {
	opacity: 0;
	transform: translateY(-50%) scale(0.8);
}

@keyframes rrcBubbleBounce {
	0%, 100% { transform: translateY(-50%) translateX(0); }
	50% { transform: translateY(-50%) translateX(-6px); }
}

/* ── Trigger Button ───────────────────────────────────── */
.rrc-ai-chat-trigger {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: #E8272C;
	box-shadow: 0 10px 25px rgba(232, 39, 44, 0.3);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	position: relative;
}
.rrc-ai-chat-trigger:hover {
	transform: scale(1.1);
}
.rrc-ai-chat-trigger-avatar {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid #ffffff;
}
.rrc-ai-chat-trigger-badge {
	position: absolute;
	top: 2px;
	right: 2px;
	width: 12px;
	height: 12px;
	background: #22c55e;
	border: 2px solid #ffffff;
	border-radius: 50%;
}

/* ── Chat Window ──────────────────────────────────────── */
.rrc-ai-chat-window {
	position: absolute;
	bottom: 80px;
	right: 0;
	width: 400px;
	height: 600px;
	background: #ffffff;
	border-radius: 24px;
	box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
	border: 1px solid #e2e8f0;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	opacity: 1;
	transform: translateY(0);
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.rrc-ai-chat-widget.collapsed .rrc-ai-chat-window {
	opacity: 0;
	transform: translateY(20px);
	pointer-events: none;
}

/* Header */
.rrc-ai-chat-header {
	background: #18181b;
	color: #ffffff;
	padding: 16px 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.rrc-ai-chat-header-info {
	display: flex;
	align-items: center;
	gap: 12px;
}
.rrc-ai-chat-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
	border: 1.5px solid #ffffff;
}
.rrc-ai-chat-name {
	font-size: 16px;
	font-weight: 800;
	margin: 0;
}
.rrc-ai-chat-status {
	font-size: 11px;
	color: #22c55e;
	display: flex;
	align-items: center;
	gap: 4px;
}
.rrc-ai-chat-close {
	background: none;
	border: none;
	color: #ffffff;
	font-size: 24px;
	cursor: pointer;
	opacity: 0.7;
	transition: opacity 0.2s;
}
.rrc-ai-chat-close:hover {
	opacity: 1;
}

/* Message Area */
.rrc-ai-chat-messages {
	flex: 1;
	padding: 20px;
	overflow-y: auto;
	background: #f8fafc;
	display: flex;
	flex-direction: column;
	gap: 15px;
}
.rrc-ai-message {
	max-width: 80%;
	padding: 12px 16px;
	border-radius: 16px;
	font-size: 13.5px;
	line-height: 1.5;
}
.rrc-ai-message.assistant {
	background: #ffffff;
	color: #1e293b;
	align-self: flex-start;
	border-bottom-left-radius: 4px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
	border: 1px solid #f1f5f9;
}
.rrc-ai-message.user {
	background: #18181b;
	color: #ffffff;
	align-self: flex-end;
	border-bottom-right-radius: 4px;
}

/* Quick Buttons */
.rrc-ai-chat-quick-buttons {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	padding: 10px 20px;
	background: #f8fafc;
}
.rrc-ai-quick-btn {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 20px;
	padding: 6px 14px;
	font-size: 12px;
	color: #475569;
	cursor: pointer;
	font-weight: 600;
	transition: all 0.2s ease;
}
.rrc-ai-quick-btn:hover {
	background: #e8272c;
	color: #ffffff;
	border-color: #e8272c;
}

/* Input Form */
.rrc-ai-chat-input-area {
	border-top: 1px solid #e2e8f0;
	background: #ffffff;
}
#rrc-ai-chat-form {
	display: flex;
	align-items: center;
	padding: 12px 20px;
	gap: 10px;
}
#rrc-ai-chat-input {
	flex: 1;
	border: none;
	font-size: 14px;
	outline: none;
	color: #0f172a;
}
.rrc-ai-chat-send-btn {
	background: none;
	border: none;
	color: #e8272c;
	cursor: pointer;
	padding: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s;
}
.rrc-ai-chat-send-btn svg {
	width: 20px;
	height: 20px;
}
.rrc-ai-chat-send-btn:hover {
	transform: scale(1.1);
}

/* ── Vehicle Recommendation Cards ─────────────────────── */
.rrc-ai-vehicle-cards {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: 8px;
}
.rrc-ai-vehicle-card {
	background: #ffffff;
	border-radius: 12px;
	border: 1px solid #e2e8f0;
	overflow: hidden;
	box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}
.rrc-ai-vehicle-img {
	width: 100%;
	height: 120px;
	object-fit: cover;
}
.rrc-ai-vehicle-info {
	padding: 12px;
}
.rrc-ai-vehicle-title {
	font-size: 14px;
	font-weight: 800;
	margin: 0 0 4px 0;
	color: #0f172a;
}
.rrc-ai-vehicle-price {
	font-size: 13px;
	color: #e8272c;
	font-weight: 800;
	margin-bottom: 8px;
}
.rrc-ai-vehicle-reserve-btn {
	width: 100%;
	background: #18181b;
	color: #ffffff;
	border: none;
	padding: 8px;
	font-size: 12px;
	font-weight: 700;
	border-radius: 6px;
	cursor: pointer;
	transition: background 0.2s;
}
.rrc-ai-vehicle-reserve-btn:hover {
	background: #e8272c;
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 480px) {
	.rrc-ai-chat-window {
		width: calc(100vw - 40px);
		height: calc(100vh - 120px);
		right: -10px;
	}
}
