.tai-widget-root,
.tai-widget-root * {
	box-sizing: border-box;
}

@font-face {
	font-family: 'TaiCairo';
	src: url('/wp-content/uploads/taghleefy-tech/fonts/Cairo-Variable.ttf') format('truetype');
	font-weight: 200 900;
	font-display: swap;
}

.tai-widget-root {
	position: fixed;
	bottom: 20px;
	right: 20px;
	z-index: 999999;
	direction: rtl;
	font-family: 'TaiCairo', 'Cairo', sans-serif;
}

.tai-widget-root .tai-bubble {
	width: 58px;
	height: 58px;
	border-radius: 50%;
	background: rgba(15, 23, 42, 0.75);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid rgba(56, 189, 248, 0.3);
	outline: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37), 0 0 15px rgba(56, 189, 248, 0.25);
	transition: all 0.3s ease;
	margin-right: auto;
	margin-left: 0;
	position: relative;
}
.tai-widget-root .tai-bubble:hover,
.tai-widget-root .tai-bubble:focus,
.tai-widget-root .tai-bubble:focus-visible {
	background: rgba(21, 32, 56, 0.85);
	color: inherit;
	transform: scale(1.08);
	border-color: rgba(56, 189, 248, 0.55);
	box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4), 0 0 26px rgba(56, 189, 248, 0.45);
}
.tai-widget-root .tai-bubble svg {
	width: 26px;
	height: 26px;
	display: block;
}
.tai-widget-root .tai-bubble svg path {
	stroke: #38BDF8;
}

.tai-panel {
	position: absolute;
	bottom: 72px;
	right: 0;
	width: 340px;
	max-width: calc(100vw - 32px);
	height: 480px;
	max-height: 70vh;
	background: #ffffff;
	border-radius: 16px;
	box-shadow: 0 12px 40px rgba(15, 27, 45, 0.25);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	opacity: 0;
	transform: translateY(12px);
	pointer-events: none;
	transition: opacity 180ms ease, transform 180ms ease;
}
.tai-panel.tai-open {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

.tai-header {
	background: #0F1B2D;
	color: #fff;
	padding: 14px 16px;
	font-weight: 700;
	font-size: 15px;
	flex-shrink: 0;
}

.tai-messages {
	flex: 1;
	overflow-y: auto;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: #F5F7F9;
}

.tai-msg {
	max-width: 85%;
	padding: 10px 14px;
	border-radius: 12px;
	font-size: 14px;
	line-height: 1.6;
	white-space: pre-wrap;
	opacity: 0;
	transform: translateY(6px);
	animation: tai-fade-in 160ms ease forwards;
}
@keyframes tai-fade-in {
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.tai-msg.tai-bot {
	background: #fff;
	color: #0F1B2D;
	align-self: flex-start;
	border: 1px solid #E4E8EC;
}
.tai-msg.tai-user {
	background: #0F1B2D;
	color: #fff;
	align-self: flex-end;
}

.tai-typing {
	align-self: flex-start;
	display: flex;
	gap: 4px;
	padding: 10px 14px;
}
.tai-typing span {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #0E9F9A;
	opacity: 0.3;
	animation: tai-pulse 900ms ease-in-out infinite;
}
.tai-typing span:nth-child(2) {
	animation-delay: 150ms;
}
.tai-typing span:nth-child(3) {
	animation-delay: 300ms;
}
@keyframes tai-pulse {
	0%,
	100% {
		opacity: 0.25;
	}
	50% {
		opacity: 0.9;
	}
}

.tai-cta {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 4px 0 6px;
	opacity: 0;
	transform: translateY(6px);
	animation: tai-fade-in 200ms ease forwards;
}
.tai-cta a {
	display: block;
	text-align: center;
	padding: 10px 12px;
	border-radius: 10px;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
	transition: opacity 150ms ease;
}
.tai-cta a:hover {
	opacity: 0.88;
}
.tai-cta-calendly {
	background: #0E9F9A;
	color: #fff;
}
.tai-cta-whatsapp {
	background: #fff;
	color: #0E9F9A;
	border: 1.5px solid #0E9F9A;
}

.tai-input-row {
	display: flex;
	gap: 8px;
	padding: 10px;
	border-top: 1px solid #E4E8EC;
	background: #fff;
	flex-shrink: 0;
}
.tai-input-row textarea {
	flex: 1;
	resize: none;
	border: 1px solid #E4E8EC;
	border-radius: 10px;
	padding: 8px 10px;
	font-family: inherit;
	font-size: 13px;
	max-height: 72px;
	direction: rtl;
}
.tai-input-row textarea:focus {
	outline: none;
	border-color: #0E9F9A;
}
.tai-widget-root .tai-send-btn {
	background: #0E9F9A;
	border: none;
	color: #fff;
	border-radius: 10px;
	width: 40px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 150ms ease;
}
.tai-widget-root .tai-send-btn:hover {
	background: #0c8a85;
}
.tai-widget-root .tai-send-btn:disabled {
	opacity: 0.5;
	cursor: default;
}

@media (max-width: 420px) {
	.tai-panel {
		width: calc(100vw - 24px);
		right: -8px;
	}
}
