/*! Maier Live Chat widget v2 */
@font-face { font-family: "MaierVazirmatn"; src: url("../fonts/Vazirmatn-FD-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "MaierVazirmatn"; src: url("../fonts/Vazirmatn-FD-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "MaierVazirmatn"; src: url("../fonts/Vazirmatn-FD-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

#maier-chat-root {
	--mc-primary: #d71920;
	--mc-primary-2: color-mix(in srgb, var(--mc-primary) 78%, #000);
	--mc-primary-soft: color-mix(in srgb, var(--mc-primary) 9%, #fff);
	--mc-x: 24px; --mc-y: 24px; --mc-xm: 16px; --mc-ym: 16px; --mc-size: 62px;
	--mc-ink: #1f2329;
	--mc-ink-2: #5b616b;
	--mc-ink-3: #8b9099;
	--mc-line: #e9eaee;
	--mc-bg: #f5f6f8;
	--mc-card: #ffffff;
	--mc-radius: 22px;
	--mc-shadow: 0 24px 60px -12px rgba(17, 20, 28, .28), 0 8px 20px -8px rgba(17, 20, 28, .18);
	--mc-font: "MaierVazirmatn", "Vazirmatn", Tahoma, system-ui, sans-serif;
	--mc-gap-x: var(--mc-x);
	--mc-gap-y: var(--mc-y);
	position: static;
	direction: rtl;
	font-family: var(--mc-font);
	z-index: 2147483000;
}
@supports not (color: color-mix(in srgb, red, blue)) {
	#maier-chat-root { --mc-primary-2: #a8141a; --mc-primary-soft: #fdecec; }
}
@media (max-width: 520px) {
	#maier-chat-root { --mc-gap-x: var(--mc-xm); --mc-gap-y: var(--mc-ym); }
}

/* ---------- Scoped reset (theme styles must not leak in) ---------- */
#maier-chat-root, #maier-chat-root *, #maier-chat-root *::before, #maier-chat-root *::after { box-sizing: border-box; }
#maier-chat-root :where(div, section, header, footer, p, h2, h3, span, b, i, em, small, time, a, button, input, textarea, label, form, img, svg) {
	margin: 0; padding: 0; border: 0; font: inherit; color: inherit; background: none; letter-spacing: normal; text-transform: none; text-shadow: none; box-shadow: none; line-height: inherit; text-align: inherit; float: none; min-width: 0; max-width: none; width: auto; height: auto;
}
#maier-chat-root [hidden] { display: none !important; }
#maier-chat-root button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
#maier-chat-root button:disabled { cursor: default; opacity: .45; }
#maier-chat-root :focus-visible { outline: 2px solid var(--mc-primary); outline-offset: 2px; border-radius: 10px; }
#maier-chat-root .mc-i { width: 20px; height: 20px; flex: none; display: block; }
#maier-chat-root a { text-decoration: none; }

/* ---------- Dock (launcher + teaser) ---------- */
#maier-chat-root .mc-dock {
	position: fixed; z-index: 2147483001;
	display: flex; flex-direction: column; gap: 12px;
	font-size: 14px; line-height: 1.6; color: var(--mc-ink);
}
#maier-chat-root.mc-right .mc-dock { right: var(--mc-gap-x); align-items: flex-start; }
#maier-chat-root.mc-left .mc-dock { left: var(--mc-gap-x); align-items: flex-end; }
#maier-chat-root.mc-bottom .mc-dock { bottom: var(--mc-gap-y); }
#maier-chat-root.mc-top .mc-dock { top: var(--mc-gap-y); flex-direction: column-reverse; }
/* The icon always sits exactly in the chosen corner; the label goes beside it. */
#maier-chat-root .mc-launcher-row { display: flex; align-items: center; gap: 10px; flex-direction: row-reverse; }
#maier-chat-root.mc-left .mc-launcher-row { flex-direction: row; }

#maier-chat-root .mc-launcher {
	position: relative; display: grid; place-items: center;
	width: var(--mc-size); height: var(--mc-size); border-radius: 50%;
	color: #fff;
	background: radial-gradient(120% 120% at 30% 20%, color-mix(in srgb, var(--mc-primary) 80%, #fff) 0%, var(--mc-primary) 45%, var(--mc-primary-2) 100%);
	box-shadow: 0 14px 30px -8px color-mix(in srgb, var(--mc-primary) 70%, transparent), 0 4px 10px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.35);
	transition: transform .25s cubic-bezier(.2,.9,.3,1.3), box-shadow .25s;
}
#maier-chat-root .mc-launcher:hover { transform: translateY(-2px) scale(1.04); }
#maier-chat-root .mc-launcher:active { transform: scale(.96); }
#maier-chat-root .mc-launcher::after {
	content: ""; position: absolute; inset: -6px; border-radius: 50%;
	border: 2px solid color-mix(in srgb, var(--mc-primary) 45%, transparent);
	opacity: 0; pointer-events: none;
}
#maier-chat-root.mc-has-unread .mc-launcher::after, #maier-chat-root.mc-teasing .mc-launcher::after { animation: mc-ring 2.2s ease-out infinite; }
#maier-chat-root .mc-launcher-icon { position: relative; width: 46%; height: 46%; }
#maier-chat-root .mc-launcher-icon .mc-i { position: absolute; inset: 0; width: 100%; height: 100%; transition: transform .3s cubic-bezier(.2,.9,.3,1.2), opacity .2s; }
#maier-chat-root .mc-ico-close { opacity: 0; transform: rotate(-90deg) scale(.6); }
#maier-chat-root.mc-is-open .mc-ico-open { opacity: 0; transform: rotate(90deg) scale(.6); }
#maier-chat-root.mc-is-open .mc-ico-close { opacity: 1; transform: none; }
#maier-chat-root .mc-badge {
	position: absolute; top: -3px; right: -3px; min-width: 22px; height: 22px; padding: 0 6px;
	display: grid; place-items: center; border-radius: 11px;
	background: #fff; color: var(--mc-primary); font-size: 12px; font-weight: 700; line-height: 1;
	box-shadow: 0 2px 8px rgba(0,0,0,.2);
	animation: mc-pop .35s cubic-bezier(.2,.9,.3,1.4);
}
#maier-chat-root .mc-launcher-label {
	background: #fff; color: var(--mc-ink); font-weight: 500; font-size: 13.5px;
	padding: 8px 16px; border-radius: 999px; white-space: nowrap;
	box-shadow: 0 8px 24px -6px rgba(17,20,28,.22), 0 0 0 1px rgba(17,20,28,.04);
}
#maier-chat-root.mc-is-open .mc-launcher-label { display: none; }

