/* Realtor AI Chat - Vanilla CSS */

:root {
	--raic-primary: #0073aa;
	--raic-bg: #ffffff;
	--raic-text: #333333;
	--raic-bubble-bg: #f1f1f1;
	--raic-user-bg: #0073aa;
	--raic-user-text: #ffffff;
	--raic-shadow: 0 4px 12px rgba(0,0,0,0.15);
	--raic-radius: 12px;
}

#raic-chat-widget {
	position: fixed;
	bottom: 20px;
	right: 20px;
	z-index: 99999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

#raic-chat-toggle {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: var(--raic-primary);
	color: white;
	border: none;
	box-shadow: var(--raic-shadow);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s ease;
}

#raic-chat-toggle:hover {
	transform: scale(1.05);
}

#raic-chat-panel {
	display: none;
	flex-direction: column;
	position: absolute;
	bottom: 80px;
	right: 0;
	width: 350px;
	height: 500px;
	max-height: calc(100vh - 100px);
	background: var(--raic-bg);
	border-radius: var(--raic-radius);
	box-shadow: var(--raic-shadow);
	overflow: hidden;
}

#raic-chat-widget.is-open #raic-chat-panel {
	display: flex;
}

.raic-chat-header {
	background: var(--raic-primary);
	color: white;
	padding: 15px;
	font-weight: bold;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.raic-chat-close {
	background: none;
	border: none;
	color: white;
	cursor: pointer;
	font-size: 1.2rem;
}

.raic-chat-messages {
	flex: 1;
	overflow-y: auto;
	padding: 15px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.raic-msg {
	max-width: 80%;
	padding: 10px 15px;
	border-radius: var(--raic-radius);
	word-wrap: break-word;
}

.raic-msg.system {
	background: var(--raic-bubble-bg);
	color: var(--raic-text);
	align-self: flex-start;
	border-bottom-left-radius: 4px;
}

.raic-msg.user {
	background: var(--raic-user-bg);
	color: var(--raic-user-text);
	align-self: flex-end;
	border-bottom-right-radius: 4px;
}

.raic-chat-input-area {
	border-top: 1px solid #eee;
	padding: 10px;
	display: flex;
	gap: 10px;
}

.raic-chat-input-area input {
	flex: 1;
	padding: 10px;
	border: 1px solid #ccc;
	border-radius: 20px;
	outline: none;
}

.raic-chat-input-area button {
	background: var(--raic-primary);
	color: white;
	border: none;
	border-radius: 50%;
	width: 40px;
	height: 40px;
	cursor: pointer;
}

/* Listings Cards */
.raic-listing-card {
	border: 1px solid #eee;
	border-radius: 8px;
	overflow: hidden;
	margin-top: 10px;
	font-size: 0.9em;
}

.raic-listing-card img {
	width: 100%;
	height: 120px;
	object-fit: cover;
}

.raic-listing-info {
	padding: 10px;
}

.raic-listing-info h4 {
	margin: 0 0 5px 0;
	font-size: 1em;
}

.raic-listing-price {
	font-weight: bold;
	color: var(--raic-primary);
	margin-bottom: 5px;
}

.raic-book-btn {
	display: block;
	width: 100%;
	text-align: center;
	background: var(--raic-primary);
	color: white;
	border: none;
	padding: 8px;
	border-radius: 4px;
	cursor: pointer;
	margin-top: 5px;
}

/* Lead Form */
.raic-lead-form {
	background: var(--raic-bubble-bg);
	padding: 15px;
	border-radius: var(--raic-radius);
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 10px;
}

.raic-lead-form input {
	padding: 8px;
	border: 1px solid #ccc;
	border-radius: 4px;
}

@media (max-width: 480px) {
	#raic-chat-panel {
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		max-height: 100vh;
		border-radius: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	#raic-chat-toggle {
		transition: none;
	}
}
