/* =====================================================================
 * Wad Al-Ubayyid – El Obeid Assistant
 * Design: "Kordofan" – baobab, dunes, gum-arabic amber, Sudanese weave band
 * ===================================================================== */
#eva-root {
	--eva-primary: #0E5E4E;
	--eva-primary-dark: #093F35;
	--eva-primary-soft: #E3F0EC;
	--eva-amber: #D9A441;
	--eva-amber-soft: #F6E7C4;
	--eva-clay: #C2562F;
	--eva-sand: #F4E6C8;
	--eva-bg: #FAF6EE;
	--eva-line: #EDE3CF;
	--eva-ink: #1F2422;
	--eva-muted: #6E716B;
	--eva-radius: 26px;
	--eva-font: "Tajawal", "Cairo", "IBM Plex Sans Arabic", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
	--eva-display: "Reem Kufi", "Tajawal", "Cairo", var(--eva-font);
	--eva-shadow: 0 30px 70px -18px rgba(9, 40, 33, .45), 0 10px 24px -10px rgba(9, 40, 33, .25);
	position: fixed;
	bottom: 22px;
	z-index: 2147483000;
	font-family: var(--eva-font);
	font-size: 15px;
	line-height: 1.65;
	color: var(--eva-ink);
	-webkit-font-smoothing: antialiased;
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
	#eva-root {
		--eva-primary-dark: color-mix(in srgb, var(--eva-primary) 70%, #000);
		--eva-primary-soft: color-mix(in srgb, var(--eva-primary) 10%, #fff);
	}
}
#eva-root *, #eva-root *::before, #eva-root *::after { box-sizing: border-box; }
#eva-root button { font: inherit; cursor: pointer; margin: 0; }
#eva-root [hidden] { display: none !important; }
#eva-root.eva-pos-right { right: 22px; }
#eva-root.eva-pos-left { left: 22px; }

/* ---------- Launcher ---------- */
#eva-root .eva-launcher {
	position: relative;
	display: block;
	width: 72px; height: 72px;
	padding: 0;
	border: 3px solid #fff;
	border-radius: 50%;
	background: var(--eva-sand);
	box-shadow: 0 0 0 3px var(--eva-amber), 0 14px 30px -8px rgba(9, 40, 33, .5);
	transition: transform .3s cubic-bezier(.2, .9, .3, 1.4), box-shadow .3s;
}
#eva-root .eva-launcher img { width: 100%; height: 100%; border-radius: 50%; display: block; transition: transform .4s cubic-bezier(.2, .9, .3, 1.4); }
#eva-root .eva-launcher:hover { transform: translateY(-4px); box-shadow: 0 0 0 3px var(--eva-amber), 0 20px 36px -10px rgba(9, 40, 33, .55); }
#eva-root .eva-launcher:hover img { transform: rotate(-7deg) scale(1.04); }
#eva-root .eva-launcher:focus-visible { outline: 3px solid var(--eva-primary); outline-offset: 5px; }
#eva-root .eva-launch-ico {
	position: absolute; bottom: -4px; inset-inline-start: -6px;
	width: 28px; height: 28px; padding: 6px;
	border-radius: 50%; border: 2.5px solid #fff;
	background: var(--eva-clay); color: #fff;
	box-shadow: 0 4px 10px -2px rgba(0, 0, 0, .3);
	transition: transform .3s;
}
#eva-root.eva-pos-right .eva-launch-ico { left: -6px; right: auto; }
#eva-root.eva-pos-left .eva-launch-ico { right: -6px; left: auto; }
#eva-root .eva-launch-ico svg { width: 100%; height: 100%; display: block; }
#eva-root.eva-open .eva-launch-ico { transform: scale(0); }
#eva-root .eva-ping {
	position: absolute; inset: -6px; border-radius: 50%;
	border: 2px solid var(--eva-amber);
	opacity: 0; pointer-events: none;
	animation: eva-ping 3s ease-out 1.5s infinite;
}
#eva-root.eva-open .eva-ping { display: none; }
#eva-root .eva-badge {
	position: absolute; top: -6px;
	min-width: 23px; height: 23px; padding: 0 6px;
	border-radius: 12px; border: 2.5px solid #fff;
	background: var(--eva-clay); color: #fff;
	font-size: 12px; font-weight: 800; line-height: 18px; text-align: center;
	animation: eva-pop .45s cubic-bezier(.2, .9, .3, 1.5);
}
#eva-root.eva-pos-right .eva-badge { right: -6px; }
#eva-root.eva-pos-left .eva-badge { left: -6px; }