#maier-chat-root .mc-teaser {
	position: relative; max-width: min(300px, calc(100vw - 32px));
	background: #fff; border-radius: 18px; padding: 4px;
	box-shadow: 0 18px 40px -10px rgba(17,20,28,.28), 0 0 0 1px rgba(17,20,28,.04);
	animation: mc-rise .45s cubic-bezier(.2,.9,.3,1.2);
}
#maier-chat-root .mc-teaser-body { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px 12px 30px; text-align: start; font-size: 13.5px; line-height: 1.8; color: var(--mc-ink); }
#maier-chat-root .mc-teaser-avatar { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--mc-primary-soft); color: var(--mc-primary); }
#maier-chat-root .mc-teaser-close { position: absolute; top: 6px; left: 6px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: var(--mc-ink-3); }
#maier-chat-root .mc-teaser-close .mc-i { width: 15px; height: 15px; }
#maier-chat-root .mc-teaser-close:hover { background: var(--mc-bg); color: var(--mc-ink); }
#maier-chat-root.mc-is-open .mc-teaser { display: none; }

/* ---------- Panel ---------- */
#maier-chat-root .mc-panel {
	position: fixed; z-index: 2147483002;
	width: 392px; height: min(640px, calc(100vh - var(--mc-gap-y) - var(--mc-size) - 40px));
	min-height: 420px;
	display: flex; flex-direction: column; overflow: hidden;
	background: var(--mc-bg); color: var(--mc-ink);
	border-radius: var(--mc-radius);
	box-shadow: var(--mc-shadow), 0 0 0 1px rgba(17,20,28,.05);
	font-size: 14.5px; line-height: 1.75;
	animation: mc-open .32s cubic-bezier(.2,.9,.3,1.1);
}
#maier-chat-root.mc-right .mc-panel { right: var(--mc-gap-x); transform-origin: bottom right; }
#maier-chat-root.mc-left .mc-panel { left: var(--mc-gap-x); transform-origin: bottom left; }
#maier-chat-root.mc-bottom .mc-panel { bottom: calc(var(--mc-gap-y) + var(--mc-size) + 16px); }
#maier-chat-root.mc-top .mc-panel { top: calc(var(--mc-gap-y) + var(--mc-size) + 16px); }
#maier-chat-root.mc-top.mc-right .mc-panel { transform-origin: top right; }
#maier-chat-root.mc-top.mc-left .mc-panel { transform-origin: top left; }

