/* Cabana Magic Chat. Uses the site palette: #476852 green, #FFF8EC cream, #FBEFD9 sand. */
#cmc-root {
	--cmc-green: #476852;
	--cmc-green-dark: #34503d;
	--cmc-cream: #fff8ec;
	--cmc-sand: #fbefd9;
	--cmc-ink: #2b2b2b;
	font-family: "Quicksand", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	font-size: 15px;
	line-height: 1.45;
	color: var(--cmc-ink);
}
#cmc-root *,
#cmc-root *::before,
#cmc-root *::after {
	box-sizing: border-box;
}

.cmc-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Launcher */
.cmc-launcher {
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 99990;
	width: 60px;
	height: 60px;
	border: 0;
	border-radius: 50%;
	background: var(--cmc-green);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
	transition: transform 0.15s ease, background 0.15s ease;
}
.cmc-launcher:hover {
	background: var(--cmc-green-dark);
	transform: scale(1.05);
}
.cmc-launcher:focus-visible,
.cmc-close:focus-visible,
.cmc-send:focus-visible,
.cmc-chip:focus-visible,
.cmc-input:focus-visible,
.cmc-teaser:focus-visible {
	outline: 3px solid #1d4ed8;
	outline-offset: 2px;
}
.cmc-launcher svg {
	width: 28px;
	height: 28px;
	fill: currentColor;
}

/* Teaser bubble */
.cmc-teaser {
	position: fixed;
	right: 16px;
	bottom: 86px;
	z-index: 99990;
	max-width: 230px;
	padding: 10px 14px;
	border: 0;
	border-radius: 14px 14px 4px 14px;
	background: var(--cmc-cream);
	color: var(--cmc-ink);
	font: inherit;
	text-align: left;
	cursor: pointer;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
	animation: cmc-pop 0.25s ease;
}

/* Panel */
.cmc-panel {
	position: fixed;
	right: 16px;
	bottom: 88px;
	z-index: 99991;
	display: none;
	flex-direction: column;
	width: 370px;
	max-width: calc(100vw - 32px);
	height: 560px;
	max-height: calc(100vh - 112px);
	background: #fff;
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}
.cmc-panel.cmc-open {
	display: flex;
	animation: cmc-pop 0.2s ease;
}

.cmc-header {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 16px;
	background: var(--cmc-green);
	color: #fff;
}
.cmc-title {
	flex: 1;
	min-width: 0;
}
.cmc-title strong {
	display: block;
	font-size: 16px;
}
.cmc-title span {
	display: block;
	font-size: 12.5px;
	opacity: 0.92;
}
.cmc-close {
	flex: none;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}
.cmc-close:hover {
	background: rgba(255, 255, 255, 0.18);
}

.cmc-log {
	flex: 1;
	overflow-y: auto;
	padding: 14px;
	background: var(--cmc-cream);
	display: flex;
	flex-direction: column;
	gap: 10px;
	overscroll-behavior: contain;
}
.cmc-msg {
	max-width: 85%;
	padding: 9px 13px;
	border-radius: 16px;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}
.cmc-bot {
	align-self: flex-start;
	background: var(--cmc-sand);
	border-bottom-left-radius: 4px;
}
.cmc-user {
	align-self: flex-end;
	background: var(--cmc-green);
	color: #fff;
	border-bottom-right-radius: 4px;
}
.cmc-user a {
	color: #fff;
}
.cmc-bot a {
	color: #2f4a38;
	text-decoration: underline;
}
.cmc-error a {
	color: #7a1f17;
	text-decoration: underline;
}
.cmc-error {
	align-self: flex-start;
	background: #fdecea;
	color: #7a1f17;
	border-bottom-left-radius: 4px;
}

.cmc-typing {
	display: inline-flex;
	gap: 4px;
	padding: 4px 2px;
}
.cmc-typing i {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--cmc-green);
	opacity: 0.4;
	animation: cmc-blink 1.1s infinite ease-in-out;
}
.cmc-typing i:nth-child(2) {
	animation-delay: 0.18s;
}
.cmc-typing i:nth-child(3) {
	animation-delay: 0.36s;
}

.cmc-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 0 14px 12px;
	background: var(--cmc-cream);
}
.cmc-chip {
	padding: 7px 12px;
	border: 1.5px solid var(--cmc-green);
	border-radius: 999px;
	background: #fff;
	color: var(--cmc-green-dark);
	font: inherit;
	font-size: 13.5px;
	font-weight: 600;
	cursor: pointer;
}
.cmc-chip:hover {
	background: var(--cmc-green);
	color: #fff;
}

.cmc-form {
	display: flex;
	gap: 8px;
	padding: 10px 12px;
	border-top: 1px solid #eadfc9;
	background: #fff;
}
.cmc-input {
	flex: 1;
	min-width: 0;
	padding: 11px 14px;
	border: 1.5px solid #cfc3aa;
	border-radius: 999px;
	font: inherit;
	font-size: 16px; /* prevents iOS zoom on focus */
	color: var(--cmc-ink);
	background: #fff;
}
.cmc-send {
	flex: none;
	padding: 0 18px;
	border: 0;
	border-radius: 999px;
	background: var(--cmc-green);
	color: #fff;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}
.cmc-send:hover:not(:disabled) {
	background: var(--cmc-green-dark);
}
.cmc-send:disabled,
.cmc-input:disabled {
	opacity: 0.6;
	cursor: default;
}
.cmc-hp {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.cmc-foot {
	padding: 7px 14px 10px;
	background: #fff;
	color: #5c5c5c;
	font-size: 11.5px;
	line-height: 1.35;
	text-align: center;
}
.cmc-foot a {
	color: #2f4a38;
}

@keyframes cmc-pop {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}
@keyframes cmc-blink {
	0%,
	80%,
	100% {
		opacity: 0.3;
	}
	40% {
		opacity: 1;
	}
}

/* Phones: lift the launcher above the site's sticky Call/Book bar; open as a near-full-screen sheet. */
@media (max-width: 600px) {
	.cmc-launcher {
		right: 12px;
		bottom: calc(var(--cmc-mobile-bottom, 84px) + env(safe-area-inset-bottom, 0px));
	}
	.cmc-teaser {
		right: 12px;
		bottom: calc(var(--cmc-mobile-bottom, 84px) + 70px + env(safe-area-inset-bottom, 0px));
	}
	.cmc-panel {
		right: 8px;
		left: 8px;
		bottom: 8px;
		width: auto;
		max-width: none;
		height: calc(100vh - 16px);
		height: calc(100dvh - 16px);
		max-height: none;
		border-radius: 16px;
	}
	body.cmc-is-open .cmc-launcher,
	body.cmc-is-open .cmc-teaser {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cmc-launcher,
	.cmc-panel.cmc-open,
	.cmc-teaser {
		transition: none;
		animation: none;
	}
	.cmc-typing i {
		animation: none;
		opacity: 0.7;
	}
}

@media print {
	#cmc-root {
		display: none !important;
	}
}