/* ---------- Teaser ---------- */
#eva-root .eva-teaser {
	position: absolute; bottom: 90px;
	width: max-content; max-width: 250px;
	padding: 13px 36px 13px 16px;
	background: #fff;
	border-radius: 18px;
	border-inline-start: 4px solid var(--eva-amber);
	box-shadow: 0 16px 34px -10px rgba(9, 40, 33, .35);
	font-weight: 700; font-size: 14.5px; line-height: 1.5;
	cursor: pointer;
	animation: eva-rise .5s cubic-bezier(.2, .9, .3, 1.2);
}
#eva-root[dir="rtl"] .eva-teaser { padding: 13px 16px 13px 36px; }
#eva-root .eva-teaser { bottom: 14px; max-width: min(240px, calc(100vw - 130px)); }
#eva-root.eva-pos-right .eva-teaser { right: 90px; border-bottom-right-radius: 6px; }
#eva-root.eva-pos-left .eva-teaser { left: 90px; border-bottom-left-radius: 6px; }
#eva-root .eva-teaser-x {
	position: absolute; top: 9px; inset-inline-end: 9px;
	width: 20px; height: 20px; padding: 3px;
	border: 0; border-radius: 50%;
	background: #F3EEE3; color: var(--eva-muted);
}
#eva-root .eva-teaser-x svg { width: 100%; height: 100%; display: block; }

/* ---------- Panel ---------- */
#eva-root .eva-panel {
	position: absolute; bottom: 92px;
	width: 388px;
	height: min(660px, calc(100vh - 136px));
	display: flex; flex-direction: column;
	background: var(--eva-bg);
	border-radius: var(--eva-radius);
	box-shadow: var(--eva-shadow);
	overflow: hidden;
	opacity: 0;
	transform: translateY(18px) scale(.96);
	transform-origin: bottom right;
	transition: opacity .24s ease, transform .3s cubic-bezier(.2, .9, .3, 1.15);
}
#eva-root.eva-pos-right .eva-panel { right: 0; }
#eva-root.eva-pos-left .eva-panel { left: 0; transform-origin: bottom left; }
#eva-root.eva-open .eva-panel { opacity: 1; transform: none; }
#eva-root.eva-no-anim .eva-panel { transition: none; }

/* Header */
#eva-root .eva-head {
	position: relative;
	flex: none;
	padding: 12px 14px 20px;
	background:
		radial-gradient(120% 90% at 85% 0%, rgba(217, 164, 65, .28) 0%, transparent 55%),
		linear-gradient(160deg, var(--eva-primary) 0%, var(--eva-primary-dark) 100%);
	color: #fff;
	overflow: hidden;
}
#eva-root .eva-head-art { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 90px; pointer-events: none; }
#eva-root[dir="rtl"] .eva-head-art { transform: scaleX(-1); }
#eva-root .eva-head-bar { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#eva-root .eva-head-actions { display: flex; align-items: center; gap: 6px; }
#eva-root .eva-langs { display: flex; background: rgba(0, 0, 0, .2); border-radius: 999px; padding: 3px; }
#eva-root .eva-langs button {
	border: 0; background: transparent; color: #fff;
	font-size: 11.5px; font-weight: 800; line-height: 1;
	padding: 6px 9px; border-radius: 999px; min-width: 30px;
	opacity: .75; transition: background .2s, opacity .2s, color .2s;
}
#eva-root .eva-langs button[aria-pressed="true"] { background: var(--eva-amber); color: var(--eva-primary-dark); opacity: 1; }
#eva-root .eva-langs button:hover { opacity: 1; }
#eva-root .eva-icon {
	width: 32px; height: 32px; padding: 7px;
	border: 0; border-radius: 50%;
	background: rgba(255, 255, 255, .12); color: #fff;
	transition: background .2s, transform .2s;
}
#eva-root .eva-icon:hover { background: rgba(255, 255, 255, .26); }
#eva-root .eva-icon svg { width: 100%; height: 100%; display: block; }
#eva-root .eva-close:hover { transform: rotate(90deg); }