/* Header */
#maier-chat-root .mc-head {
	position: relative; display: flex; align-items: center; gap: 12px;
	padding: 16px 16px 18px; color: #fff;
	background:
		radial-gradient(140% 120% at 100% 0%, rgba(255,255,255,.18) 0%, transparent 55%),
		linear-gradient(135deg, var(--mc-primary) 0%, var(--mc-primary-2) 100%);
}
#maier-chat-root .mc-head::after { content: ""; position: absolute; inset: auto 0 -1px 0; height: 14px; background: var(--mc-bg); border-radius: 14px 14px 0 0; }
#maier-chat-root .mc-avatar { position: relative; flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.16); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.35); }
#maier-chat-root .mc-avatar .mc-i { width: 24px; height: 24px; }
#maier-chat-root .mc-presence { position: absolute; bottom: 1px; left: 1px; width: 12px; height: 12px; border-radius: 50%; background: #2ecc71; box-shadow: 0 0 0 2.5px var(--mc-primary); }
#maier-chat-root.mc-offline .mc-presence { background: #b8bcc4; }
#maier-chat-root .mc-head-text { flex: 1; min-width: 0; }
#maier-chat-root .mc-title { font-size: 16px; font-weight: 700; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#maier-chat-root .mc-sub { display: flex; gap: 6px; align-items: center; font-size: 12.5px; opacity: .92; white-space: nowrap; overflow: hidden; }
#maier-chat-root .mc-sub > span:last-child { overflow: hidden; text-overflow: ellipsis; }
#maier-chat-root .mc-status { flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 0 8px; border-radius: 999px; background: rgba(255,255,255,.18); font-size: 11.5px; font-weight: 500; }
#maier-chat-root .mc-hbtn { flex: none; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; color: #fff; transition: background .15s; }
#maier-chat-root .mc-hbtn:hover { background: rgba(255,255,255,.16); }
#maier-chat-root .mc-menu {
	position: absolute; top: 58px; left: 52px; z-index: 5; min-width: 210px;
	background: #fff; color: var(--mc-ink); border-radius: 14px; padding: 6px;
	box-shadow: 0 16px 40px -8px rgba(17,20,28,.3), 0 0 0 1px rgba(17,20,28,.05);
	animation: mc-rise .2s ease-out;
}
#maier-chat-root .mc-menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; font-size: 13.5px; text-align: start; }
#maier-chat-root .mc-menu button:hover { background: var(--mc-bg); }
#maier-chat-root .mc-menu .mc-i { color: var(--mc-ink-2); width: 18px; height: 18px; }

/* Banner */
#maier-chat-root .mc-banner { display: flex; gap: 10px; align-items: flex-start; margin: 4px 12px 0; padding: 10px 12px; border-radius: 14px; background: #fff; color: var(--mc-ink-2); font-size: 12.5px; line-height: 1.8; box-shadow: 0 0 0 1px var(--mc-line); }
#maier-chat-root .mc-banner > .mc-i { color: #8a6d1d; margin-top: 2px; }
#maier-chat-root .mc-banner-bad { background: #fff5f5; color: #9b1c1c; box-shadow: 0 0 0 1px #f6d2d2; }
#maier-chat-root .mc-banner-bad > .mc-i { color: #c81e1e; }
#maier-chat-root .mc-banner .mc-chips { margin-top: 8px; }

/* Scroll area */
#maier-chat-root .mc-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 8px 14px 6px; scrollbar-width: thin; scrollbar-color: #d4d6db transparent; }
#maier-chat-root .mc-scroll::-webkit-scrollbar { width: 6px; }
#maier-chat-root .mc-scroll::-webkit-scrollbar-thumb { background: #d4d6db; border-radius: 3px; }
#maier-chat-root .mc-log { display: flex; flex-direction: column; gap: 4px; padding-bottom: 6px; }

