/* AAA Super Assistant — floating booking widget. Uses the --aaaos-* brand
 * variables printed by includes/branding.php, so it matches whichever of
 * the four AAAOS brand sites it's running on without any extra CSS. */

#aaaos-assistant {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 99999;
	font-family: var(--aaaos-font-body, system-ui, sans-serif);
}

#aaaos-assistant-bubble {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: var(--aaaos-laterite, #c14a26);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
	cursor: pointer;
	border: none;
	font-size: 26px;
	padding: 0;
	overflow: hidden;
}

#aaaos-assistant-bubble img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

#aaaos-assistant-panel {
	display: none;
	position: absolute;
	right: 0;
	bottom: 74px;
	width: 320px;
	max-width: 88vw;
	background: var(--aaaos-paper, #fffaf0);
	border: 1px solid var(--aaaos-stone-dim, #f7e6c4);
	border-radius: 14px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, .28);
	overflow: hidden;
}

#aaaos-assistant.open #aaaos-assistant-panel {
	display: block;
}

#aaaos-assistant-head {
	background: var(--aaaos-ink, #221a10);
	color: #fff;
	padding: 14px 16px;
	display: flex;
	align-items: center;
	gap: 10px;
}

#aaaos-assistant-head-icon {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

#aaaos-assistant-head-text strong {
	display: block;
	font-size: 15px;
}

#aaaos-assistant-head-text span {
	font-size: 12px;
	opacity: .8;
}

#aaaos-assistant-body {
	padding: 14px 16px;
}

#aaaos-assistant-greeting {
	font-size: 13px;
	color: var(--aaaos-ink-soft, #4a3c2c);
	margin: 0 0 12px;
}

.aaaos-assistant-btn {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	padding: 10px 12px;
	margin-bottom: 8px;
	border-radius: 8px;
	border: 1px solid var(--aaaos-stone-dim, #f7e6c4);
	background: var(--aaaos-stone, #fdf3e2);
	color: var(--aaaos-ink, #221a10);
	text-decoration: none;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	box-sizing: border-box;
}

.aaaos-assistant-btn.wa {
	background: #25d366;
	color: #fff;
	border-color: #25d366;
}

.aaaos-assistant-btn.mail {
	background: var(--aaaos-jungle, #1f6b4a);
	color: #fff;
	border-color: var(--aaaos-jungle, #1f6b4a);
}

#aaaos-assistant-form {
	display: none;
	margin-top: 6px;
}

#aaaos-assistant-form.open {
	display: block;
}

#aaaos-assistant-form input,
#aaaos-assistant-form textarea {
	width: 100%;
	box-sizing: border-box;
	margin-bottom: 6px;
	padding: 7px 8px;
	border: 1px solid var(--aaaos-stone-dim, #f7e6c4);
	border-radius: 6px;
	font-size: 13px;
}

#aaaos-assistant-form button[type="submit"] {
	width: 100%;
	padding: 9px;
	border: none;
	border-radius: 8px;
	background: var(--aaaos-laterite, #c14a26);
	color: #fff;
	font-weight: 700;
	cursor: pointer;
}

#aaaos-assistant-status {
	font-size: 12px;
	margin-top: 6px;
}

/* Hook popup — attention-grabbing speech bubble next to the launcher.
 * Two real, sibling <button>s (open / close) instead of a div posing as
 * a button, so focus and keyboard activation work natively. */
#aaaos-assistant-hook {
	display: none;
	position: absolute;
	right: 68px;
	bottom: 12px;
	width: max-content;
	max-width: min(240px, calc(100vw - 96px));
	align-items: center;
	background: var(--aaaos-paper, #fffaf0);
	border: 1px solid var(--aaaos-stone-dim, #f7e6c4);
	border-radius: 14px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
	opacity: 0;
	transform: translateY(6px) scale(.96);
	transition: opacity .25s ease, transform .25s ease;
	box-sizing: border-box;
}

#aaaos-assistant-hook.show {
	display: flex;
	opacity: 1;
	transform: translateY(0) scale(1);
}

#aaaos-assistant-hook::after {
	content: "";
	position: absolute;
	right: -7px;
	bottom: 22px;
	width: 14px;
	height: 14px;
	background: var(--aaaos-paper, #fffaf0);
	border-right: 1px solid var(--aaaos-stone-dim, #f7e6c4);
	border-bottom: 1px solid var(--aaaos-stone-dim, #f7e6c4);
	transform: rotate(-45deg);
}

#aaaos-assistant-hook-open {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 1;
	padding: 10px 6px 10px 10px;
	border: none;
	background: none;
	text-align: left;
	cursor: pointer;
}

#aaaos-assistant-hook-icon {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

#aaaos-assistant-hook span {
	font-size: 12.5px;
	line-height: 1.35;
	color: var(--aaaos-ink, #221a10);
	font-weight: 600;
}

#aaaos-assistant-hook-close {
	position: absolute;
	top: 4px;
	right: 6px;
	width: 18px;
	height: 18px;
	border: none;
	background: none;
	color: var(--aaaos-ink-soft, #4a3c2c);
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
}

#aaaos-assistant.open #aaaos-assistant-hook {
	display: none;
}

/* Small screens — tighten offsets so the launcher, panel and hook popup
 * all stay fully within the viewport instead of relying on the desktop
 * spacing (right:20px container + right:68px hook offset), which is what
 * let the hook popup clip off the left edge on narrow phones. */
@media (max-width: 480px) {
	#aaaos-assistant {
		right: 12px;
		bottom: 12px;
	}

	#aaaos-assistant-bubble {
		width: 52px;
		height: 52px;
		font-size: 22px;
	}

	#aaaos-assistant-panel {
		bottom: 62px;
		width: min(320px, calc(100vw - 24px));
	}

	#aaaos-assistant-hook {
		right: 58px;
		max-width: min(220px, calc(100vw - 82px));
	}

	#aaaos-assistant-hook-icon {
		width: 28px;
		height: 28px;
	}

	#aaaos-assistant-hook span {
		font-size: 12px;
	}
}
