/* AI Live Chat widget — styled to match theskincareclinic.co.uk
   Coral pink CTAs (#F7BCBE), deep navy header (#192943), Poppins type. */
:root {
	--ailc-color: #F7BCBE;    /* coral pink — buttons & highlights */
	--ailc-header: #192943;   /* deep navy — header & visitor bubbles */
	--ailc-ink: #333333;      /* charcoal text, as site headings */
	--ailc-radius: 14px;
}

.ailc-root, .ailc-root * { box-sizing: border-box; margin: 0; padding: 0; }
.ailc-root {
	position: fixed;
	bottom: 20px;
	z-index: 999999;
	font-family: 'Poppins', 'Century Gothic', -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
	font-size: 14.5px;
	line-height: 1.55;
}
.ailc-root.ailc-right { right: 20px; }
.ailc-root.ailc-left  { left: 20px; }

/* Launcher — coral pill like the site's CTA buttons */
.ailc-bubble {
	height: 54px;
	border: none;
	border-radius: 999px;
	background: var(--ailc-color);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	padding: 0 22px 0 18px;
	font-family: inherit;
	font-size: 14.5px;
	font-weight: 400;
	letter-spacing: .6px;
	white-space: nowrap;
	box-shadow: 0 6px 20px rgba(25, 41, 67, .28);
	transition: transform .15s ease, filter .15s ease;
}
.ailc-bubble:hover { transform: scale(1.04); filter: brightness(.96); }
.ailc-bubble svg { width: 24px; height: 24px; fill: #fff; flex-shrink: 0; }
.ailc-bubble-label { color: #fff; }
/* No label configured, or chat open → compact circle */
.ailc-bubble:not(:has(.ailc-bubble-label)) {
	width: 54px;
	padding: 0;
	border-radius: 50%;
}
.ailc-bubble:not(:has(.ailc-bubble-label)) svg { width: 26px; height: 26px; }

/* Panel */
.ailc-panel {
	position: absolute;
	bottom: 74px;
	width: 372px;
	max-width: calc(100vw - 32px);
	height: 545px;
	max-height: calc(100vh - 120px);
	background: #fff;
	border-radius: var(--ailc-radius);
	box-shadow: 0 12px 40px rgba(25, 41, 67, .3);
	display: none;
	flex-direction: column;
	overflow: hidden;
}
.ailc-root.ailc-right .ailc-panel { right: 0; }
.ailc-root.ailc-left  .ailc-panel { left: 0; }
.ailc-root.ailc-open  .ailc-panel { display: flex; animation: ailc-pop .18s ease; }
@keyframes ailc-pop {
	from { opacity: 0; transform: translateY(10px) scale(.98); }
	to   { opacity: 1; transform: none; }
}

/* Header — navy like the site's navigation bar */
.ailc-header {
	background: var(--ailc-header);
	color: #fff;
	padding: 15px 16px;
	display: flex;
	align-items: center;
	gap: 11px;
	flex-shrink: 0;
}
.ailc-avatar {
	width: 38px; height: 38px;
	border-radius: 50%;
	background: var(--ailc-color);
	display: flex; align-items: center; justify-content: center;
	flex-shrink: 0;
}
.ailc-avatar svg { width: 20px; height: 20px; fill: #fff; }
.ailc-header-info { flex: 1; min-width: 0; }
.ailc-header-name {
	font-weight: 500;
	font-size: 15px;
	text-transform: uppercase;
	letter-spacing: 2.5px;
}
.ailc-header-status { font-size: 11.5px; opacity: .8; display: flex; align-items: center; gap: 5px; letter-spacing: .5px; }
.ailc-dot { width: 7px; height: 7px; border-radius: 50%; background: #6ee787; display: inline-block; }
.ailc-close {
	background: none; border: none; color: #fff; cursor: pointer;
	padding: 6px; border-radius: 8px; display: flex;
}
.ailc-close:hover { background: rgba(255, 255, 255, .15); }
.ailc-close svg { width: 18px; height: 18px; fill: #fff; }

/* Messages */
.ailc-messages {
	flex: 1;
	overflow-y: auto;
	padding: 16px 14px;
	background: #fdf7f7;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.ailc-msg {
	max-width: 84%;
	padding: 10px 14px;
	border-radius: 14px;
	white-space: pre-wrap;
	word-wrap: break-word;
	overflow-wrap: break-word;
	font-weight: 300;
}
.ailc-msg a { color: inherit; text-decoration: underline; }
.ailc-msg-bot {
	align-self: flex-start;
	background: #fff;
	color: var(--ailc-ink);
	border-bottom-left-radius: 4px;
	box-shadow: 0 1px 3px rgba(25, 41, 67, .08);
}
.ailc-msg-user {
	align-self: flex-end;
	background: var(--ailc-header);
	color: #fff;
	border-bottom-right-radius: 4px;
}

/* Typing indicator */
.ailc-typing { display: flex; gap: 4px; padding: 12px 14px; }
.ailc-typing span {
	width: 7px; height: 7px; border-radius: 50%;
	background: #BB858D;
	animation: ailc-blink 1.2s infinite both;
}
.ailc-typing span:nth-child(2) { animation-delay: .2s; }
.ailc-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes ailc-blink {
	0%, 80%, 100% { opacity: .25; transform: translateY(0); }
	40% { opacity: 1; transform: translateY(-3px); }
}

/* Quick-action chips — solid coral like "Book Now" on the site */
.ailc-chip {
	align-self: flex-start;
	background: var(--ailc-color);
	border: none;
	color: #fff;
	border-radius: 8px;
	padding: 9px 16px;
	font-family: inherit;
	font-size: 13.5px;
	font-weight: 400;
	letter-spacing: .5px;
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(25, 41, 67, .12);
	transition: filter .12s ease, transform .12s ease;
}
.ailc-chip:hover { filter: brightness(.95); transform: translateY(-1px); }

/* Lead form */
.ailc-lead-link {
	background: none;
	border: none;
	color: #BB858D;
	font-family: inherit;
	font-size: 12.5px;
	cursor: pointer;
	text-decoration: underline;
	align-self: center;
	padding: 2px 4px;
}
.ailc-lead-form {
	align-self: stretch;
	background: #fff;
	border-radius: 14px;
	padding: 15px;
	box-shadow: 0 1px 3px rgba(25, 41, 67, .08);
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.ailc-lead-form strong {
	font-size: 13px;
	font-weight: 500;
	color: var(--ailc-ink);
	text-transform: uppercase;
	letter-spacing: 1.5px;
}
.ailc-lead-form p { font-size: 12.5px; color: #777; font-weight: 300; }
.ailc-lead-form input, .ailc-lead-form textarea {
	border: 1px solid #e6dcdc;
	border-radius: 8px;
	padding: 8px 11px;
	font-size: 13.5px;
	font-family: inherit;
	font-weight: 300;
	width: 100%;
	color: var(--ailc-ink);
}
.ailc-lead-form input:focus, .ailc-lead-form textarea:focus { outline: 2px solid var(--ailc-color); border-color: transparent; }
.ailc-lead-form button {
	background: var(--ailc-color);
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 10px 12px;
	font-family: inherit;
	font-size: 13.5px;
	font-weight: 400;
	letter-spacing: .5px;
	cursor: pointer;
}
.ailc-lead-form button:hover { filter: brightness(.95); }
.ailc-lead-error { color: #b32d2e; font-size: 12.5px; }

/* Input row */
.ailc-input-row {
	display: flex;
	gap: 8px;
	padding: 12px;
	background: #fff;
	border-top: 1px solid #f3e9e9;
	flex-shrink: 0;
}
.ailc-input {
	flex: 1;
	border: 1px solid #e6dcdc;
	border-radius: 22px;
	padding: 10px 15px;
	font-size: 14px;
	font-family: inherit;
	font-weight: 300;
	color: var(--ailc-ink);
	resize: none;
	max-height: 90px;
	overflow-y: auto;
}
.ailc-input::placeholder { color: #a99; }
.ailc-input:focus { outline: 2px solid var(--ailc-color); border-color: transparent; }
.ailc-send {
	width: 42px; height: 42px;
	border: none;
	border-radius: 50%;
	background: var(--ailc-color);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	align-self: flex-end;
	transition: filter .12s ease;
}
.ailc-send:hover { filter: brightness(.95); }
.ailc-send:disabled { opacity: .5; cursor: default; }
.ailc-send svg { width: 18px; height: 18px; fill: #fff; }

/* Mobile */
@media (max-width: 480px) {
	.ailc-root.ailc-right, .ailc-root.ailc-left {
		right: 12px;
		left: auto;
		bottom: calc(12px + env(safe-area-inset-bottom, 0px));
	}
	.ailc-bubble {
		height: 46px;
		font-size: 13px;
		padding: 0 16px 0 14px;
		gap: 7px;
	}
	.ailc-bubble svg { width: 20px; height: 20px; }
	.ailc-bubble:not(:has(.ailc-bubble-label)) { width: 46px; }
	.ailc-panel {
		position: fixed;
		left: 8px;
		right: 8px;
		bottom: calc(66px + env(safe-area-inset-bottom, 0px));
		width: auto;
		height: 74vh;
		height: 74dvh;
		max-height: none;
	}
	.ailc-msg { font-size: 14px; }
	/* 16px input stops iOS Safari auto-zooming on focus */
	.ailc-input { font-size: 16px; }
}