#maier-chat-root .mc-day { align-self: center; margin: 10px 0 6px; }
#maier-chat-root .mc-day span { display: inline-block; padding: 2px 12px; border-radius: 999px; background: rgba(17,20,28,.06); color: var(--mc-ink-2); font-size: 11.5px; font-weight: 500; }
#maier-chat-root .mc-author { display: flex; align-items: center; gap: 6px; align-self: flex-end; margin: 8px 4px 0; font-size: 12px; font-weight: 500; color: var(--mc-ink-2); }
#maier-chat-root .mc-author-dot { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--mc-primary-soft); color: var(--mc-primary); }
#maier-chat-root .mc-author-dot .mc-i { width: 13px; height: 13px; }

/* Messages: customer on the right (start), support on the left (end). */
#maier-chat-root .mc-msg { position: relative; display: flex; align-items: center; gap: 4px; max-width: 84%; animation: mc-msg .28s cubic-bezier(.2,.9,.3,1.1); }
#maier-chat-root .mc-me { align-self: flex-start; }
#maier-chat-root .mc-op { align-self: flex-end; flex-direction: row-reverse; }
#maier-chat-root .mc-bubble { position: relative; padding: 8px 12px 6px; border-radius: 18px; word-wrap: break-word; overflow-wrap: anywhere; min-width: 72px; }
#maier-chat-root .mc-me .mc-bubble {
	color: #fff; border-start-start-radius: 6px;
	background: linear-gradient(160deg, color-mix(in srgb, var(--mc-primary) 88%, #fff) 0%, var(--mc-primary) 60%, var(--mc-primary-2) 100%);
	box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--mc-primary) 80%, transparent);
}
#maier-chat-root .mc-op .mc-bubble { background: var(--mc-card); color: var(--mc-ink); border-start-end-radius: 6px; box-shadow: 0 1px 2px rgba(17,20,28,.06), 0 0 0 1px rgba(17,20,28,.04); }
#maier-chat-root .mc-text { white-space: pre-wrap; font-size: 14.5px; }
#maier-chat-root .mc-text a { text-decoration: underline; text-underline-offset: 3px; }
#maier-chat-root .mc-op .mc-text a { color: var(--mc-primary); }
#maier-chat-root .mc-muted { opacity: .7; font-style: italic; }
#maier-chat-root .mc-quote { display: flex; flex-direction: column; margin: 2px 0 6px; padding: 4px 10px; border-inline-start: 3px solid currentColor; border-radius: 8px; background: rgba(17,20,28,.05); font-size: 12.5px; line-height: 1.6; }
#maier-chat-root .mc-me .mc-quote { background: rgba(255,255,255,.16); }
#maier-chat-root .mc-quote span { opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 230px; }
#maier-chat-root .mc-meta { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 2px; font-size: 11px; opacity: .72; line-height: 1.4; }
#maier-chat-root .mc-tick .mc-i { width: 15px; height: 15px; }
#maier-chat-root .mc-tick-failed { color: #ffd6d6; }
#maier-chat-root .mc-edited { font-style: italic; }
#maier-chat-root .mc-img { display: block; margin: -2px -6px 4px; border-radius: 14px; overflow: hidden; background: rgba(17,20,28,.06); }
#maier-chat-root .mc-img img { display: block; width: 240px; max-width: 100%; max-height: 300px; object-fit: cover; }
#maier-chat-root .mc-progress { display: block; height: 3px; margin: 4px 0 2px; border-radius: 2px; background: rgba(255,255,255,.3); overflow: hidden; }
#maier-chat-root .mc-progress i { display: block; height: 100%; background: #fff; transition: width .2s; }
#maier-chat-root .is-failed .mc-bubble { opacity: .75; }
#maier-chat-root .mc-retry { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 999px; background: #fff5f5; color: #b42318; font-size: 11.5px; box-shadow: 0 0 0 1px #f6d2d2; }
#maier-chat-root .mc-retry .mc-i { width: 14px; height: 14px; }

