/* Four independent inset properties per breakpoint (desktop here, -mobile
   below) rather than one shared --alc-padding driving both the vertical
   offset and whichever horizontal side was active — that's what made
   "padding left/right" behave unpredictably before: it was the same
   variable as the vertical offset. JS (applyOffsets()) resolves each side
   to a px value or 'auto' before setting these. */
#alc-chat-widget-root {
	--alc-primary: #111111;
	--alc-icon-color: #ffffff;
	--alc-header: #111111;
	--alc-top: auto;
	--alc-right: 20px;
	--alc-bottom: 20px;
	--alc-left: auto;
	--alc-top-mobile: auto;
	--alc-right-mobile: 10px;
	--alc-bottom-mobile: 10px;
	--alc-left-mobile: auto;
	--alc-icon-size: 56px;
	--alc-pulse-color: #2f5fe0;
	--alc-font-size: 14px;
	--alc-text-color: #111111;
	position: fixed;
	top: var(--alc-top);
	right: var(--alc-right);
	bottom: var(--alc-bottom);
	left: var(--alc-left);
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 10px;
}
#alc-chat-widget-root.alc-pos-right {
	align-items: flex-end;
}
#alc-chat-widget-root.alc-pos-left {
	align-items: flex-start;
}

/* Icon + greeting bubble share one row. DOM order is always
   [greeting, icon] — row shows the icon last (right/inward from the left
   edge doesn't apply here since pos-right anchors the icon at the true
   right, so greeting must render BEFORE it, i.e. to its left/inward);
   row-reverse flips that for the left-anchored case so the icon stays
   pinned to the true left edge and the greeting renders to its right. */
#alc-chat-widget-root .alc-launcher-row {
	display: flex;
	align-items: center;
	gap: 10px;
}
#alc-chat-widget-root.alc-pos-right .alc-launcher-row {
	flex-direction: row;
}
#alc-chat-widget-root.alc-pos-left .alc-launcher-row {
	flex-direction: row-reverse;
}

#alc-chat-widget-root .alc-toggle {
	position: relative;
	width: var(--alc-icon-size);
	height: var(--alc-icon-size);
	min-width: 32px;
	min-height: 32px;
	border-radius: 50%;
	background: var(--alc-primary);
	border: none;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	overflow: hidden;
}
/* Attention-pulse animation (Settings > Attention animation): an expanding,
   fading ring drawn with transform+opacity rather than an animated
   box-shadow colour, so it doesn't depend on color-mix() (patchy older-
   browser support) — just a solid border fading out as it scales up. Lives
   on ::before, outside the button's own overflow:hidden (which clips the
   icon graphic to a circle), so the ring isn't clipped away too. */
#alc-chat-widget-root .alc-toggle.alc-pulse::before {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: 50%;
	border: 3px solid var(--alc-pulse-color);
	animation: alc-pulse 2.2s cubic-bezier(0.4, 0, 0.3, 1) infinite;
	pointer-events: none;
}
@keyframes alc-pulse {
	0% { transform: scale(1); opacity: 0.7; }
	100% { transform: scale(1.5); opacity: 0; }
}
#alc-chat-widget-root .alc-icon-svg {
	display: block;
	width: calc(var(--alc-icon-size) * 0.57);
	height: calc(var(--alc-icon-size) * 0.57);
}
#alc-chat-widget-root .alc-icon-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
#alc-chat-widget-root .alc-toggle:focus-visible {
	outline: 3px solid #7bb0ff;
	outline-offset: 2px;
}
/* Same specificity bug as .alc-panel[hidden] below: the button's own
   `display: flex` rule (ID+class, higher specificity) beats the browser's
   default `[hidden] { display: none }` (bare attribute selector), so
   setting the toggle's `hidden` attribute on open did nothing visually —
   the launcher icon stayed floating on top of the open chat panel. */
