.snd-public-chat-panel.font-cairo,
.snd-public-chat-fab.font-cairo {
	font-family: "Cairo", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.snd-public-chat-panel.font-tajawal,
.snd-public-chat-fab.font-tajawal {
	font-family: "Tajawal", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.snd-public-chat-panel.font-system,
.snd-public-chat-fab.font-system {
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.snd-public-chat-fab {
	position: fixed;
	right: 24px;
	bottom: 24px;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	border: 0;
	background: linear-gradient(145deg, #111827, #020617);
	color: #fff;
	z-index: 99999;
	box-shadow: 0 18px 45px rgba(2, 6, 23, 0.32);
	cursor: pointer;
	font-weight: 900;
	font-size: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: visible;
}

.snd-public-chat-fab.pulse::after {
	content: "";
	position: absolute;
	inset: -7px;
	border-radius: 50%;
	border: 1px solid rgba(15, 23, 42, 0.28);
	animation: snd-public-fab-pulse 2.6s infinite ease-out;
	pointer-events: none;
}

@keyframes snd-public-fab-pulse {
	0% {
		transform: scale(0.92);
		opacity: 0.5;
	}
	70% {
		transform: scale(1.22);
		opacity: 0;
	}
	100% {
		transform: scale(1.22);
		opacity: 0;
	}
}

.snd-public-chat-fab-img {
	width: 72%;
	height: 72%;
	object-fit: contain;
	border-radius: 50%;
}

.snd-public-chat-panel {
	position: fixed;
	right: 24px;
	bottom: 102px;
	width: 430px;
	max-width: calc(100vw - 32px);
	height: 660px;
	max-height: calc(100vh - 130px);
	background: #ffffff;
	border: 1px solid rgba(15, 23, 42, 0.10);
	border-radius: 24px;
	z-index: 99999;
	box-shadow: 0 28px 90px rgba(2, 6, 23, 0.28);
	display: none;
	overflow: hidden;
}

.snd-public-chat-panel.open {
	display: flex;
	flex-direction: column;
}

.snd-public-chat-header {
	min-height: 82px;
	padding: 16px 18px;
	color: #fff;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex: 0 0 auto;
}

.snd-public-chat-panel.theme-dark-gradient .snd-public-chat-header {
	background: linear-gradient(135deg, #020617, #111827 55%, #27272a);
}

.snd-public-chat-panel.theme-dark .snd-public-chat-header {
	background: #020617;
}

.snd-public-chat-panel.theme-light .snd-public-chat-header {
	background: #fff;
	color: #111827;
	border-bottom: 1px solid rgba(15, 23, 42, 0.10);
}

.snd-public-chat-header-brand {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.snd-public-chat-avatar {
	width: 44px;
	height: 44px;
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.12);
	border: 1px solid rgba(255, 255, 255, 0.16);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 900;
	font-size: 13px;
	flex: 0 0 auto;
	overflow: hidden;
}

.snd-public-chat-panel.theme-light .snd-public-chat-avatar {
	background: #111827;
	color: #fff;
}

.snd-public-chat-logo-img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 4px;
}

.snd-public-chat-avatar-text {
	font-weight: 900;
}

.snd-public-chat-header-text {
	min-width: 0;
}

.snd-public-chat-title {
	font-weight: 900;
	font-size: 16px;
	line-height: 1.35;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 300px;
}

.snd-public-chat-subtitle {
	font-size: 13px;
	opacity: 0.78;
	margin-top: 4px;
	line-height: 1.35;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 300px;
}

.snd-public-chat-close {
	border: 0;
	background: rgba(255, 255, 255, 0.10);
	color: inherit;
	width: 40px;
	height: 40px;
	border-radius: 15px;
	cursor: pointer;
	font-size: 26px;
	line-height: 1;
	flex: 0 0 auto;
}

.snd-public-chat-panel.theme-light .snd-public-chat-close {
	background: #f1f5f9;
	color: #111827;
}

.snd-public-chat-close:hover {
	background: rgba(255, 255, 255, 0.18);
}

.snd-public-chat-lead-view {
	flex: 1;
	padding: 18px;
	background: #f8fafc;
	overflow-y: auto;
}

.snd-public-chat-lead-card {
	background: #fff;
	border: 1px solid rgba(15, 23, 42, 0.10);
	border-radius: 22px;
	padding: 18px;
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.snd-public-chat-lead-title {
	font-size: 16px;
	line-height: 2;
	color: #111827;
	font-weight: 800;
	margin-bottom: 16px;
}

.snd-public-chat-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.snd-public-chat-form label {
	display: flex;
	flex-direction: column;
	gap: 7px;
	margin: 0;
}

.snd-public-chat-form label span {
	font-size: 14px;
	font-weight: 800;
	color: #334155;
}

.snd-public-chat-form input,
.snd-public-chat-form textarea {
	width: 100%;
	border: 1px solid rgba(15, 23, 42, 0.14);
	border-radius: var(--snd-input-radius, 20px);
	padding: 13px 15px;
	font-size: 15px;
	outline: none;
	background: #fff;
	color: #111827;
	line-height: 1.7;
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.snd-public-chat-form input:focus,
.snd-public-chat-form textarea:focus {
	border-color: #111827;
	box-shadow: 0 0 0 4px rgba(17, 24, 39, 0.10);
}

.snd-public-chat-start {
	border: 0;
	border-radius: var(--snd-button-radius, 20px);
	background: linear-gradient(135deg, #020617, #111827);
	color: #fff;
	font-weight: 900;
	font-size: 15px;
	padding: 13px 15px;
	cursor: pointer;
	margin-top: 4px;
}

.snd-public-chat-start:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

.snd-public-chat-form-error {
	color: #dc2626;
	font-size: 13px;
	line-height: 1.7;
	min-height: 18px;
	font-weight: 700;
}

.snd-public-chat-chat-view {
	flex: 1;
	display: none;
	flex-direction: column;
	min-height: 0;
	background: #f8fafc;
}

.snd-public-chat-messages {
	flex: 1;
	padding: 16px;
	overflow-y: auto;
	background: #f8fafc;
	min-height: 0;
}

.snd-public-chat-msg {
	display: flex;
	margin-bottom: 12px;
}

.snd-public-chat-msg.user {
	justify-content: flex-end;
}

.snd-public-chat-msg.assistant {
	justify-content: flex-start;
}

.snd-public-chat-bubble {
	max-width: 86%;
	padding: 12px 14px;
	border-radius: var(--snd-message-radius, 18px);
	font-size: 14px;
	line-height: 1.9;
	word-break: break-word;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.snd-public-chat-msg.user .snd-public-chat-bubble {
	background: linear-gradient(135deg, #020617, #111827);
	color: #fff;
	border-bottom-right-radius: 6px;
}

.snd-public-chat-msg.assistant .snd-public-chat-bubble {
	background: #fff;
	color: #111827;
	border: 1px solid rgba(15, 23, 42, 0.10);
	border-bottom-left-radius: 6px;
}

.snd-public-chat-bubble[dir="rtl"] {
	direction: rtl;
	text-align: right;
}

.snd-public-chat-bubble[dir="ltr"] {
	direction: ltr;
	text-align: left;
}

.snd-public-chat-heading {
	font-weight: 900;
	margin: 6px 0 4px;
}

.snd-public-chat-bullet {
	margin: 4px 0;
}

.snd-public-chat-quick-wrap {
	flex: 0 0 auto;
	background: #fff;
	border-top: 1px solid rgba(15, 23, 42, 0.08);
	border-bottom: 1px solid rgba(15, 23, 42, 0.08);
	padding: 10px 12px;
}

.snd-public-chat-quick {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	padding-bottom: 2px;
}

.snd-public-chat-quick button {
	border: 1px solid rgba(15, 23, 42, 0.14);
	background: #fff;
	color: #111827;
	border-radius: 999px;
	padding: 8px 14px;
	font-size: 13px;
	font-weight: 900;
	cursor: pointer;
	white-space: nowrap;
}

.snd-public-chat-quick button:hover {
	background: #111827;
	color: #fff;
}

.snd-public-chat-footer {
	flex: 0 0 auto;
	display: flex;
	gap: 10px;
	padding: 13px;
	background: #fff;
	border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.snd-public-chat-input {
	flex: 1;
	resize: none;
	border: 1px solid rgba(15, 23, 42, 0.16);
	border-radius: var(--snd-input-radius, 20px);
	padding: 12px 14px;
	font-size: 15px;
	line-height: 1.7;
	outline: none;
	min-height: 52px;
	max-height: 105px;
}

.snd-public-chat-input:focus {
	border-color: #111827;
	box-shadow: 0 0 0 4px rgba(17, 24, 39, 0.10);
}

.snd-public-chat-send {
	border: 0;
	border-radius: var(--snd-button-radius, 20px);
	background: linear-gradient(135deg, #020617, #111827);
	color: #fff;
	font-weight: 900;
	font-size: 15px;
	padding: 0 20px;
	cursor: pointer;
	min-width: 82px;
}

.snd-public-chat-send:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

.snd-public-chat-msg.typing span {
	display: inline-block;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #64748b;
	margin: 0 2px;
	animation: snd-public-typing 1.1s infinite ease-in-out;
}

.snd-public-chat-msg.typing span:nth-child(2) {
	animation-delay: 0.15s;
}

.snd-public-chat-msg.typing span:nth-child(3) {
	animation-delay: 0.3s;
}

@keyframes snd-public-typing {
	0%, 80%, 100% {
		transform: translateY(0);
		opacity: 0.35;
	}
	40% {
		transform: translateY(-3px);
		opacity: 0.85;
	}
}

@media (max-width: 768px) {
	.snd-public-chat-fab {
		right: 16px;
		bottom: 16px;
	}

	.snd-public-chat-panel {
		right: 10px;
		bottom: 88px;
		width: calc(100vw - 20px);
		height: 78vh;
	}

	.snd-public-chat-title,
	.snd-public-chat-subtitle {
		max-width: 245px;
	}

	.snd-public-chat-footer {
		gap: 8px;
	}

	.snd-public-chat-send {
		min-width: 76px;
		padding: 0 16px;
	}
}

.snd-public-chat-whatsapp {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: fit-content;
	max-width: 100%;
	height: 30px;
	margin-top: 7px;
	padding: 0 11px;
	border-radius: 999px;
	background: #ecfdf3;
	color: #047857 !important;
	font-size: 12px;
	font-weight: 800;
	text-decoration: none !important;
	border: 1px solid #bbf7d0;
	white-space: nowrap;
}

.snd-public-chat-whatsapp:hover {
	background: #dcfce7;
	border-color: #86efac;
}

.snd-public-chat-whatsapp-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #22c55e;
	box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.13);
}

@media (max-width: 768px) {
	.snd-public-chat-whatsapp {
		height: 28px;
		font-size: 11px;
		padding: 0 9px;
		margin-top: 6px;
	}

	.snd-public-chat-whatsapp span:last-child {
		display: inline;
	}
}