/* Hover actions */
#maier-chat-root .mc-actions { display: flex; gap: 2px; opacity: 0; transition: opacity .15s; }
#maier-chat-root .mc-msg:hover .mc-actions, #maier-chat-root .mc-msg:focus-within .mc-actions { opacity: 1; }
#maier-chat-root .mc-actions .mc-ibtn { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: var(--mc-ink-3); background: #fff; box-shadow: 0 1px 3px rgba(17,20,28,.12); }
#maier-chat-root .mc-actions .mc-ibtn:hover { color: var(--mc-primary); }
#maier-chat-root .mc-actions .mc-i { width: 15px; height: 15px; }
@media (hover: none) { #maier-chat-root .mc-actions { opacity: .85; } }

/* Voice */
#maier-chat-root .mc-voice { display: flex; align-items: center; gap: 10px; min-width: 200px; padding: 2px 0; }
#maier-chat-root .mc-play { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--mc-primary); color: #fff; }
#maier-chat-root .mc-me .mc-play { background: #fff; color: var(--mc-primary); }
#maier-chat-root .mc-play .mc-i { width: 17px; height: 17px; }
#maier-chat-root .mc-wave {
	position: relative; flex: 1; height: 26px; cursor: pointer; overflow: hidden;
	background: repeating-linear-gradient(90deg, color-mix(in srgb, currentColor 32%, transparent) 0 2px, transparent 2px 5px);
	clip-path: polygon(0 40%, 6% 20%, 12% 45%, 18% 10%, 24% 35%, 30% 15%, 36% 50%, 42% 25%, 48% 5%, 54% 30%, 60% 18%, 66% 42%, 72% 12%, 78% 36%, 84% 22%, 90% 45%, 96% 28%, 100% 40%, 100% 60%, 96% 72%, 90% 55%, 84% 78%, 78% 64%, 72% 88%, 66% 58%, 60% 82%, 54% 70%, 48% 95%, 42% 75%, 36% 50%, 30% 85%, 24% 65%, 18% 90%, 12% 55%, 6% 80%, 0 60%);
}
#maier-chat-root .mc-wave i { position: absolute; inset: 0 0 0 auto; width: 0; background: repeating-linear-gradient(90deg, currentColor 0 2px, transparent 2px 5px); }
#maier-chat-root .mc-vtime { font-size: 11.5px; min-width: 34px; font-variant-numeric: tabular-nums; }

/* System notes */
#maier-chat-root .mc-sys { align-self: center; max-width: 92%; margin: 8px 0; padding: 10px 14px; border-radius: 14px; background: #fff; color: var(--mc-ink-2); font-size: 12.5px; line-height: 1.85; text-align: center; box-shadow: 0 0 0 1px var(--mc-line); }
#maier-chat-root .mc-sys-closed { background: #f0f1f4; box-shadow: none; }
#maier-chat-root .mc-sys-ok { color: #12753a; background: #effaf3; box-shadow: none; }
#maier-chat-root .mc-sys-delay { background: #fffaf0; box-shadow: 0 0 0 1px #f5e6c4; color: #6b5317; }
#maier-chat-root .mc-sys .mc-chips { justify-content: center; margin-top: 8px; }
#maier-chat-root .mc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
#maier-chat-root .mc-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: #fff; color: var(--mc-ink); font-size: 12.5px; font-weight: 500; box-shadow: 0 0 0 1px var(--mc-line); transition: box-shadow .15s, color .15s; }
#maier-chat-root .mc-chip:hover { color: var(--mc-primary); box-shadow: 0 0 0 1px var(--mc-primary); }
#maier-chat-root .mc-chip .mc-i { width: 16px; height: 16px; color: var(--mc-primary); }

/* Rating */
#maier-chat-root .mc-rate { align-self: stretch; display: grid; gap: 10px; justify-items: center; margin: 4px 0 8px; padding: 14px; border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px var(--mc-line); text-align: center; font-size: 13.5px; }
#maier-chat-root .mc-stars { display: flex; gap: 6px; direction: ltr; }
#maier-chat-root .mc-star { width: 36px; height: 36px; display: grid; place-items: center; color: #d9dbe0; transition: transform .15s, color .15s; }
#maier-chat-root .mc-star .mc-i { width: 30px; height: 30px; }
#maier-chat-root .mc-star:hover { transform: scale(1.12); }
#maier-chat-root .mc-star.is-on { color: #f5b301; }
#maier-chat-root .mc-rate-comment { width: 100%; resize: none; padding: 8px 12px; border-radius: 12px; background: var(--mc-bg); font-size: 13px; line-height: 1.8; box-shadow: inset 0 0 0 1px var(--mc-line); }

