/* Marmic Lead Agent widget. Brand: coral #FF6058 (site buttons), charcoal #2D2E36. */
#mla-root {
	--mla-coral: #ff6058;
	--mla-coral-dark: #c8332c; /* white text contrast >= 4.5:1 */
	--mla-ink: #2d2e36;
	--mla-text: #2d2e36;
	--mla-muted: #5b5d66;
	--mla-bg: #ffffff;
	--mla-soft: #f7f7f7;
	--mla-border: #e3e3e6;
	--mla-radius: 16px;
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 99999;
	font-family: Roboto, "Segoe UI", Helvetica, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.45;
	color: var(--mla-text);
}
#mla-root *, #mla-root *::before, #mla-root *::after { box-sizing: border-box; }
#mla-root [hidden] { display: none !important; }

.mla-launcher {
	display: flex; align-items: center; gap: 10px;
	height: 56px; padding: 0 20px 0 16px;
	border: 0; border-radius: 999px; cursor: pointer;
	background: var(--mla-coral-dark); color: #fff;
	font: 600 15px/1 inherit; font-family: inherit;
	box-shadow: 0 8px 24px rgba(45, 46, 54, .28);
	transition: transform .15s ease, box-shadow .15s ease;
}
.mla-launcher:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(45, 46, 54, .34); }
.mla-launcher:focus-visible, #mla-root button:focus-visible, #mla-root a:focus-visible,
#mla-root textarea:focus-visible, #mla-root input:focus-visible {
	outline: 3px solid #1d4ed8; outline-offset: 2px;
}
.mla-launcher svg { width: 24px; height: 24px; flex: 0 0 auto; }
.mla-launcher .mla-preview-dot {
	font-size: 11px; font-weight: 700; background: #ffd34d; color: #2d2e36; border-radius: 999px; padding: 3px 7px;
}