#alc-chat-widget-root .alc-toggle[hidden] {
	display: none;
}

#alc-chat-widget-root .alc-greeting {
	display: flex;
	align-items: center;
	gap: 8px;
	max-width: 220px;
	background: #fff;
	color: #222;
	padding: 10px 12px;
	border-radius: 12px;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
	font-size: 13px;
	line-height: 1.35;
	cursor: pointer;
	animation: alc-greeting-in 0.2s ease-out;
}
#alc-chat-widget-root .alc-greeting-close {
	background: none;
	border: none;
	color: #999;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	flex-shrink: 0;
	padding: 0;
}
#alc-chat-widget-root .alc-greeting-close:hover {
	color: #333;
}
@keyframes alc-greeting-in {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: translateY(0); }
}

#alc-chat-widget-root .alc-panel {
	width: 360px;
	max-width: calc(100vw - 32px);
	height: 520px;
	max-height: calc(100vh - 100px);
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}
/* Taller panel on desktop only — small screens keep the shorter default
   above so the panel doesn't get cramped against the viewport height. */
@media (min-width: 601px) {
	#alc-chat-widget-root .alc-panel {
		width: 380px;
		height: 640px;
		max-height: calc(100vh - 80px);
	}
}
/* The [hidden] attribute alone loses to the rule above (higher specificity
   than the browser's default `[hidden] { display: none }`), so the close
   button would set `hidden` but the panel stayed visually displayed. */
#alc-chat-widget-root .alc-panel[hidden] {
	display: none;
}

#alc-chat-widget-root .alc-header {
	background: var(--alc-header, var(--alc-primary));
	color: #000;
	padding: 14px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
#alc-chat-widget-root .alc-title {
	font-weight: 600;
	font-size: 15px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
#alc-chat-widget-root .alc-header-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
}
#alc-chat-widget-root .alc-new-chat {
	background: none;
	border: 1px solid rgba(0, 0, 0, 0.35);
	border-radius: 12px;
	color: #000;
	font-size: 11px;
	padding: 3px 9px;
	cursor: pointer;
}
#alc-chat-widget-root .alc-new-chat:hover,
#alc-chat-widget-root .alc-new-chat:focus-visible {
	background: rgba(0, 0, 0, 0.1);
	outline: none;
}
#alc-chat-widget-root .alc-close {
	background: none;
	border: none;
	color: #000;
	font-size: 22px;
	cursor: pointer;
	line-height: 1;
}
#alc-chat-widget-root .alc-close:focus-visible {
	outline: 2px solid #7bb0ff;
}

#alc-chat-widget-root .alc-disclaimer {
	font-size: 11px;
	color: #666;
	padding: 8px 16px;
	margin: 0;
	background: #f7f7f7;
	border-bottom: 1px solid #eee;
}

#alc-chat-widget-root .alc-messages {
	flex: 1;
	overflow-y: auto;
	padding: 12px 16px;
}

#alc-chat-widget-root .alc-bubble {
	max-width: 85%;
	margin-bottom: 10px;
	padding: 8px 12px;
	border-radius: 10px;
	font-size: var(--alc-font-size, 14px);
	line-height: 1.4;
}
#alc-chat-widget-root .alc-bubble p {
	margin: 0 0 8px;
	white-space: pre-wrap;
}
#alc-chat-widget-root .alc-bubble p:last-child {
	margin-bottom: 0;
}
#alc-chat-widget-root .alc-bubble strong {
	font-weight: 700;
}
#alc-chat-widget-root .alc-bubble-user {
	background: var(--alc-primary);
	color: #000;
	margin-left: auto;
}
#alc-chat-widget-root .alc-bubble-assistant {
	background: #f0f0f0;
	color: var(--alc-text-color, #111);
}
#alc-chat-widget-root .alc-bubble-system {
	background: #fff3cd;
	color: #6b5300;
	font-size: 13px;
}

