/* ============================================================
   Chat Widget
   ============================================================ */

.chat-widget {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 999;
	font-family: var(--font-primary);
}

.chat-toggle {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--color-primary);
	color: var(--color-white);
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: var(--shadow-lg);
	transition: all var(--transition-speed) var(--transition-ease);
	position: relative;
}

.chat-toggle:hover {
	background: var(--color-primary-hover);
	transform: scale(1.05);
}

.chat-icon-close {
	display: none;
}

.chat-widget.open .chat-icon-open {
	display: none;
}

.chat-widget.open .chat-icon-close {
	display: block;
}

/* --- Chat Window --- */
.chat-window {
	position: absolute;
	bottom: 68px;
	right: 0;
	width: 360px;
	max-height: 500px;
	background: var(--color-white);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-lg);
	overflow: hidden;
	display: none;
	flex-direction: column;
	border: 1px solid var(--color-border);
}

.chat-widget.open .chat-window {
	display: flex;
}

.chat-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 20px;
	background: var(--color-bg-dark);
	color: var(--color-white);
}

.chat-header-title {
	font-size: 15px;
	font-weight: 600;
}

.chat-close {
	background: none;
	border: none;
	color: rgba(255, 255, 255, 0.7);
	cursor: pointer;
	padding: 4px;
}

.chat-close:hover {
	color: var(--color-white);
}

.chat-messages {
	flex: 1;
	padding: 16px;
	overflow-y: auto;
	max-height: 280px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	background: #fafafa;
}

.chat-message {
	display: flex;
}

.chat-message-bot {
	justify-content: flex-start;
}

.chat-message-user {
	justify-content: flex-end;
}

.chat-message-text {
	max-width: 80%;
	padding: 10px 14px;
	border-radius: 12px;
	font-size: 14px;
	line-height: 1.5;
}

.chat-message-bot .chat-message-text {
	background: var(--color-white);
	border: 1px solid var(--color-border);
	color: var(--color-text);
	border-bottom-left-radius: 4px;
}

.chat-message-user .chat-message-text {
	background: var(--color-primary);
	color: var(--color-white);
	border-bottom-right-radius: 4px;
}

.chat-input-area {
	display: flex;
	gap: 8px;
	padding: 12px 16px;
	border-top: 1px solid var(--color-border);
	background: var(--color-white);
}

.chat-input {
	flex: 1;
	padding: 10px 14px;
	font-family: var(--font-primary);
	font-size: 14px;
	border: 1px solid var(--color-border);
	border-radius: 20px;
	outline: none;
	transition: border-color var(--transition-speed) var(--transition-ease);
}

.chat-input:focus {
	border-color: var(--color-primary);
}

.chat-send {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--color-primary);
	color: var(--color-white);
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: background var(--transition-speed) var(--transition-ease);
}

.chat-send:hover {
	background: var(--color-primary-hover);
}

.chat-quick-actions {
	display: flex;
	gap: 6px;
	padding: 8px 12px 12px;
	flex-wrap: wrap;
}

.chat-quick-btn {
	padding: 6px 12px;
	font-family: var(--font-primary);
	font-size: 12px;
	color: var(--color-primary);
	background: var(--color-primary-light);
	border: 1px solid rgba(255, 94, 20, 0.2);
	border-radius: 16px;
	cursor: pointer;
	transition: all var(--transition-speed) var(--transition-ease);
}

.chat-quick-btn:hover {
	background: var(--color-primary);
	color: var(--color-white);
}