#eva-root .eva-head-id { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; margin-top: 14px; }
#eva-root .eva-head-ava { position: relative; flex: none; }
#eva-root .eva-head-avatar {
	display: block;
	width: 62px; height: 62px; border-radius: 50%;
	border: 3px solid #fff;
	box-shadow: 0 0 0 3px var(--eva-amber);
	background: var(--eva-sand);
}
#eva-root .eva-head-ava i {
	position: absolute; bottom: 1px; inset-inline-end: 1px;
	width: 15px; height: 15px; border-radius: 50%;
	background: #4CD98B; border: 3px solid var(--eva-primary-dark);
}
#eva-root .eva-head-text { display: flex; flex-direction: column; min-width: 0; }
#eva-root .eva-name {
	font-family: var(--eva-display);
	font-size: 22px; font-weight: 700; line-height: 1.25;
	letter-spacing: 0;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#eva-root .eva-sub { font-size: 13px; opacity: .85; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#eva-root .eva-status { display: inline-flex; align-items: center; gap: 6px; margin-top: 5px; font-size: 11.5px; font-weight: 700; color: var(--eva-amber-soft); }
#eva-root .eva-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #4CD98B; box-shadow: 0 0 0 3px rgba(76, 217, 139, .25); }

/* Sudanese weave band */
#eva-root .eva-band {
	flex: none; height: 9px;
	background-color: var(--eva-clay);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='9' viewBox='0 0 18 9'%3E%3Cpath d='M0 9 L9 0 L18 9Z' fill='%23D9A441'/%3E%3Cpath d='M5 9 L9 5 L13 9Z' fill='%23F6E7C4'/%3E%3C/svg%3E");
	background-size: 18px 9px;
	background-repeat: repeat-x;
	border-bottom: 2px solid var(--eva-primary-dark);
}

/* Messages */
#eva-root .eva-body {
	flex: 1;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 8px 14px 18px;
	background-color: var(--eva-bg);
	background-image: radial-gradient(rgba(217, 164, 65, .14) 1px, transparent 1.3px);
	background-size: 18px 18px;
}
#eva-root .eva-body::-webkit-scrollbar { width: 6px; }
#eva-root .eva-body::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, .12); border-radius: 3px; }

#eva-root .eva-row { display: flex; align-items: flex-end; gap: 8px; margin: 12px 0; }
#eva-root .eva-row.eva-in { animation: eva-rise .34s cubic-bezier(.2, .9, .3, 1.1); }
#eva-root .eva-user { justify-content: flex-end; }
#eva-root .eva-mini {
	width: 32px; height: 32px; border-radius: 50%; flex: none;
	background: var(--eva-sand);
	border: 2px solid #fff; box-shadow: 0 0 0 1.5px var(--eva-amber);
	align-self: flex-start; margin-top: 2px;
}
#eva-root .eva-col { display: flex; flex-direction: column; gap: 8px; max-width: calc(100% - 46px); align-items: flex-start; }

#eva-root .eva-bubble { padding: 11px 15px; border-radius: 20px; overflow-wrap: anywhere; max-width: 100%; }
#eva-root .eva-bot .eva-bubble {
	background: #fff; color: var(--eva-ink);
	border: 1px solid var(--eva-line);
	border-start-start-radius: 6px;
	box-shadow: 0 2px 10px -6px rgba(60, 45, 10, .18);
}
#eva-root .eva-user .eva-bubble {
	background: linear-gradient(160deg, var(--eva-primary), var(--eva-primary-dark));
	color: #fff; max-width: 82%;
	border-end-end-radius: 6px;
	box-shadow: 0 6px 14px -8px rgba(9, 63, 53, .6);
}
#eva-root .eva-bubble p { margin: 0 0 .5em; }
#eva-root .eva-bubble p:last-child { margin-bottom: 0; }
#eva-root .eva-bubble strong { color: var(--eva-primary-dark); }
#eva-root .eva-bubble a { color: var(--eva-primary); font-weight: 700; text-decoration: underline; text-decoration-color: var(--eva-amber); text-decoration-thickness: 2px; text-underline-offset: 3px; }
#eva-root .eva-bubble ul, #eva-root .eva-bubble ol { margin: .3em 0; padding-inline-start: 1.3em; }
#eva-root .eva-bubble img { max-width: 100%; height: auto; border-radius: 10px; }

/* Typing */
#eva-root .eva-typing { display: inline-flex; gap: 5px; padding: 15px 17px; }
#eva-root .eva-typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--eva-amber); animation: eva-dot 1.2s infinite ease-in-out; }
#eva-root .eva-typing i:nth-child(2) { animation-delay: .15s; background: var(--eva-clay); }
#eva-root .eva-typing i:nth-child(3) { animation-delay: .3s; background: var(--eva-primary); }