#alc-chat-widget-root .alc-card {
	background: #eef6ff;
	border: 1px solid #cfe4ff;
	border-radius: 10px;
	padding: 10px 12px;
	font-size: 13px;
	margin-bottom: 10px;
}
#alc-chat-widget-root .alc-card p {
	margin: 4px 0 0;
}

#alc-chat-widget-root .alc-chooser-card {
	background: #fff;
	border: 1px solid #ddd;
	text-align: center;
}
#alc-chat-widget-root .alc-chooser-card p {
	margin: 0 0 10px;
	font-size: var(--alc-font-size, 14px);
	color: var(--alc-text-color, #111);
}
#alc-chat-widget-root .alc-chooser-buttons {
	display: flex;
	gap: 10px;
}
#alc-chat-widget-root .alc-chooser-btn {
	flex: 1;
	background: var(--alc-primary);
	color: #000;
	border: none;
	border-radius: 8px;
	padding: 10px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}
#alc-chat-widget-root .alc-chooser-btn:hover,
#alc-chat-widget-root .alc-chooser-btn:focus-visible {
	opacity: 0.85;
	outline: none;
}

#alc-chat-widget-root .alc-call-status {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 10px 16px;
	border-top: 1px solid #eee;
	background: #fafafa;
}
#alc-chat-widget-root .alc-call-status-text {
	font-size: 13px;
	color: #333;
	display: flex;
	align-items: center;
	gap: 6px;
}
#alc-chat-widget-root .alc-call-status-text::before {
	content: '';
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #2fa84f;
	flex-shrink: 0;
	animation: alc-blink 1.5s infinite ease-in-out;
}
#alc-chat-widget-root .alc-call-end {
	background: #c0272d;
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 6px 12px;
	font-size: 12px;
	cursor: pointer;
}

#alc-chat-widget-root .alc-slot-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 10px;
	padding: 10px;
	border: 1px solid #ddd;
	border-radius: 10px;
	background: #fafafa;
}
#alc-chat-widget-root .alc-slot-button {
	background: #fff;
	border: 1px solid var(--alc-primary);
	border-radius: 16px;
	padding: 6px 12px;
	font-size: 12px;
	cursor: pointer;
}
#alc-chat-widget-root .alc-slot-button:hover,
#alc-chat-widget-root .alc-slot-button:focus-visible {
	background: var(--alc-primary);
	color: #000;
	outline: none;
}
#alc-chat-widget-root .alc-slot-button:disabled {
	opacity: 0.5;
	cursor: default;
}

#alc-chat-widget-root .alc-booking-form-card {
	background: #fff;
	border: 1px solid #ddd;
}
#alc-chat-widget-root .alc-booking-form {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 8px;
}
#alc-chat-widget-root .alc-booking-form label {
	display: flex;
	flex-direction: column;
	gap: 3px;
	font-size: 12px;
	color: #444;
}
#alc-chat-widget-root .alc-booking-form label.alc-checkbox-label {
	flex-direction: row;
	align-items: center;
}
#alc-chat-widget-root .alc-booking-form input[type="text"],
#alc-chat-widget-root .alc-booking-form input[type="tel"],
#alc-chat-widget-root .alc-booking-form input[type="email"] {
	border: 1px solid #ccc;
	border-radius: 6px;
	padding: 6px 8px;
	font-size: 13px;
}
#alc-chat-widget-root .alc-booking-form button[type="submit"] {
	background: var(--alc-primary);
	color: #000;
	border: none;
	border-radius: 6px;
	padding: 8px;
	cursor: pointer;
	font-size: 13px;
}
#alc-chat-widget-root .alc-booking-form button[type="submit"]:disabled {
	opacity: 0.6;
	cursor: default;
}
#alc-chat-widget-root .alc-form-error {
	color: #a01c1c;
	font-size: 12px;
	margin: 0;
}

