/* Premium Chat Widget Design for Lodge AI Assistant */

.lodge-ai-chat-card {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 100%;
	height: 480px;
	background: #ffffff;
	border-radius: 16px;
	border: 1px solid rgba(226, 232, 240, 0.8);
	box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
	overflow: hidden;
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	margin-bottom: 2.5rem;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.lodge-ai-chat-card:hover {
	box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.12), 0 10px 10px -5px rgba(15, 23, 42, 0.06);
}

/* Header */
.lodge-ai-chat-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 1.25rem;
	background: #0f172a; /* Deep Navy theme matching Lodge */
	color: #ffffff;
	border-bottom: 1px solid #1e293b;
}

.lodge-ai-chat-header-info {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.lodge-ai-chat-avatar {
	font-size: 1.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	background: rgba(255, 255, 255, 0.15);
	border-radius: 50%;
	border: 1.5px solid rgba(217, 119, 6, 0.8); /* Gold border accent */
	box-shadow: 0 0 10px rgba(217, 119, 6, 0.3);
}

.lodge-ai-chat-title {
	margin: 0;
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0.3px;
	color: #ffffff;
	line-height: 1.2;
}

.lodge-ai-chat-status {
	font-size: 0.75rem;
	color: #94a3b8;
	font-weight: 500;
}

/* Body */
.lodge-ai-chat-body {
	display: flex;
	flex-direction: column;
	flex: 1;
	background: #f8fafc;
	overflow: hidden;
	position: relative;
}

.lodge-ai-chat-messages {
	flex: 1;
	padding: 1.25rem;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 1rem;
	scroll-behavior: smooth;
}

/* Message bubbles */
.lodge-ai-message {
	display: flex;
	flex-direction: column;
	max-width: 85%;
	animation: slideIn 0.25s ease-out forwards;
}

.lodge-ai-message-assistant {
	align-self: flex-start;
}

.lodge-ai-message-user {
	align-self: flex-end;
}

.lodge-ai-message-bubble {
	padding: 0.85rem 1.1rem;
	border-radius: 18px;
	font-size: 0.925rem;
	line-height: 1.5;
	word-wrap: break-word;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.lodge-ai-message-assistant .lodge-ai-message-bubble {
	background: #ffffff;
	color: #1e293b;
	border: 1px solid #e2e8f0;
	border-top-left-radius: 4px;
}

.lodge-ai-message-user .lodge-ai-message-bubble {
	background: #0f172a; /* Navy User Bubble */
	color: #ffffff;
	border-top-right-radius: 4px;
	border: 1px solid #0f172a;
}

/* Suggestion buttons */
.lodge-ai-chat-suggestions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	padding: 0.75rem 1.25rem;
	background: #f1f5f9;
	border-top: 1px solid #e2e8f0;
}

.lodge-ai-suggest-btn {
	background: #ffffff;
	border: 1px solid #cbd5e1;
	border-radius: 20px;
	padding: 0.4rem 0.85rem;
	font-size: 0.775rem;
	font-weight: 600;
	color: #334155;
	cursor: pointer;
	transition: all 0.2s ease;
	outline: none;
}

.lodge-ai-suggest-btn:hover {
	background: #0f172a;
	color: #ffffff;
	border-color: #0f172a;
	transform: translateY(-1px);
}

/* Footer Input Area */
.lodge-ai-chat-footer {
	padding: 0.85rem 1.25rem;
	background: #ffffff;
	border-top: 1px solid #e2e8f0;
}

.lodge-ai-chat-input-area {
	display: flex;
	gap: 0.75rem;
	align-items: center;
}

#lodge-ai-chat-input {
	flex: 1;
	border: 1.5px solid #cbd5e1;
	border-radius: 24px;
	padding: 0.65rem 1.1rem;
	font-size: 0.925rem;
	color: #0f172a;
	background: #f8fafc;
	transition: all 0.2s ease;
	outline: none;
}

#lodge-ai-chat-input:focus {
	border-color: #d97706; /* Gold accent on focus */
	background: #ffffff;
	box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}

#lodge-ai-chat-submit {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: #0f172a;
	color: #ffffff;
	border: none;
	cursor: pointer;
	transition: all 0.2s ease;
	flex-shrink: 0;
	outline: none;
}

#lodge-ai-chat-submit:hover {
	background: #d97706; /* Gold hover on submit button */
	color: #ffffff;
	transform: scale(1.05) rotate(5deg);
}

#lodge-ai-chat-submit:disabled {
	background: #cbd5e1;
	color: #94a3b8;
	cursor: not-allowed;
	transform: none;
}

/* Typing Indicator Animation */
.lodge-ai-typing-indicator {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	padding: 0.25rem 0.5rem;
}

.lodge-ai-typing-dot {
	width: 8px;
	height: 8px;
	background: #94a3b8;
	border-radius: 50%;
	opacity: 0.4;
	animation: bounce 1.4s infinite ease-in-out both;
}

.lodge-ai-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.lodge-ai-typing-dot:nth-child(2) { animation-delay: -0.16s; }

/* Retry / Warning UI */
.lodge-ai-message-error .lodge-ai-message-bubble {
	background: #fef2f2;
	color: #dc2626;
	border: 1px solid #fecaca;
	font-weight: 500;
	border-top-left-radius: 4px;
}

/* Animations */
@keyframes slideIn {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes bounce {
	0%, 80%, 100% { transform: scale(0); }
	40% { transform: scale(1.0); }
}

/* Markdown elements styling inside chatbot */
.lodge-ai-message-bubble p {
	margin: 0 0 0.5rem 0;
}
.lodge-ai-message-bubble p:last-child {
	margin-bottom: 0;
}
.lodge-ai-message-bubble ul, .lodge-ai-message-bubble ol {
	margin: 0.25rem 0 0.5rem 0;
	padding-left: 1.25rem;
}
.lodge-ai-message-bubble li {
	margin-bottom: 0.25rem;
}
.lodge-ai-message-bubble li:last-child {
	margin-bottom: 0;
}
.lodge-ai-message-bubble strong {
	font-weight: 700;
}

/* AI Disclaimer Text */
.lodge-ai-disclaimer {
	font-size: 0.7rem;
	color: #64748b;
	text-align: center;
	margin: 0.65rem 0 0 0;
	line-height: 1.35;
	font-weight: 500;
}

/* Banned card container styling */
.lodge-ai-banned-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 2.5rem 2rem;
	background: #ffffff;
	border-radius: 16px;
	border: 1px solid rgba(239, 68, 68, 0.25);
	box-shadow: 0 10px 25px -5px rgba(239, 68, 68, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
	max-width: 100%;
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	margin-bottom: 2.5rem;
	animation: slideIn 0.3s ease-out forwards;
}

.lodge-ai-banned-icon {
	font-size: 3.5rem;
	margin-bottom: 1.25rem;
	color: #ef4444;
	animation: pulse 2s infinite ease-in-out;
}

.lodge-ai-banned-card h3 {
	margin: 0 0 0.75rem 0;
	font-size: 1.25rem;
	font-weight: 700;
	color: #0f172a;
}

.lodge-ai-banned-card p {
	margin: 0;
	font-size: 0.95rem;
	color: #64748b;
	line-height: 1.5;
}

@keyframes pulse {
	0%, 100% { transform: scale(1); opacity: 1; }
	50% { transform: scale(1.1); opacity: 0.8; }
}
