/* Isolated Genie Chat Widget Styles — no conflicts with the host page CSS */
#genie-widget-container {
	all: initial;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

#genie-widget-container * {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

/* Chat button */
#genie-widget-container .genie-chat-button {
	all: initial;
	font-family: inherit;
	position: fixed;
	bottom: 20px;
	right: 20px;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: linear-gradient(135deg, #FF3621 0%, #E91E63 100%);
	border: none;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(0,0,0,0.3);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 999999;
	transition: transform 0.2s;
}

#genie-widget-container .genie-chat-button:hover {
	transform: scale(1.1);
}

#genie-widget-container .genie-chat-button svg {
	width: 30px;
	height: 30px;
	fill: white;
	display: block;
}

/* Chat popup */
#genie-widget-container .genie-chat-popup {
	position: fixed;
	bottom: 90px;
	right: 20px;
	width: 400px;
	height: 600px;
	background: white;
	border-radius: 12px;
	box-shadow: 0 8px 32px rgba(0,0,0,0.3);
	display: none;
	flex-direction: column;
	z-index: 999998;
	overflow: hidden;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

#genie-widget-container .genie-chat-popup.genie-active {
	display: flex;
}

/* Header */
#genie-widget-container .genie-chat-header {
	background: linear-gradient(135deg, #FF3621 0%, #E91E63 100%);
	color: white;
	padding: 20px;
	font-weight: 600;
	font-size: 18px;
	line-height: 1.4;
	flex-shrink: 0;
}

/* Messages area */
#genie-widget-container .genie-chat-messages {
	flex: 1 1 auto;
	padding: 20px;
	overflow-y: auto;
	overflow-x: hidden;
	background: #f5f5f5;
}

#genie-widget-container .genie-message {
	margin-bottom: 16px;
	animation: genie-fadeIn 0.3s;
}

@keyframes genie-fadeIn {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: translateY(0); }
}

#genie-widget-container .genie-message.genie-user {
	text-align: right;
}

#genie-widget-container .genie-message-content {
	display: inline-block;
	padding: 12px 16px;
	border-radius: 18px;
	max-width: 80%;
	word-wrap: break-word;
	font-size: 14px;
	line-height: 1.5;
}

#genie-widget-container .genie-message.genie-user .genie-message-content {
	background: #FF3621;
	color: white;
}

#genie-widget-container .genie-message.genie-assistant .genie-message-content {
	background: white;
	color: #333;
	text-align: left;
}

#genie-widget-container .genie-message.genie-system .genie-message-content {
	background: #e3f2fd;
	color: #1976d2;
	font-size: 14px;
}

#genie-widget-container .genie-message.genie-error .genie-message-content {
	background: #ffebee;
	color: #c62828;
	font-size: 13px;
}

/* Input area */
#genie-widget-container .genie-chat-input-area {
	padding: 16px;
	background: white;
	border-top: 1px solid #e0e0e0;
	display: flex;
	gap: 8px;
	flex-shrink: 0;
	align-items: center;
}

#genie-widget-container .genie-chat-input {
	all: initial;
	font-family: inherit;
	flex: 1 1 auto;
	padding: 12px;
	border: 1px solid #e0e0e0;
	border-radius: 24px;
	outline: none;
	font-size: 14px;
	color: #333;
	background: white;
}

#genie-widget-container .genie-chat-input:focus {
	border-color: #FF3621;
}

#genie-widget-container .genie-send-button {
	all: initial;
	font-family: inherit;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: #FF3621;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s;
	flex-shrink: 0;
}

#genie-widget-container .genie-send-button:hover:not(:disabled) {
	background: #E91E63;
}

#genie-widget-container .genie-send-button:disabled {
	background: #ccc;
	cursor: not-allowed;
}

#genie-widget-container .genie-send-button svg {
	width: 20px;
	height: 20px;
	fill: white;
	display: block;
}

/* Loading indicator */
#genie-widget-container .genie-loading {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #FF3621;
	animation: genie-pulse 1.5s infinite;
}

@keyframes genie-pulse {
	0%, 100% { opacity: 0.3; }
	50% { opacity: 1; }
}

/* Mobile responsive */
@media (max-width: 480px) {
	#genie-widget-container .genie-chat-popup {
		width: calc(100% - 40px);
		height: calc(100% - 110px);
		bottom: 90px;
		right: 20px;
	}
}