/* Chips */
#eva-root .eva-chips-title { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--eva-muted); font-weight: 700; margin-top: 2px; }
#eva-root .eva-chips-title::before { content: ""; width: 7px; height: 7px; background: var(--eva-amber); transform: rotate(45deg); border-radius: 1px; }
#eva-root .eva-chips { display: flex; flex-wrap: wrap; gap: 7px; }
#eva-root .eva-chip {
	border: 1.5px solid #E8D3A2;
	background: #fff;
	color: var(--eva-primary-dark);
	font-size: 13.5px; font-weight: 700; line-height: 1.35;
	padding: 8px 14px;
	border-radius: 999px;
	text-align: start;
	box-shadow: 0 2px 6px -4px rgba(60, 45, 10, .3);
	transition: background .18s, color .18s, transform .18s, border-color .18s;
}
#eva-root .eva-chip:hover, #eva-root .eva-chip:focus-visible { background: var(--eva-primary); border-color: var(--eva-primary); color: #fff; transform: translateY(-2px); outline: none; }

/* Contact actions */
#eva-root .eva-actions { display: flex; flex-wrap: wrap; gap: 7px; }
#eva-root .eva-action {
	display: inline-flex; align-items: center; gap: 7px;
	padding: 9px 15px; border-radius: 14px;
	font-size: 13.5px; font-weight: 800; text-decoration: none !important;
	color: #fff !important; background: var(--eva-ink);
	box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .45);
	transition: transform .18s, filter .18s;
}
#eva-root .eva-action:hover { transform: translateY(-2px); filter: brightness(1.08); }
#eva-root .eva-action svg { width: 17px; height: 17px; flex: none; }
#eva-root .eva-action-wa { background: #1FAF55; }
#eva-root .eva-action-mail { background: var(--eva-clay); }
#eva-root .eva-action-link { background: var(--eva-primary); }

/* Input */
#eva-root .eva-form {
	flex: none;
	display: flex; align-items: center; gap: 8px;
	margin: 0; padding: 12px 12px 14px;
	background: #fff;
	border-top: 1px solid var(--eva-line);
}
#eva-root .eva-input {
	flex: 1; min-width: 0; height: 48px;
	margin: 0; padding: 0 18px;
	border: 1.5px solid var(--eva-line); border-radius: 999px;
	background: var(--eva-bg); color: var(--eva-ink);
	font: inherit; font-size: 15px;
	outline: none; box-shadow: none;
	transition: border-color .2s, background .2s, box-shadow .2s;
}
#eva-root .eva-input::placeholder { color: #9A9A90; }
#eva-root .eva-input:focus { border-color: var(--eva-amber); background: #fff; box-shadow: 0 0 0 4px rgba(217, 164, 65, .2); }
#eva-root .eva-send {
	width: 48px; height: 48px; flex: none;
	padding: 12px; border: 0; border-radius: 50%;
	background: linear-gradient(160deg, var(--eva-primary), var(--eva-primary-dark)); color: #fff;
	box-shadow: 0 8px 16px -8px rgba(9, 63, 53, .7);
	transition: transform .15s, filter .2s;
}
#eva-root .eva-send:hover { filter: brightness(1.12); }
#eva-root .eva-send:active { transform: scale(.92); }
#eva-root .eva-send svg { width: 100%; height: 100%; display: block; }
#eva-root[dir="rtl"] .eva-send svg { transform: scaleX(-1); }

