/* Aloe'Deeki Live Chat — all selectors namespaced .adlc (BEM). Brand vars injected inline from settings. */
.adlc {
	--adlc-primary: #006e08;
	--adlc-accent: #17b700;
	--adlc-hover: #0d6800;
	--adlc-radius: 12px;
	--adlc-font: "Rubik";
	--adlc-ink: #1f2a1f;
	--adlc-muted: #6b7280;
	--adlc-line: #e8e8e8;
	--adlc-tint: #f7fbf7;
	--adlc-agent: #eef6ee;
	font-family: var(--adlc-font), system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.45;
	color: var(--adlc-ink);
	-webkit-font-smoothing: antialiased;
}
.adlc *, .adlc *::before, .adlc *::after { box-sizing: border-box; }
.adlc [hidden] { display: none !important; }
.adlc button { font: inherit; cursor: pointer; margin: 0; }

/* Floating container */
.adlc--floating { position: fixed; bottom: 24px; z-index: 2147483000; }
.adlc--floating.adlc--right { right: 24px; }
.adlc--floating.adlc--left { left: 24px; }

/* Launcher */
.adlc__launcher {
	position: relative; width: 60px; height: 60px; border: 0; border-radius: 50%; padding: 0;
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--adlc-primary); color: #fff;
	box-shadow: 0 10px 24px rgba(0, 0, 0, .2);
	transition: transform .18s ease, background-color .18s ease;
}
.adlc__launcher:hover { background: var(--adlc-hover); transform: translateY(-2px); }
.adlc__launcher .adlc__icon--close { display: none; }
.adlc--open .adlc__launcher .adlc__icon--chat { display: none; }
.adlc--open .adlc__launcher .adlc__icon--close { display: block; }
.adlc__badge {
	position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 6px;
	border-radius: 999px; background: var(--adlc-accent); color: #fff; font-size: 11px; font-weight: 700;
	line-height: 20px; text-align: center; box-shadow: 0 0 0 2px #fff;
}

/* Panel */
.adlc__panel {
	display: flex; flex-direction: column; overflow: hidden; background: #fff;
	border-radius: var(--adlc-radius); box-shadow: 0 18px 44px rgba(0, 0, 0, .22);
}
.adlc--floating .adlc__panel {
	position: absolute; bottom: 76px; width: 370px; max-width: calc(100vw - 32px);
	height: 560px; max-height: calc(100vh - 120px);
	transform-origin: bottom right; animation: adlc-in .2s ease-out;
}
.adlc--floating.adlc--right .adlc__panel { right: 0; }
.adlc--floating.adlc--left .adlc__panel { left: 0; transform-origin: bottom left; }
.adlc--inline { width: 100%; max-width: 560px; margin: 0 auto; }
.adlc--inline .adlc__panel { height: 560px; border: 1px solid var(--adlc-line); box-shadow: 0 6px 20px rgba(0, 0, 0, .06); }
@keyframes adlc-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