.mla-panel {
	position: absolute; right: 0; bottom: 72px;
	width: 380px; max-width: calc(100vw - 24px);
	height: 600px; max-height: calc(100vh - 110px);
	display: flex; flex-direction: column;
	background: var(--mla-bg); border-radius: var(--mla-radius);
	box-shadow: 0 18px 48px rgba(45, 46, 54, .3);
	overflow: hidden; border: 1px solid var(--mla-border);
}
.mla-header {
	display: flex; align-items: center; gap: 12px;
	padding: 14px 14px 14px 16px; background: var(--mla-ink); color: #fff;
	border-bottom: 3px solid var(--mla-coral);
}
.mla-logo {
	width: 52px; height: 36px; flex: 0 0 auto; border-radius: 8px; background: #fff;
	display: flex; align-items: center; justify-content: center; padding: 3px;
}
.mla-logo img { max-width: 100%; max-height: 100%; display: block; }
.mla-titles { flex: 1 1 auto; min-width: 0; }
.mla-title { margin: 0; font-size: 16px; font-weight: 700; color: #fff; line-height: 1.2; }
.mla-subtitle { margin: 2px 0 0; font-size: 12.5px; color: #d9dae0; }
.mla-close {
	width: 36px; height: 36px; border: 0; border-radius: 8px; cursor: pointer;
	background: transparent; color: #fff; font-size: 24px; line-height: 1;
}
.mla-close:hover { background: rgba(255,255,255,.12); }

.mla-badge {
	background: #fff4cc; color: #5c4400; font-size: 12.5px; font-weight: 600;
	padding: 7px 14px; border-bottom: 1px solid #f0dc8a;
}
.mla-setup {
	background: #fdecec; color: #8a1f1a; font-size: 13px; padding: 8px 14px; border-bottom: 1px solid #f3c1be;
}
.mla-urgent {
	display: flex; align-items: center; justify-content: center; gap: 6px;
	font-size: 13px; padding: 7px 12px; background: var(--mla-soft); border-bottom: 1px solid var(--mla-border); color: var(--mla-muted);
}
.mla-urgent a { color: var(--mla-coral-dark); font-weight: 700; text-decoration: none; }
.mla-urgent a:hover { text-decoration: underline; }

.mla-log {
	flex: 1 1 auto; overflow-y: auto; padding: 16px 14px 8px;
	display: flex; flex-direction: column; gap: 10px; background: #fff;
}
.mla-msg { max-width: 86%; padding: 10px 13px; border-radius: 14px; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; }
.mla-msg a { color: inherit; text-decoration: underline; }
.mla-msg--bot { align-self: flex-start; background: var(--mla-soft); border: 1px solid var(--mla-border); border-bottom-left-radius: 4px; }
.mla-msg--bot a { color: var(--mla-coral-dark); }
.mla-msg--user { align-self: flex-end; background: var(--mla-ink); color: #fff; border-bottom-right-radius: 4px; }
.mla-msg--note { align-self: center; max-width: 100%; font-size: 13px; color: var(--mla-muted); background: transparent; padding: 2px 6px; text-align: center; }
.mla-msg--error { align-self: flex-start; background: #fdecec; color: #8a1f1a; border: 1px solid #f3c1be; }

.mla-typing { align-self: flex-start; display: flex; gap: 4px; padding: 12px 14px; background: var(--mla-soft); border-radius: 14px; }
.mla-typing span { width: 7px; height: 7px; border-radius: 50%; background: #9a9ca6; animation: mla-bounce 1.2s infinite ease-in-out; }
.mla-typing span:nth-child(2) { animation-delay: .15s; }
.mla-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes mla-bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-4px); opacity: 1; } }

.mla-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; }
.mla-chip {
	border: 1px solid var(--mla-coral-dark); background: #fff; color: var(--mla-coral-dark);
	border-radius: 999px; padding: 6px 11px; font: 600 13px/1.2 inherit; font-family: inherit; cursor: pointer;
}
.mla-chip:hover { background: #fff1f0; }

.mla-compose { border-top: 1px solid var(--mla-border); padding: 10px 12px 8px; background: #fff; }
.mla-row { display: flex; gap: 8px; align-items: flex-end; }
.mla-input {
	flex: 1 1 auto; resize: none; min-height: 44px; max-height: 120px;
	border: 1px solid #c9cad1; border-radius: 12px; padding: 10px 12px;
	font: 15px/1.4 inherit; font-family: inherit; color: var(--mla-text); background: #fff;
}
.mla-send {
	flex: 0 0 auto; width: 44px; height: 44px; border: 0; border-radius: 12px; cursor: pointer;
	background: var(--mla-coral-dark); color: #fff; display: flex; align-items: center; justify-content: center;
}
.mla-send:disabled { opacity: .55; cursor: not-allowed; }
.mla-send svg { width: 20px; height: 20px; }
.mla-foot { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-top: 6px; }
.mla-privacy { margin: 0; font-size: 11.5px; color: var(--mla-muted); }
.mla-linkbtn {
	border: 0; background: none; padding: 0; color: var(--mla-coral-dark); cursor: pointer;
	font: 600 12.5px/1.3 inherit; font-family: inherit; text-decoration: underline; white-space: nowrap;
}

.mla-form { padding: 14px; overflow-y: auto; flex: 1 1 auto; }
.mla-form p.mla-form-intro { margin: 0 0 10px; font-size: 14px; }
.mla-field { margin-bottom: 10px; }
.mla-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.mla-field input, .mla-field textarea {
	width: 100%; border: 1px solid #c9cad1; border-radius: 10px; padding: 9px 11px;
	font: 15px/1.4 inherit; font-family: inherit; color: var(--mla-text); background: #fff;
}
.mla-form-actions { display: flex; gap: 10px; align-items: center; }
.mla-btn {
	border: 0; border-radius: 10px; padding: 10px 16px; cursor: pointer;
	background: var(--mla-coral-dark); color: #fff; font: 600 14px/1 inherit; font-family: inherit;
}
.mla-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.mla-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

@media (max-width: 480px) {
	#mla-root { right: 12px; bottom: 12px; }
	#mla-root.mla-open { right: 0; bottom: 0; left: 0; top: 0; }
	#mla-root.mla-open .mla-launcher { display: none; }
	#mla-root.mla-open .mla-panel {
		position: fixed; inset: 0; width: 100%; max-width: 100%; height: 100%; max-height: 100%; border-radius: 0; border: 0;
	}
	.mla-launcher .mla-label { display: none; }
	.mla-launcher { width: 56px; padding: 0; justify-content: center; }
	.mla-launcher .mla-preview-dot { position: absolute; top: -6px; right: -6px; }
}
@media (prefers-reduced-motion: reduce) {
	.mla-launcher, .mla-typing span { transition: none; animation: none; }
}
@media print { #mla-root { display: none !important; } }
