/* Live chat launcher (LiveChatModule; Social Intents, loaded on the first click by live-chat.js).
   Bottom-right, lifted above anything pinned to the bottom of the screen (the phone cart bar .ilc-cc-bar, My lab's
   .ilc-lab-cta, the theme's phone Add to cart bar): live-chat.js measures what is under it and sets --ilc-chat-lift.
   Above the page and those bars, below every drawer and overlay (9999+). Colours are the theme's tokens, with the
   Avada palette and Core's own navy as fallbacks. */
.ilc-chat {
	position: fixed;
	right: 16px;
	bottom: calc(16px + var(--ilc-chat-lift, 0px) + env(safe-area-inset-bottom, 0px));
	z-index: 160;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 6px;
	transition: bottom .2s ease, opacity .2s ease;
}
.ilc-chat[hidden] { display: none !important; }
/* Unread staff replies while the chat is minimised (24 Nov): a red count on the button's top corner. */
.ilc-chat__dot { position: absolute; top: -5px; right: -5px; box-sizing: border-box; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #d0021b; color: #fff; font: 700 12px/20px system-ui, -apple-system, "Segoe UI", sans-serif; text-align: center; box-shadow: 0 0 0 2px #fff; pointer-events: none; }
.ilc-chat__dot[hidden] { display: none; }
.ilc-chat__btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	box-sizing: border-box;
	min-width: 48px;
	min-height: 48px;
	margin: 0;
	padding: 0 18px 0 14px;
	border: 0;
	border-radius: 999px;
	background: var(--wp--preset--color--navy, var(--awb-color8, #004385));
	color: var(--wp--preset--color--white, #fff) !important;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: normal;
	text-transform: none;
	white-space: nowrap;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 47, 96, .24);
	transition: background-color .15s ease, transform .15s ease;
}
.ilc-chat__btn:hover { background: var(--wp--preset--color--deep-navy, var(--awb-color7, #002f60)); transform: translateY(-1px); }
.ilc-chat__btn:focus-visible { outline: 2px solid var(--wp--preset--color--cyan, var(--awb-color5, #00a0df)); outline-offset: 3px; }
.ilc-chat__icon { flex: none; width: 22px; height: 22px; }
.ilc-chat__btn[aria-busy="true"] { cursor: progress; }
/* The wait: the Interlab helix when the page already has it, else a small turning ring (still under reduced motion). */
.ilc-chat__btn[aria-busy="true"] .ilc-chat__icon { display: none; }
.ilc-chat__btn[aria-busy="true"]:not(.has-helix)::before {
	content: "";
	flex: none;
	box-sizing: border-box;
	width: 18px;
	height: 18px;
	border: 2px solid rgba(255, 255, 255, .35);
	border-top-color: currentColor;
	border-radius: 50%;
	animation: ilc-chat-spin .8s linear infinite;
}
@keyframes ilc-chat-spin { to { transform: rotate(360deg); } }
.ilc-chat__status:empty { display: none; }
.ilc-chat__status {
	max-width: 240px;
	padding: 8px 12px;
	border: 1px solid var(--wp--preset--color--hairline, #e4ecf4);
	border-radius: 8px;
	background: var(--wp--preset--color--white, #fff);
	color: var(--wp--preset--color--ink, var(--awb-color7, #212934));
	font-size: 13px;
	line-height: 1.35;
	box-shadow: 0 4px 14px rgba(0, 47, 96, .14);
}
/* "Chat isn't available": phone and email, never a dead end. Same card as the status note, a little roomier. */
.ilc-chat__fallback[hidden] { display: none !important; }
.ilc-chat__fallback {
	position: relative;
	box-sizing: border-box;
	width: 280px;
	max-width: calc(100vw - 32px);
	padding: 14px 40px 14px 16px;
	border: 1px solid var(--wp--preset--color--hairline, #e4ecf4);
	border-radius: 10px;
	background: var(--wp--preset--color--white, #fff);
	color: var(--wp--preset--color--ink, var(--awb-color7, #212934));
	font-size: 14px;
	line-height: 1.45;
	box-shadow: 0 6px 20px rgba(0, 47, 96, .16);
}
.ilc-chat__fallback p { margin: 0; }
.ilc-chat__fb-title { font-weight: 600; color: var(--wp--preset--color--navy, var(--awb-color8, #004385)); }
.ilc-chat__fb-ways { margin-top: 4px !important; }
.ilc-chat__fallback a { color: var(--wp--preset--color--navy, var(--awb-color8, #004385)); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.ilc-chat__close {
	position: absolute;
	top: 6px;
	right: 6px;
	width: 32px;
	height: 32px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--wp--preset--color--muted, var(--awb-color6, #5b6573));
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}
.ilc-chat__close:hover { background: var(--wp--preset--color--mist, #f1f5f9); }
.ilc-chat__close:focus-visible { outline: 2px solid var(--wp--preset--color--cyan, var(--awb-color5, #00a0df)); outline-offset: 1px; }
/* Phones: a round icon button (its name stays the aria-label); out of the way while the keyboard is up. */
@media (max-width: 767px) {
	.ilc-chat { right: 12px; bottom: calc(12px + var(--ilc-chat-lift, 0px) + env(safe-area-inset-bottom, 0px)); }
	.ilc-chat__btn { width: 52px; height: 52px; padding: 0; }
	.ilc-chat__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
	.ilc-chat.is-typing { opacity: 0; visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) {
	.ilc-chat, .ilc-chat__btn { transition: none; }
	.ilc-chat__btn:hover { transform: none; }
	.ilc-chat__btn[aria-busy="true"]:not(.has-helix)::before { animation: none; }
}
@media print { .ilc-chat { display: none !important; } }