/* ---------- Map card ---------- */
#eva-root .eva-map { margin-top: 10px; border-radius: 16px; overflow: hidden; border: 1px solid var(--eva-line); background: #fff; }
#eva-root .eva-map-art { position: relative; height: 120px; }
#eva-root .eva-map-art svg { width: 100%; height: 100%; display: block; }
#eva-root .eva-map-pin {
	position: absolute; left: 50%; top: 22px; width: 38px; height: 38px; margin-left: -19px;
	color: var(--eva-clay); filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .25));
	animation: eva-bounce 1.8s ease-in-out infinite;
}
#eva-root .eva-map-pin svg { width: 100%; height: 100%; display: block; }
#eva-root .eva-map-label {
	position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%);
	white-space: nowrap; padding: 3px 11px; border-radius: 999px;
	background: rgba(255, 255, 255, .94); font-size: 12.5px; font-weight: 800; color: var(--eva-primary-dark);
	box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
}
#eva-root .eva-map-frame { display: block; width: 100%; height: 190px; border: 0; }
#eva-root .eva-map-btns { display: flex; gap: 6px; padding: 8px; }
#eva-root .eva-map-go {
	flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
	padding: 10px 12px; border-radius: 12px;
	background: linear-gradient(160deg, var(--eva-primary), var(--eva-primary-dark));
	color: #fff !important; text-decoration: none !important;
	font-size: 14px; font-weight: 800;
	transition: filter .2s;
}
#eva-root .eva-map-go:hover { filter: brightness(1.12); }
#eva-root .eva-map-go svg { width: 18px; height: 18px; flex: none; color: var(--eva-amber); }
#eva-root .eva-map-show {
	padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--eva-line);
	background: #fff; color: var(--eva-primary-dark); font-size: 13.5px; font-weight: 700;
}
#eva-root .eva-map-show:hover { background: var(--eva-bg); }

/* ---------- Voice ---------- */
#eva-root .eva-listen {
	display: inline-flex; align-items: center; gap: 5px;
	margin-top: -3px; padding: 3px 10px 3px 8px;
	border: 0; border-radius: 999px;
	background: transparent; color: var(--eva-muted);
	font-size: 12.5px; font-weight: 700;
	transition: background .2s, color .2s;
}
#eva-root .eva-listen svg { width: 16px; height: 16px; }
#eva-root .eva-listen:hover, #eva-root .eva-listen.eva-on { background: var(--eva-amber-soft); color: #7A5410; }
#eva-root .eva-listen.eva-on svg { animation: eva-pulse 1s ease-in-out infinite; }
#eva-root .eva-listen.eva-unavail { opacity: .5; pointer-events: none; }
#eva-root .eva-mute[aria-pressed="true"] { background: rgba(0, 0, 0, .25); }
#eva-root.eva-speaking .eva-head-avatar { animation: eva-talk .45s ease-in-out infinite alternate; }

/* WhatsApp button inside answers (from {whatsapp}) */
#eva-root .eva-bubble a.eva-wa-inline { color: #fff; text-decoration: none; }

/* ---------- Mobile ---------- */
@media (max-width: 480px) {
	#eva-root { bottom: 16px; }
	#eva-root.eva-pos-right { right: 16px; }
	#eva-root.eva-pos-left { left: 16px; }
	#eva-root .eva-launcher { width: 64px; height: 64px; }
	#eva-root.eva-pos-right .eva-teaser { right: 80px; }
	#eva-root.eva-pos-left .eva-teaser { left: 80px; }
	#eva-root .eva-panel {
		position: fixed; inset: 0;
		width: 100%; height: 100%; height: 100dvh;
		border-radius: 0; bottom: 0;
	}
	#eva-root.eva-open .eva-launcher, #eva-root.eva-open .eva-teaser { display: none; }
	#eva-root .eva-head { padding-top: max(12px, env(safe-area-inset-top)); }
	#eva-root .eva-form { padding-bottom: max(14px, env(safe-area-inset-bottom)); }
	#eva-root .eva-input { font-size: 16px; }
	html.eva-lock, html.eva-lock body { overflow: hidden !important; }
}
@media (max-width: 380px) {
	#eva-root .eva-head-avatar { width: 54px; height: 54px; }
	#eva-root .eva-name { font-size: 20px; }
	#eva-root .eva-icon { width: 30px; height: 30px; padding: 6px; }
	#eva-root .eva-langs button { padding: 6px 7px; min-width: 26px; }
}

/* ---------- Animations ---------- */
@keyframes eva-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes eva-pop { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes eva-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .55; } 30% { transform: translateY(-5px); opacity: 1; } }
@keyframes eva-ping { 0% { transform: scale(1); opacity: .8; } 80%, 100% { transform: scale(1.4); opacity: 0; } }
@keyframes eva-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes eva-pulse { 50% { opacity: .4; } }
@keyframes eva-talk { from { transform: scale(1); } to { transform: scale(1.07); } }

@media (prefers-reduced-motion: reduce) {
	#eva-root *, #eva-root *::before, #eva-root *::after { animation: none !important; transition: none !important; }
}
@media print { #eva-root { display: none !important; } }
