/* Easy - the personal assistant of the public site and the Knowledge Center. Everything is scoped under #easyRoot. */
#easyRoot {
	--ez-ink: #0f2742;
	--ez-ink-soft: #52627a;
	--ez-blue: #1388d6;
	--ez-blue-dark: #0e6fb0;
	--ez-teal: #12a594;
	--ez-bg: #f3f6fb;
	--ez-card: #ffffff;
	--ez-line: #dfe6f0;
	--ez-warn: #b42318;
	position: fixed;
	left: 18px;
	bottom: var(--ez-bottom, 18px);
	z-index: 10000;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.5;
	color: var(--ez-ink);
	direction: rtl;
	text-align: right;
}
#easyRoot *, #easyRoot *::before, #easyRoot *::after { box-sizing: border-box; }
#easyRoot button { font: inherit; cursor: pointer; }
#easyRoot [hidden] { display: none !important; }

/* launcher */
.ez-launch {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	border: 0;
	border-radius: 999px;
	background: var(--ez-ink);
	color: #fff;
	padding: 0;
	height: 58px;
	min-width: 58px;
	box-shadow: 0 1px 2px rgba(15,39,66,.2), 0 8px 18px rgba(15,39,66,.22), 0 18px 40px rgba(15,39,66,.18);
	transition: transform .18s ease, box-shadow .18s ease;
}
.ez-launch:hover { transform: translateY(-2px); }
.ez-launch:focus-visible, #easyRoot button:focus-visible, #easyRoot input:focus-visible { outline: 3px solid #7cc4f5; outline-offset: 2px; }
.ez-launch-ico { width: 58px; height: 58px; display: grid; place-items: center; flex: none; }
.ez-launch-ico svg { width: 28px; height: 28px; }
.ez-launch-label { padding-inline-end: 22px; font-weight: 600; white-space: nowrap; }
.ez-dot { position: absolute; top: 4px; inset-inline-start: 4px; width: 13px; height: 13px; border-radius: 50%; background: #2fd07a; border: 2px solid var(--ez-ink); }
#easyRoot.ez-open .ez-launch { display: none; }
#easyRoot[data-mode="member"] .ez-launch, #easyRoot[data-mode="member"] .ez-nudge { display: none; }
#easyRoot.ez-wa:not(.ez-open) { left: 23px; }

/* greeting bubble above the launcher */
.ez-nudge {
	position: absolute;
	bottom: 70px;
	left: 0;
	width: 250px;
	background: #fff;
	border: 1px solid var(--ez-line);
	border-radius: 16px 16px 16px 4px;
	padding: 12px 34px 12px 14px;
	box-shadow: 0 10px 28px rgba(15,39,66,.16);
	animation: ez-pop .3s ease both;
}
.ez-nudge b { display: block; }
.ez-nudge button.ez-nudge-open { all: unset; cursor: pointer; display: block; color: var(--ez-ink-soft); }
.ez-nudge button.ez-nudge-x { position: absolute; top: 6px; inset-inline-end: 8px; border: 0; background: none; color: var(--ez-ink-soft); font-size: 20px; line-height: 1; padding: 4px 6px; }

/* panel */
.ez-panel {
	display: flex;
	flex-direction: column;
	width: 380px;
	max-width: calc(100vw - 24px);
	height: 560px;
	max-height: calc(100vh - 36px);
	background: var(--ez-bg);
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 2px 6px rgba(15,39,66,.12), 0 18px 48px rgba(15,39,66,.28);
	animation: ez-pop .22s ease both;
	border: 1px solid rgba(15,39,66,.08);
}
.ez-head { display: flex; align-items: center; gap: 12px; background: var(--ez-ink); color: #fff; padding: 14px 16px; }
.ez-avatar { position: relative; width: 46px; height: 46px; border-radius: 50%; background: #e6f3fd; display: grid; place-items: center; flex: none; box-shadow: 0 0 0 2px rgba(255,255,255,.28); }
.ez-avatar svg { width: 40px; height: 40px; display: block; }
.ez-avatar::after { content: ""; position: absolute; bottom: 0; inset-inline-start: 0; width: 11px; height: 11px; border-radius: 50%; background: #2fd07a; border: 2px solid var(--ez-ink); }
.ez-head-text { flex: 1; min-width: 0; }
.ez-head-text strong { display: block; font-size: 17px; }
.ez-head-text span { display: block; font-size: 12.5px; color: #b9c8dc; }
.ez-head-btn { border: 0; background: rgba(255,255,255,.12); color: #fff; width: 34px; height: 34px; border-radius: 50%; font-size: 18px; line-height: 1; display: grid; place-items: center; }
.ez-head-btn:hover { background: rgba(255,255,255,.24); }

.ez-msgs { flex: 1; overflow-y: auto; padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; overscroll-behavior: contain; }
.ez-row { display: flex; }
.ez-row.me { justify-content: flex-start; }
.ez-row.bot { justify-content: flex-end; }
.ez-b { max-width: 86%; padding: 10px 13px; border-radius: 16px; word-wrap: break-word; overflow-wrap: anywhere; }
.ez-row.bot .ez-b { background: var(--ez-card); border: 1px solid var(--ez-line); border-end-end-radius: 4px; }
.ez-row.me .ez-b { background: var(--ez-blue); color: #fff; border-end-start-radius: 4px; }
.ez-b p { margin: 0 0 6px; }
.ez-b p:last-child { margin-bottom: 0; }
.ez-b .ez-snip { color: var(--ez-ink-soft); font-size: 14px; border-inline-start: 3px solid var(--ez-line); padding-inline-start: 10px; margin: 6px 0; }
.ez-links { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.ez-link { display: block; text-decoration: none; padding: 8px 12px; border-radius: 12px; background: #eaf5ff; color: var(--ez-blue-dark); font-weight: 600; border: 1px solid #cfe6f9; }
.ez-link:hover { background: #dbeeff; }
.ez-link.alt { background: #fff; font-weight: 500; }
.ez-link small { display: block; font-weight: 400; color: var(--ez-ink-soft); }

.ez-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 14px 10px; }
.ez-chip { border: 1px solid #b9d9f3; background: #fff; color: var(--ez-blue-dark); border-radius: 999px; padding: 6px 13px; font-size: 14px; }
.ez-chip:hover { background: #eaf5ff; }
.ez-chip.soft { border-color: var(--ez-line); color: var(--ez-ink); }

.ez-typing { display: inline-flex; gap: 4px; padding: 4px 2px; }
.ez-typing i { width: 7px; height: 7px; border-radius: 50%; background: #9db0c8; animation: ez-blink 1s infinite ease-in-out; }
.ez-typing i:nth-child(2) { animation-delay: .15s; }
.ez-typing i:nth-child(3) { animation-delay: .3s; }

/* consent card */
.ez-card { background: var(--ez-card); border: 1px solid var(--ez-line); border-radius: 16px; padding: 14px; }
.ez-check { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 10px; font-size: 14px; cursor: pointer; }
.ez-check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--ez-blue); }
.ez-check a { color: var(--ez-blue-dark); }
.ez-go { width: 100%; border: 0; border-radius: 12px; background: var(--ez-blue); color: #fff; font-weight: 700; padding: 11px; }
.ez-go:disabled { background: #b7c6d8; cursor: not-allowed; }
.ez-go:not(:disabled):hover { background: var(--ez-blue-dark); }
.ez-err { color: var(--ez-warn); font-size: 13.5px; margin-top: 8px; }
.ez-fb { display: flex; gap: 8px; margin-top: 8px; }
.ez-fb button { border: 1px solid var(--ez-line); background: #fff; border-radius: 999px; padding: 4px 12px; font-size: 13.5px; color: var(--ez-ink); }
.ez-fb button:hover { background: #f1f6fc; }

/* input bar */
.ez-form { display: flex; gap: 8px; padding: 10px 12px 12px; background: var(--ez-card); border-top: 1px solid var(--ez-line); }
.ez-input { flex: 1; min-width: 0; border: 1px solid var(--ez-line); border-radius: 999px; padding: 10px 16px; font: inherit; background: #f8fafd; color: var(--ez-ink); }
.ez-input:disabled { background: #eef2f7; }
.ez-send { border: 0; border-radius: 50%; width: 42px; height: 42px; background: var(--ez-blue); color: #fff; display: grid; place-items: center; flex: none; }
.ez-send svg { width: 20px; height: 20px; transform: scaleX(-1); }
.ez-send:disabled { background: #b7c6d8; }
.ez-foot { text-align: center; font-size: 12px; color: var(--ez-ink-soft); padding: 0 12px 8px; background: var(--ez-card); }
.ez-foot button { border: 0; background: none; color: var(--ez-ink-soft); text-decoration: underline; padding: 0 2px; font-size: 12px; }

@keyframes ez-pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes ez-blink { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) {
	.ez-panel, .ez-nudge, .ez-typing i { animation: none; }
	.ez-msgs { scroll-behavior: auto; }
	.ez-launch { transition: none; }
}
@media (max-width: 520px) {
	#easyRoot { left: 12px; bottom: var(--ez-bottom, 12px); }
	.ez-launch-label { display: none; }
	.ez-launch { width: 58px; }
	#easyRoot.ez-open { left: 0; right: 0; top: var(--ez-top, 0px); bottom: auto !important; height: var(--ez-vh, 100%); }
	#easyRoot.ez-open .ez-panel { width: 100vw; max-width: none; height: 100%; max-height: none; border-radius: 0; border: 0; }
	.ez-nudge { width: 220px; }
	.ez-input { font-size: 16px; } /* 16px: iOS does not zoom the page when the field is focused */
}
