/* Amazing WhatsApp Live Chat: front end. All rules are scoped to .awlc / .awlc-btn. */

.awlc{
	--awlc-surface:#fff;
	--awlc-text:#111b21;
	--awlc-muted:#54656f;
	--awlc-line:#d9dee2;
	position:fixed;
	bottom:calc(var(--awlc-y,80px) + env(safe-area-inset-bottom,0px));
	z-index:var(--awlc-z,9990);
	display:flex;
	flex-direction:column;
	align-items:flex-end;
	gap:12px;
	font-family:inherit;
	font-size:15px;
	line-height:1.4;
	color:var(--awlc-text);
	max-width:100vw;
}
.awlc *,.awlc *::before,.awlc *::after{box-sizing:border-box}
.awlc[hidden]{display:none!important}
.awlc--right{right:max(var(--awlc-x,18px),env(safe-area-inset-right,0px))}
.awlc--left{left:max(var(--awlc-x,18px),env(safe-area-inset-left,0px));align-items:flex-start}
body.menu-open .awlc{opacity:0;pointer-events:none}

/* ---------- Floating button ---------- */
.awlc__fab{
	position:relative;
	isolation:isolate;
	display:inline-flex;
	align-items:center;
	justify-content:center;
	height:var(--awlc-size,60px);
	min-width:var(--awlc-size,60px);
	padding:0;
	margin:0;
	border:0;
	border-radius:999px;
	background:var(--awlc-btn,#25D366);
	color:#fff;
	cursor:pointer;
	box-shadow:0 6px 20px rgba(0,0,0,.28);
	text-decoration:none;
	font:inherit;
	font-weight:600;
	-webkit-tap-highlight-color:transparent;
	transition:transform .2s,box-shadow .2s;
}
.awlc--rounded .awlc__fab{border-radius:18px}
.awlc__fab:hover{transform:translateY(-2px);box-shadow:0 10px 26px rgba(0,0,0,.32);color:#fff}
.awlc__fab:focus-visible,.awlc__close:focus-visible,.awlc__agent:focus-visible,.awlc__teaser button:focus-visible{outline:3px solid #fff;outline-offset:2px;box-shadow:0 0 0 5px var(--awlc-head,#075E54)}
.awlc__fab-icon{display:grid;place-items:center;width:var(--awlc-size,60px);height:var(--awlc-size,60px);flex:0 0 auto}
.awlc__fab-icon svg{width:calc(var(--awlc-size,60px)*.5);height:calc(var(--awlc-size,60px)*.5)}
.awlc__fab-label{max-width:0;opacity:0;overflow:hidden;white-space:nowrap;transition:max-width .25s,opacity .2s,padding .25s}
.awlc--label-always .awlc__fab-label,
.awlc--label-hover .awlc__fab:hover .awlc__fab-label,
.awlc--label-hover .awlc__fab:focus-visible .awlc__fab-label{max-width:220px;opacity:1;padding-inline-end:20px}
.awlc__badge{position:absolute;top:-3px;inset-inline-end:-3px;z-index:2;min-width:22px;height:22px;padding:0 5px;border-radius:11px;background:#ff3b30;color:#fff;font-size:12px;font-weight:700;line-height:22px;text-align:center;box-shadow:0 0 0 2px #fff}
.awlc__badge[hidden]{display:none}

/* Attention animations */
.awlc--anim-pulse .awlc__fab::before{content:"";position:absolute;inset:0;z-index:-1;border-radius:inherit;background:var(--awlc-btn,#25D366);opacity:.55;animation:awlc-pulse 2.2s ease-out infinite}
.awlc--anim-bounce .awlc__fab{animation:awlc-bounce 4s ease infinite}
.awlc--anim-shake .awlc__fab{animation:awlc-shake 5s ease infinite}
.awlc.is-open .awlc__fab,.awlc.is-open .awlc__fab::before{animation:none}
@keyframes awlc-pulse{0%{transform:scale(1);opacity:.55}70%,100%{transform:scale(1.55);opacity:0}}
@keyframes awlc-bounce{0%,84%,100%{transform:none}88%{transform:translateY(-12px)}92%{transform:none}95%{transform:translateY(-6px)}98%{transform:none}}
@keyframes awlc-shake{0%,86%,100%{transform:none}88%{transform:rotate(-10deg)}90%{transform:rotate(10deg)}92%{transform:rotate(-8deg)}94%{transform:rotate(8deg)}96%{transform:rotate(-4deg)}98%{transform:none}}

/* ---------- Teaser bubble ---------- */
.awlc__teaser{position:relative;max-width:min(270px,calc(100vw - 2*var(--awlc-x,18px) - 8px));background:var(--awlc-surface);color:var(--awlc-text);border-radius:14px;box-shadow:0 8px 28px rgba(0,0,0,.22);animation:awlc-in .3s ease both}
.awlc__teaser[hidden]{display:none}
.awlc__teaser-text{display:block;width:100%;padding:12px 34px 12px 14px;border:0;background:none;color:inherit;font:inherit;text-align:start;cursor:pointer}
.awlc__teaser-x{position:absolute;top:4px;inset-inline-end:4px;width:28px;height:28px;border:0;border-radius:50%;background:none;color:var(--awlc-muted);font-size:20px;line-height:1;cursor:pointer}
.awlc__teaser-x:hover{background:rgba(0,0,0,.06)}

/* ---------- Chat panel ---------- */
.awlc__panel{
	display:none;
	flex-direction:column;
	width:min(370px,calc(100vw - 2*var(--awlc-x,18px)));
	max-height:calc(100vh - var(--awlc-y,80px) - var(--awlc-size,60px) - 36px);
	max-height:calc(100dvh - var(--awlc-y,80px) - var(--awlc-size,60px) - 36px);
	border-radius:var(--awlc-radius,16px);
	background:var(--awlc-body,#ECE5DD);
	box-shadow:0 14px 48px rgba(0,0,0,.3);
	overflow:hidden;
}
.awlc.is-open .awlc__panel{display:flex;animation:awlc-in .25s ease both}
.awlc__panel[hidden]{display:none!important}
@keyframes awlc-in{from{opacity:0;transform:translateY(12px) scale(.98)}to{opacity:1;transform:none}}

.awlc__head{display:flex;align-items:center;gap:12px;padding:14px 14px 14px 16px;background:var(--awlc-head,#075E54);color:#fff;flex:0 0 auto}
.awlc__head-icon{display:grid;place-items:center;width:44px;height:44px;border-radius:50%;background:rgba(255,255,255,.16);flex:0 0 auto}
.awlc__head-text{flex:1 1 auto;min-width:0;display:flex;flex-direction:column}
.awlc__head-text strong{font-size:16px;line-height:1.25;overflow-wrap:anywhere}
.awlc__head-text span{font-size:12.5px;opacity:.88;overflow-wrap:anywhere}
.awlc__close{flex:0 0 auto;display:grid;place-items:center;width:40px;height:40px;border:0;border-radius:50%;background:transparent;color:#fff;cursor:pointer}
.awlc__close:hover{background:rgba(255,255,255,.16)}

.awlc__body{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:14px}
.awlc__bubble{position:relative;display:block;max-width:92%;padding:10px 12px 20px;border-radius:0 12px 12px 12px;background:var(--awlc-surface);color:var(--awlc-text);box-shadow:0 1px 1px rgba(0,0,0,.13);overflow-wrap:anywhere;animation:awlc-in .3s ease both}
.awlc__bubble[hidden]{display:none}
.awlc__time{position:absolute;bottom:4px;inset-inline-end:9px;font-size:11px;color:var(--awlc-muted)}
.awlc__typing{display:inline-flex;gap:4px;align-items:center;padding:12px 14px;border-radius:0 12px 12px 12px;background:var(--awlc-surface);box-shadow:0 1px 1px rgba(0,0,0,.13)}
.awlc__typing[hidden]{display:none}
.awlc__typing i{width:7px;height:7px;border-radius:50%;background:#90a4ae;animation:awlc-dot 1.2s infinite ease-in-out}
.awlc__typing i:nth-child(2){animation-delay:.15s}
.awlc__typing i:nth-child(3){animation-delay:.3s}
@keyframes awlc-dot{0%,60%,100%{transform:translateY(0);opacity:.5}30%{transform:translateY(-4px);opacity:1}}

.awlc__offline{margin:12px 0 0;padding:9px 12px;border-radius:10px;background:#fff3cd;color:#5c4400;font-size:13.5px}
.awlc__offline[hidden]{display:none}

.awlc__form{margin-top:12px;padding:12px;border-radius:12px;background:var(--awlc-surface)}
.awlc__form label{display:block;margin:0 0 4px;font-size:12.5px;font-weight:600;color:var(--awlc-muted)}
.awlc__form input[type="text"],.awlc__form textarea{display:block;width:100%;margin:0 0 10px;padding:9px 10px;border:1px solid var(--awlc-line);border-radius:8px;background:transparent;color:var(--awlc-text);font:inherit;font-size:16px;resize:vertical}
.awlc__form input[type="text"]:focus,.awlc__form textarea:focus{outline:2px solid var(--awlc-accent,#128C7E);outline-offset:0;border-color:transparent}
.awlc__form .awlc__check{display:flex;gap:8px;align-items:flex-start;margin:0 0 6px;font-weight:400;font-size:13px}
.awlc__form .awlc__check input{margin-top:3px;flex:0 0 auto;width:18px;height:18px}
.awlc__form .awlc__check a{color:var(--awlc-accent,#128C7E);text-decoration:underline}
.awlc__err{margin:4px 0 0;color:#c62828;font-size:13px;font-weight:600}
.awlc__err[hidden]{display:none}

.awlc__heading{margin:16px 0 8px;font-size:12px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--awlc-muted)}
.awlc__agents{display:grid;gap:8px;margin:0;padding:0;list-style:none}
.awlc__agents li{margin:0;padding:0}
.awlc__agent{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:12px;border-inline-start:4px solid var(--awlc-accent,#128C7E);background:var(--awlc-surface);color:var(--awlc-text);text-decoration:none;box-shadow:0 1px 2px rgba(0,0,0,.1);transition:transform .15s,box-shadow .15s}
.awlc__agent:hover{transform:translateY(-1px);box-shadow:0 4px 12px rgba(0,0,0,.16);color:var(--awlc-text)}
.awlc__agent.is-offline{opacity:.82}
.awlc__agent.is-disabled{opacity:.55;pointer-events:none}
.awlc__avatar{position:relative;display:grid;place-items:center;flex:0 0 auto;width:46px;height:46px;border-radius:50%;background:var(--awlc-accent,#128C7E);color:#fff;font-size:18px}
.awlc__avatar img{width:100%;height:100%;border-radius:50%;object-fit:cover;display:block}
.awlc__dot{position:absolute;bottom:0;inset-inline-end:0;width:12px;height:12px;border-radius:50%;background:#9aa0a6;border:2px solid var(--awlc-surface)}
.awlc__agent.is-online .awlc__dot{background:#25d366}
.awlc--status-off .awlc__dot,.awlc--status-off .awlc__status{display:none}
.awlc__agent-text{flex:1 1 auto;min-width:0;display:flex;flex-direction:column}
.awlc__agent-text strong{font-size:15px;line-height:1.3;overflow-wrap:anywhere}
.awlc__agent-text small{font-size:12.5px;color:var(--awlc-muted);line-height:1.3;overflow-wrap:anywhere}
.awlc__agent-text .awlc__dept{font-weight:600}
.awlc__status{font-style:normal;font-size:12px;font-weight:600;color:var(--awlc-muted)}
.awlc__agent.is-online .awlc__status{color:#128c7e}
.awlc__go{flex:0 0 auto;display:grid;place-items:center;color:var(--awlc-btn,#25D366)}
.awlc__go svg{width:26px;height:26px}

/* ---------- Dark mode (optional, follows the visitor's system) ---------- */
@media (prefers-color-scheme:dark){
	.awlc.awlc--dark-auto{--awlc-surface:#1f2c34;--awlc-text:#e9edef;--awlc-muted:#aebac1;--awlc-line:#3b4a54;--awlc-body:#0b141a!important}
	.awlc--dark-auto .awlc__offline{background:#3d3210;color:#f3d98b}
}

/* ---------- Small screens: the panel becomes a bottom sheet ---------- */
@media (max-width:480px){
	.awlc{bottom:calc(var(--awlc-ym,76px) + env(safe-area-inset-bottom,0px))}
	.awlc__fab-label{display:none}
	.awlc__panel{
		position:fixed;
		inset-inline:10px;
		bottom:calc(var(--awlc-ym,76px) + var(--awlc-size,60px) + 12px + env(safe-area-inset-bottom,0px));
		width:auto;
		max-height:calc(100vh - var(--awlc-ym,76px) - var(--awlc-size,60px) - 32px);
		max-height:calc(100dvh - var(--awlc-ym,76px) - var(--awlc-size,60px) - 32px);
	}
}
@media (max-height:520px) and (orientation:landscape){
	.awlc__panel{max-height:calc(100vh - var(--awlc-size,60px) - 40px);max-height:calc(100dvh - var(--awlc-size,60px) - 40px)}
}

/* ---------- Device visibility ---------- */
@media (min-width:1024px){.awlc--no-desktop{display:none!important}}
@media (min-width:768px) and (max-width:1023px){.awlc--no-tablet{display:none!important}}
@media (max-width:767px){.awlc--no-mobile{display:none!important}}

/* ---------- Shortcode button ---------- */
.awlc-btn{display:inline-flex;align-items:center;gap:8px;padding:12px 22px;border:2px solid #25D366;border-radius:999px;background:#25D366;color:#fff;font-weight:600;line-height:1.2;text-decoration:none;cursor:pointer;transition:transform .15s,box-shadow .15s,background-color .15s}
.awlc-btn:hover{transform:translateY(-1px);box-shadow:0 6px 16px rgba(0,0,0,.2);color:#fff;background:#1ebe5a;border-color:#1ebe5a}
.awlc-btn--outline{background:transparent;color:#128C7E}
.awlc-btn--outline:hover{background:#25D366;color:#fff}
.awlc-btn svg{flex:0 0 auto}

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