#alc-chat-widget-root .alc-feedback-row {
	margin-top: 4px;
	font-size: 11px;
	color: #666;
	display: flex;
	align-items: center;
	gap: 4px;
}
#alc-chat-widget-root .alc-feedback-btn {
	background: none;
	border: none;
	cursor: pointer;
	font-size: 13px;
	padding: 2px 4px;
}
#alc-chat-widget-root .alc-feedback-btn:focus-visible {
	outline: 2px solid #7bb0ff;
}

#alc-chat-widget-root .alc-typing span {
	display: inline-block;
	width: 6px;
	height: 6px;
	margin-right: 3px;
	border-radius: 50%;
	background: #999;
	animation: alc-blink 1.2s infinite ease-in-out;
}
#alc-chat-widget-root .alc-typing span:nth-child(2) { animation-delay: 0.2s; }
#alc-chat-widget-root .alc-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes alc-blink {
	0%, 80%, 100% { opacity: 0.3; }
	40% { opacity: 1; }
}

/* Exactly two quick-reply buttons (Book a consultation / See prices, set in
   ALC_Public::enqueue_assets()) sharing one row with no wrap — more than
   two used to crowd the panel and wrap onto multiple lines, which was hard
   to read. flex:1 splits the row evenly between however many are sent. */
#alc-chat-widget-root .alc-quick-replies {
	display: flex;
	flex-wrap: nowrap;
	gap: 6px;
	padding: 0 16px 8px;
}
/* Same [hidden]-vs-specificity issue fixed for .alc-panel and .alc-toggle
   elsewhere in this file — any element with its own `display` rule needs
   this explicit override or setting the `hidden` attribute silently does
   nothing. Quick-replies and the input row both get hidden/shown from JS
   (voice chooser, an active call) so both need it. */
#alc-chat-widget-root .alc-quick-replies[hidden],
#alc-chat-widget-root .alc-input-row[hidden],
#alc-chat-widget-root .alc-call-status[hidden] {
	display: none;
}
#alc-chat-widget-root .alc-quick-reply {
	flex: 1 1 0;
	min-width: 0;
	background: #fff;
	border: 1px solid #ccc;
	border-radius: 16px;
	padding: 6px 8px;
	font-size: 12px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	text-align: center;
	cursor: pointer;
}
#alc-chat-widget-root .alc-quick-reply:hover,
#alc-chat-widget-root .alc-quick-reply:focus-visible {
	background: #f0f0f0;
	outline: none;
}

#alc-chat-widget-root .alc-input-row {
	display: flex;
	border-top: 1px solid #eee;
	padding: 10px;
	gap: 8px;
}
#alc-chat-widget-root .alc-input-row input {
	flex: 1;
	border: 1px solid #ccc;
	border-radius: 6px;
	padding: 8px 10px;
	font-size: var(--alc-font-size, 14px);
}
#alc-chat-widget-root .alc-input-row input:focus-visible {
	outline: 2px solid #7bb0ff;
}
#alc-chat-widget-root .alc-input-row button {
	background: var(--alc-primary);
	color: #000;
	font-weight: 600;
	border: none;
	border-radius: 6px;
	padding: 0 14px;
	cursor: pointer;
}

#alc-chat-widget-root .alc-footer {
	padding: 8px 16px;
	font-size: 11px;
	color: #666;
	border-top: 1px solid #eee;
	text-align: center;
}
#alc-chat-widget-root .alc-footer a {
	color: #333;
}
#alc-chat-widget-root .alc-phone-link {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	vertical-align: middle;
}
#alc-chat-widget-root .alc-phone-icon {
	width: 11px;
	height: 11px;
	flex-shrink: 0;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

@media (max-width: 420px) {
	#alc-chat-widget-root {
		top: var(--alc-top-mobile);
		right: var(--alc-right-mobile);
		bottom: var(--alc-bottom-mobile);
		left: var(--alc-left-mobile);
	}
}