/* Start form */
#maier-chat-root .mc-start { flex: 1; overflow-y: auto; padding: 4px 18px 18px; }
#maier-chat-root .mc-form { display: grid; gap: 12px; }
#maier-chat-root .mc-start-hero { display: grid; justify-items: center; gap: 4px; padding: 14px 0 6px; text-align: center; }
#maier-chat-root .mc-hero-icon { width: 58px; height: 58px; border-radius: 20px; display: grid; place-items: center; color: var(--mc-primary); background: var(--mc-primary-soft); transform: rotate(-6deg); margin-bottom: 6px; }
#maier-chat-root .mc-hero-icon .mc-i { width: 30px; height: 30px; transform: rotate(6deg); }
#maier-chat-root .mc-start-hero h3 { font-size: 16px; font-weight: 700; }
#maier-chat-root .mc-start-hero p { color: var(--mc-ink-2); font-size: 13px; }
#maier-chat-root .mc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#maier-chat-root .mc-field { position: relative; display: block; }
#maier-chat-root .mc-field input {
	display: block; width: 100%; height: 50px; padding: 18px 14px 4px; border-radius: 14px;
	background: #fff; font-size: 14.5px; color: var(--mc-ink);
	box-shadow: inset 0 0 0 1.5px var(--mc-line); transition: box-shadow .15s;
}
#maier-chat-root .mc-field input[dir="ltr"] { text-align: right; }
#maier-chat-root .mc-field input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--mc-primary); }
#maier-chat-root .mc-field > span { position: absolute; top: 14px; right: 14px; color: var(--mc-ink-3); font-size: 14px; pointer-events: none; transition: all .15s ease; }
#maier-chat-root .mc-field input:focus + span, #maier-chat-root .mc-field input:not(:placeholder-shown) + span { top: 4px; font-size: 11px; color: var(--mc-primary); }
#maier-chat-root .mc-err { display: block; color: #c81e1e; font-size: 11.5px; min-height: 0; padding: 2px 4px 0; }
#maier-chat-root .mc-err:empty { display: none; }
#maier-chat-root .mc-hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }
#maier-chat-root .mc-primary {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	height: 50px; padding: 0 20px; border-radius: 14px; color: #fff; font-weight: 700; font-size: 15px;
	background: linear-gradient(135deg, var(--mc-primary), var(--mc-primary-2));
	box-shadow: 0 10px 22px -10px color-mix(in srgb, var(--mc-primary) 85%, transparent);
	transition: transform .15s, filter .15s;
}
#maier-chat-root .mc-primary:hover { filter: brightness(1.06); }
#maier-chat-root .mc-primary:active { transform: scale(.98); }
#maier-chat-root .mc-primary .mc-i { transform: scaleX(-1); width: 18px; height: 18px; }
#maier-chat-root .mc-primary.mc-small { height: 40px; font-size: 13.5px; padding: 0 22px; }
#maier-chat-root .mc-primary.is-busy span::after { content: "…"; }

