/* Aqar AI Chat Widget */
.aqar-chat-root { font-family: 'Tajawal', sans-serif; }

.aqar-chat-toggle {
	position: fixed;
	bottom: 24px;
	inset-inline-start: 24px;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: linear-gradient(135deg, #006C35 0%, #C9A35D 100%);
	color: #fff;
	border: 0;
	cursor: pointer;
	box-shadow: 0 8px 24px rgba(0,0,0,.2);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 28px;
	z-index: 9998;
	transition: transform .2s ease, box-shadow .2s ease;
	animation: aqar-chat-pulse 2.5s ease-in-out infinite;
}
.aqar-chat-toggle:hover { transform: scale(1.08); box-shadow: 0 12px 28px rgba(0,0,0,.25); }
.aqar-chat-toggle__logo { width: 44px; height: 44px; object-fit: contain; border-radius: 50%; background: #fff; padding: 4px; }
.aqar-chat-header__avatar img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; background: #fff; padding: 3px; }
.aqar-chat-toggle__badge {
	position: absolute; top: -4px; inset-inline-end: -4px;
	width: 22px; height: 22px; border-radius: 50%; background: #FF3B30; color: #fff;
	font-size: 12px; display: flex; align-items: center; justify-content: center; font-weight: 700;
}
@keyframes aqar-chat-pulse {
	0%, 100% { box-shadow: 0 8px 24px rgba(0,0,0,.2), 0 0 0 0 rgba(0,108,53,.45); }
	50%      { box-shadow: 0 8px 24px rgba(0,0,0,.2), 0 0 0 14px rgba(0,108,53,0); }
}

.aqar-chat-window {
	position: fixed;
	bottom: 100px;
	inset-inline-start: 24px;
	width: 380px;
	max-width: calc(100vw - 32px);
	height: 600px;
	max-height: calc(100vh - 130px);
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 20px 60px rgba(0,0,0,.25);
	display: none;
	flex-direction: column;
	overflow: hidden;
	z-index: 9999;
	font-size: 15px;
	color: #1F2937;
}
.aqar-chat-window.is-open { display: flex; animation: aqar-chat-in .25s ease; }
@keyframes aqar-chat-in {
	from { opacity: 0; transform: translateY(20px); }
	to   { opacity: 1; transform: translateY(0); }
}

.aqar-chat-header {
	padding: 16px 18px;
	background: linear-gradient(135deg, #006C35, #00582B);
	color: #fff;
	display: flex; align-items: center; gap: 12px;
}
.aqar-chat-header__avatar {
	width: 40px; height: 40px; border-radius: 50%;
	background: rgba(255,255,255,.2);
	display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.aqar-chat-header__info { flex: 1; }
.aqar-chat-header__title { font-weight: 700; line-height: 1.2; }
.aqar-chat-header__sub { font-size: 12px; opacity: .85; display: flex; align-items: center; gap: 6px; }
.aqar-chat-header__sub::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #4ADE80; box-shadow: 0 0 0 2px rgba(74,222,128,.3); }
.aqar-chat-header__close {
	background: transparent; border: 0; color: #fff; font-size: 22px; cursor: pointer; padding: 4px 8px; border-radius: 6px;
}
.aqar-chat-header__close:hover { background: rgba(255,255,255,.12); }

.aqar-chat-messages {
	flex: 1; overflow-y: auto; padding: 18px;
	background: #F8F4EC;
	display: flex; flex-direction: column; gap: 12px;
}
.aqar-chat-messages::-webkit-scrollbar { width: 6px; }
.aqar-chat-messages::-webkit-scrollbar-thumb { background: #D1CCC0; border-radius: 3px; }

.aqar-chat-msg {
	max-width: 85%;
	padding: 10px 14px;
	border-radius: 16px;
	line-height: 1.5;
	white-space: pre-wrap;
	word-wrap: break-word;
}
.aqar-chat-msg--bot {
	background: #fff;
	border-bottom-left-radius: 4px;
	align-self: flex-start;
	box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.aqar-chat-msg--user {
	background: #006C35;
	color: #fff;
	border-bottom-right-radius: 4px;
	align-self: flex-end;
}
.aqar-chat-msg--system {
	background: #FEF3C7;
	color: #92400E;
	text-align: center;
	font-size: 13px;
	align-self: center;
	max-width: 100%;
}
.aqar-chat-msg--typing { background: #fff; padding: 14px 16px; }
.aqar-typing-dots { display: inline-flex; gap: 3px; }
.aqar-typing-dots span { width: 7px; height: 7px; background: #888; border-radius: 50%; animation: aqar-typing 1.2s infinite; }
.aqar-typing-dots span:nth-child(2) { animation-delay: .2s; }
.aqar-typing-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes aqar-typing {
	0%, 60%, 100% { transform: translateY(0); opacity: .4; }
	30%           { transform: translateY(-6px); opacity: 1; }
}

/* Property cards inside chat */
.aqar-chat-props {
	align-self: flex-start;
	display: flex; flex-direction: column; gap: 8px;
	max-width: 100%; width: 100%;
}
.aqar-chat-prop {
	background: #fff;
	border: 1.5px solid #E5E0D5;
	border-radius: 12px;
	padding: 10px;
	display: flex; gap: 10px;
	text-decoration: none;
	color: inherit;
	transition: all .15s;
}
.aqar-chat-prop:hover { border-color: #006C35; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.aqar-chat-prop__img { flex: 0 0 80px; height: 80px; border-radius: 8px; object-fit: cover; background: #f2f2f2; }
.aqar-chat-prop__body { flex: 1; min-width: 0; }
.aqar-chat-prop__title { font-weight: 700; font-size: 14px; margin: 0 0 4px; color: #1F2937; line-height: 1.3; }
.aqar-chat-prop__meta { font-size: 12px; color: #6B7280; }
.aqar-chat-prop__price { color: #006C35; font-weight: 800; font-size: 14px; margin-top: 4px; }

.aqar-chat-input-wrap {
	padding: 12px; background: #fff; border-top: 1px solid #E5E0D5;
	display: flex; gap: 8px; align-items: end;
}
.aqar-chat-input {
	flex: 1;
	border: 1.5px solid #E5E0D5;
	border-radius: 20px;
	padding: 10px 14px;
	font-family: inherit;
	font-size: 14px;
	resize: none;
	max-height: 120px;
	min-height: 40px;
	outline: none;
	transition: border-color .15s;
}
.aqar-chat-input:focus { border-color: #006C35; }
.aqar-chat-send {
	background: #006C35; color: #fff; border: 0;
	width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
	display: flex; align-items: center; justify-content: center; font-size: 16px;
	flex-shrink: 0;
}
.aqar-chat-send:disabled { opacity: .5; cursor: not-allowed; }
.aqar-chat-send:hover:not(:disabled) { background: #00582B; }

.aqar-chat-quick {
	padding: 8px 12px 0; display: flex; gap: 6px; flex-wrap: wrap;
	border-top: 1px solid #E5E0D5;
}
.aqar-chat-quick__btn {
	background: #F8F4EC; border: 1px solid #E5E0D5; border-radius: 16px;
	padding: 6px 12px; font-size: 12px; cursor: pointer; color: #1F2937;
	transition: all .15s;
}
.aqar-chat-quick__btn:hover { background: #006C35; color: #fff; border-color: #006C35; }

.aqar-chat-footer {
	padding: 6px 12px; background: #F8F4EC; text-align: center;
	font-size: 11px; color: #6B7280;
}
.aqar-chat-footer a { color: #006C35; font-weight: 600; }

/* Lead success state */
.aqar-chat-success {
	background: #DCFCE7; color: #166534; padding: 12px; border-radius: 12px; text-align: center; align-self: center; max-width: 100%; font-size: 14px;
}

@media (max-width: 480px) {
	.aqar-chat-window {
		inset-inline-start: 0; inset-inline-end: 0; bottom: 0;
		width: 100%; max-width: 100%; height: 100vh; max-height: 100vh; border-radius: 0;
	}
	.aqar-chat-toggle { bottom: 16px; inset-inline-start: 16px; }
}
