/* ----------------------------------------------------------------------------------------
* WhatsApp-style Chat Widget — floating buttons + auto-reply popup
* ---------------------------------------------------------------------------------------- */

.chat-widget-buttons{
	position: fixed;
	left: 20px;
	bottom: 20px;
	z-index: 9998;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.chat-fab{
	width: 58px;
	height: 58px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #FFFFFF;
	font-size: 26px;
	box-shadow: 0 6px 20px rgba(0,0,0,0.25);
	border: none;
	cursor: pointer;
	text-decoration: none;
	transition: transform 0.2s ease-in-out;
}

.chat-fab:hover{
	transform: scale(1.08);
	color: #FFFFFF;
}

.chat-fab-whatsapp{
	background: #25D366;
}

.chat-fab-call{
	background: var(--primary-color);
	display: none;
}

.chat-fab-whatsapp .chat-fab-ping{
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: #25D366;
	opacity: 0.6;
	animation: chatFabPing 2.2s ease-out infinite;
}

@keyframes chatFabPing{
	0%{ transform: scale(1); opacity: 0.5; }
	100%{ transform: scale(1.9); opacity: 0; }
}

.chat-fab-whatsapp{
	position: relative;
}

/* Mobile: show both WhatsApp + Call buttons */
@media only screen and (max-width: 767px){
	.chat-fab-call{
		display: flex;
	}

	.chat-fab{
		width: 50px;
		height: 50px;
		font-size: 22px;
	}

	.chat-widget-buttons{
		left: 14px;
		bottom: 14px;
	}

	.chat-popup{
		width: calc(100vw - 28px) !important;
		left: 14px !important;
		right: 14px !important;
		bottom: 84px !important;
	}
}

/* ---- Chat popup window ---- */
.chat-popup{
	position: fixed;
	left: 20px;
	bottom: 92px;
	width: 340px;
	max-width: calc(100vw - 40px);
	height: 460px;
	max-height: 70vh;
	background: #FFFFFF;
	border-radius: 16px;
	box-shadow: 0 12px 40px rgba(0,0,0,0.25);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	z-index: 9999;
	opacity: 0;
	visibility: hidden;
	transform: translateY(20px);
	transition: all 0.25s ease-in-out;
}

.chat-popup.active{
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.chat-popup-header{
	background: var(--primary-color);
	color: #FFFFFF;
	padding: 14px 16px;
	display: flex;
	align-items: center;
	gap: 12px;
}

.chat-popup-avatar{
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: #FFFFFF;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	flex-shrink: 0;
}

.chat-popup-avatar img{
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.chat-popup-title{
	flex: 1;
}

.chat-popup-title h4{
	font-family: var(--accent-font);
	font-size: 15px;
	font-weight: 700;
	color: #FFFFFF;
	margin: 0 0 2px;
}

.chat-popup-status{
	font-size: 12px;
	color: #d9f2e4;
	display: flex;
	align-items: center;
	gap: 5px;
}

.chat-popup-status::before{
	content: '';
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #3CE080;
	display: inline-block;
}

.chat-popup-close{
	background: transparent;
	border: none;
	color: #FFFFFF;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	opacity: 0.85;
}

.chat-popup-close:hover{
	opacity: 1;
}

.chat-popup-body{
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	background: #ECE9DD url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Crect width='40' height='40' fill='%23f4f1ea'/%3E%3C/svg%3E");
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.chat-msg{
	max-width: 85%;
	padding: 10px 14px;
	border-radius: 14px;
	font-size: 14px;
	line-height: 1.5em;
	font-family: var(--default-font);
}

.chat-msg-bot{
	align-self: flex-start;
	background: #FFFFFF;
	color: #1f1f1f;
	border-bottom-left-radius: 4px;
	box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.chat-msg-user{
	align-self: flex-end;
	background: var(--accent-color);
	color: #FFFFFF;
	border-bottom-right-radius: 4px;
}

.chat-quick-replies{
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 4px;
}

.chat-quick-reply{
	border: 1px solid var(--accent-color);
	color: var(--primary-color);
	background: #FFFFFF;
	border-radius: 99px;
	padding: 6px 12px;
	font-size: 12.5px;
	cursor: pointer;
	font-family: var(--default-font);
}

.chat-quick-reply:hover{
	background: var(--secondary-color);
}

.chat-live-btn{
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: #25D366;
	color: #FFFFFF;
	text-decoration: none;
	font-weight: 600;
	font-size: 14px;
	padding: 12px;
	margin: 10px 16px 0;
	border-radius: 10px;
	font-family: var(--accent-font);
}

.chat-live-btn:hover{
	color: #FFFFFF;
	opacity: 0.92;
}

.chat-popup-footer{
	padding: 12px;
	border-top: 1px solid #eee;
	display: flex;
	gap: 8px;
	background: #FFFFFF;
}

.chat-popup-input{
	flex: 1;
	border: 1px solid #ddd;
	border-radius: 99px;
	padding: 10px 16px;
	font-size: 14px;
	font-family: var(--default-font);
	outline: none;
}

.chat-popup-input:focus{
	border-color: var(--accent-color);
}

.chat-popup-send{
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--accent-color);
	color: #FFFFFF;
	border: none;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	flex-shrink: 0;
	font-size: 16px;
}