/* Header */
.adlc__header {
	flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 8px;
	min-height: 60px; padding: 10px 12px 10px 16px; background: var(--adlc-primary); color: #fff;
}
.adlc__heading { min-width: 0; }
.adlc__title { margin: 0; padding: 0; font: 600 16px/1.2 var(--adlc-font), system-ui, sans-serif; color: #fff; letter-spacing: 0; text-transform: none; }
.adlc__status { display: inline-flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 12px; opacity: .92; }
.adlc__status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #c7d2c7; }
.adlc--online .adlc__status::before { background: #7dff6b; box-shadow: 0 0 0 3px rgba(125, 255, 107, .25); }
.adlc__actions { display: flex; gap: 4px; }
.adlc__action {
	width: 34px; height: 34px; border: 0; border-radius: 8px; padding: 0; background: transparent; color: #fff;
	display: inline-flex; align-items: center; justify-content: center; opacity: .85;
}
.adlc__action:hover { background: rgba(255, 255, 255, .14); opacity: 1; }

/* Views */
.adlc__view { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.adlc__view--start { overflow-y: auto; background: var(--adlc-tint); }
.adlc__intro { padding: 16px 16px 4px; }
.adlc__intro-title { margin: 0 0 4px; font-weight: 600; }
.adlc__intro-text { margin: 0; white-space: pre-line; }
.adlc__form { display: flex; flex-direction: column; gap: 10px; padding: 12px 16px 16px; }
.adlc__field { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.adlc__label { font-size: 13px; font-weight: 500; color: var(--adlc-ink); }
.adlc__input {
	width: 100%; margin: 0; padding: 10px 12px; border: 1px solid #cfd8cf; border-radius: 8px;
	background: #fff; color: var(--adlc-ink); font: inherit; font-size: 16px; line-height: 1.35; box-shadow: none;
}
.adlc__input--area { resize: vertical; min-height: 84px; }
.adlc__input:focus { border-color: var(--adlc-primary); outline: none; box-shadow: 0 0 0 3px rgba(23, 183, 0, .2); }
.adlc__hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.adlc__privacy { margin: 0; font-size: 12px; color: var(--adlc-muted); }
.adlc__error { margin: 0; padding: 8px 10px; border-radius: 8px; background: #fdecec; color: #9b1c1c; font-size: 13px; }
.adlc__submit {
	min-height: 48px; border: 0; border-radius: 8px; padding: 12px 16px;
	background: var(--adlc-accent); color: #fff; font-weight: 600; font-size: 15px;
	transition: background-color .18s ease;
}
.adlc__submit:hover { background: var(--adlc-hover); }
.adlc__submit:disabled, .adlc__send:disabled { opacity: .6; cursor: default; }

/* Messages */
.adlc__messages {
	flex: 1 1 auto; min-height: 0; overflow-y: auto; margin: 0; padding: 14px 12px 8px; list-style: none;
	background: var(--adlc-tint); display: flex; flex-direction: column; gap: 6px; overscroll-behavior: contain;
}
.adlc__msg { display: flex; flex-direction: column; max-width: 82%; margin: 0; padding: 0; }
.adlc__msg--visitor { align-self: flex-end; align-items: flex-end; }
.adlc__msg--admin { align-self: flex-start; align-items: flex-start; }
.adlc__msg--system { align-self: center; max-width: 92%; align-items: center; }
.adlc__bubble { padding: 9px 12px; border-radius: 14px; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; }
.adlc__msg--visitor .adlc__bubble { background: var(--adlc-primary); color: #fff; border-top-right-radius: 4px; }
.adlc__msg--admin .adlc__bubble { background: var(--adlc-agent); color: var(--adlc-ink); border-top-left-radius: 4px; border: 1px solid #dcebdc; }
.adlc__msg--system .adlc__bubble { background: transparent; color: var(--adlc-muted); font-size: 13px; text-align: center; padding: 4px 8px; }
.adlc__meta { margin-top: 2px; font-size: 11px; color: #8a938a; }
.adlc__notice { margin: 0; padding: 6px 12px; font-size: 12px; background: #fff8e6; color: #7a5b00; }

/* Composer */
.adlc__composer {
	flex: 0 0 auto; display: flex; align-items: flex-end; gap: 8px; margin: 0;
	padding: 10px; border-top: 1px solid var(--adlc-line); background: #fff;
}
.adlc__compose {
	flex: 1 1 auto; min-height: 42px; max-height: 120px; margin: 0; padding: 10px 14px; resize: none;
	border: 1px solid #cfd8cf; border-radius: 21px; background: #fff; color: var(--adlc-ink);
	font: inherit; font-size: 16px; line-height: 1.35; box-shadow: none;
}
.adlc__compose:focus { border-color: var(--adlc-primary); outline: none; box-shadow: 0 0 0 3px rgba(23, 183, 0, .2); }
.adlc__send {
	flex: 0 0 auto; width: 42px; height: 42px; border: 0; border-radius: 50%; padding: 0;
	display: inline-flex; align-items: center; justify-content: center; background: var(--adlc-accent); color: #fff;
}
.adlc__send:hover { background: var(--adlc-hover); }
.adlc__sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Focus (WCAG 2.1 AA, brand focus ring) */
.adlc button:focus-visible, .adlc__launcher:focus-visible { outline: 3px solid var(--adlc-accent); outline-offset: 3px; }

/* Mobile */
@media (max-width: 768px) {
	.adlc--floating { bottom: 16px; }
	.adlc--floating.adlc--right { right: 16px; }
	.adlc--floating.adlc--left { left: 16px; }
	.adlc__launcher { width: 56px; height: 56px; }
}
@media (max-width: 480px) {
	.adlc--floating .adlc__panel {
		position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; max-height: none;
		border-radius: 0; animation: none;
	}
	.adlc--floating.adlc--open .adlc__launcher { display: none; }
	.adlc__header { padding-top: max(10px, env(safe-area-inset-top)); }
	.adlc__composer { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
}
@media (max-width: 399px) { .adlc--hide-xs { display: none !important; } }
@media (prefers-reduced-motion: reduce) {
	.adlc__panel, .adlc__launcher { animation: none !important; transition: none !important; }
}
@media print { .adlc--floating { display: none !important; } }