/* Composer */
#maier-chat-root .mc-composer { position: relative; padding: 8px 12px 6px; background: var(--mc-bg); }
#maier-chat-root .mc-ctx { display: flex; align-items: center; gap: 8px; margin: 0 4px 6px; padding: 6px 10px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--mc-line); color: var(--mc-primary); animation: mc-rise .2s ease-out; }
#maier-chat-root .mc-ctx.is-edit { color: #2563eb; }
#maier-chat-root .mc-ctx-body { flex: 1; display: flex; flex-direction: column; min-width: 0; font-size: 12px; line-height: 1.6; }
#maier-chat-root .mc-ctx-text { color: var(--mc-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#maier-chat-root .mc-ctx-x { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; color: var(--mc-ink-3); }
#maier-chat-root .mc-ctx-x .mc-i { width: 15px; height: 15px; }
#maier-chat-root .mc-bar, #maier-chat-root .mc-rec {
	display: flex; align-items: flex-end; gap: 4px; padding: 5px; border-radius: 24px;
	background: #fff; box-shadow: 0 0 0 1px var(--mc-line), 0 6px 18px -10px rgba(17,20,28,.25);
	transition: box-shadow .15s;
}
#maier-chat-root .mc-bar:focus-within { box-shadow: 0 0 0 1.5px var(--mc-primary), 0 6px 18px -10px rgba(17,20,28,.25); }
#maier-chat-root .mc-ibtn { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%; color: var(--mc-ink-2); transition: background .15s, color .15s; }
#maier-chat-root .mc-bar .mc-ibtn:hover:not(:disabled) { background: var(--mc-bg); color: var(--mc-primary); }
#maier-chat-root .mc-input {
	flex: 1; min-height: 40px; max-height: 132px; padding: 8px 6px; resize: none; overflow-y: auto;
	font-size: 14.5px; line-height: 1.7; color: var(--mc-ink); background: transparent; border: 0; outline: none;
}
#maier-chat-root .mc-input::placeholder { color: var(--mc-ink-3); }
#maier-chat-root .mc-send {
	width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%; color: #fff;
	background: linear-gradient(135deg, var(--mc-primary), var(--mc-primary-2));
	box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--mc-primary) 90%, transparent);
	transition: transform .15s;
	animation: mc-pop .25s cubic-bezier(.2,.9,.3,1.4);
}
#maier-chat-root .mc-send .mc-i { transform: scaleX(-1); width: 19px; height: 19px; }
#maier-chat-root .mc-send:hover:not(:disabled) { transform: scale(1.06); }
#maier-chat-root .mc-file { display: none !important; }
#maier-chat-root .mc-rec { align-items: center; padding-inline-start: 8px; }
#maier-chat-root .mc-rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #e02424; animation: mc-blink 1s ease-in-out infinite; }
#maier-chat-root .mc-rec-label { flex: 1; font-size: 13px; color: var(--mc-ink-2); }
#maier-chat-root .mc-rec-time { font-variant-numeric: tabular-nums; font-weight: 500; padding: 0 6px; }

#maier-chat-root .mc-toast { position: absolute; left: 16px; right: 16px; bottom: 90px; z-index: 4; padding: 10px 14px; border-radius: 12px; background: #1f2329; color: #fff; font-size: 13px; line-height: 1.7; text-align: center; box-shadow: 0 10px 30px -8px rgba(0,0,0,.4); animation: mc-rise .25s ease-out; }
#maier-chat-root .mc-foot { padding: 0 12px 8px; text-align: center; font-size: 10.5px; color: var(--mc-ink-3); background: var(--mc-bg); }

/* Lightbox */
#maier-chat-root .mc-lightbox { position: fixed; inset: 0; z-index: 2147483005; display: grid; place-items: center; padding: 24px; background: rgba(10,12,16,.86); animation: mc-fade .2s ease-out; }
#maier-chat-root .mc-lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
#maier-chat-root .mc-lb-x { position: absolute; top: 16px; right: 16px; color: #fff; background: rgba(255,255,255,.12); }

/* Mobile: full screen panel */
@media (max-width: 520px) {
	#maier-chat-root .mc-panel { inset: 0 !important; width: 100%; height: 100%; min-height: 0; border-radius: 0; animation: mc-slide .3s cubic-bezier(.2,.9,.3,1); }
	#maier-chat-root .mc-head { padding-top: max(14px, env(safe-area-inset-top)); }
	#maier-chat-root .mc-composer { padding-bottom: max(8px, env(safe-area-inset-bottom)); }
	#maier-chat-root.mc-is-open .mc-dock { display: none; }
	#maier-chat-root .mc-input, #maier-chat-root .mc-field input { font-size: 16px; }
	#maier-chat-root .mc-msg { max-width: 88%; }
}
@media (max-height: 560px) and (min-width: 521px) {
	#maier-chat-root .mc-panel { min-height: 0; }
}

/* Animations */
@keyframes mc-open { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes mc-slide { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes mc-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes mc-msg { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes mc-pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes mc-ring { 0% { transform: scale(.9); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
@keyframes mc-blink { 50% { opacity: .25; } }
@keyframes mc-fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
	#maier-chat-root *, #maier-chat-root *::before, #maier-chat-root *::after { animation: none !important; transition: none !important; }
}
@media print { #maier-chat-root { display: none !important; } }
