/* AeroBuddy — franchise assistant (card + chat) */

/* Fixed bottom-right launcher (scroll-to-top control removed from footer) */
.aerobuddy-root {
	/* Match kidscare theme (css/kidscare.css): primary teal + accent coral */
	--ab-brand: #1bb4b9;
	--ab-brand-deep: #1396a0;
	--ab-brand-mid: #18a8ad;
	--ab-focus-ring: rgba(27, 180, 185, 0.35);
	position: fixed;
	right: calc(18px + env(safe-area-inset-right, 0px));
	bottom: calc(22px + env(safe-area-inset-bottom, 0px));
	z-index: 999999;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	/* Slightly larger than page default so chat stays readable */
	font-size: clamp(18px, 2.75vw, 21px);
	line-height: 1.52;
	box-sizing: border-box;
}

.aerobuddy-root *,
.aerobuddy-root *::before,
.aerobuddy-root *::after {
	box-sizing: border-box;
}

/* Honeypot — leave off-screen; do not display:none (some bots skip hidden fields) */
.aerobuddy-hp-field {
	position: absolute;
	left: -10000px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
	opacity: 0;
	pointer-events: none;
}

.aerobuddy-launch {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.65rem 1rem 0.65rem 0.85rem;
	border: none;
	border-radius: 999px;
	cursor: pointer;
	background: linear-gradient(135deg, var(--ab-brand-mid) 0%, var(--ab-brand-deep) 100%);
	color: #fff;
	font-weight: 600;
	font-size: 1.08rem;
	box-shadow: 0 6px 24px rgba(19, 150, 160, 0.45);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.aerobuddy-launch:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 28px rgba(19, 150, 160, 0.5);
}

.aerobuddy-launch:focus-visible {
	outline: 3px solid #ffca28;
	outline-offset: 2px;
}

.aerobuddy-launch-mascot {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
	border: 2px solid rgba(255, 255, 255, 0.35);
	background: rgba(255, 255, 255, 0.15);
}

.aerobuddy-panel {
	position: absolute;
	right: 0;
	bottom: calc(100% + 12px);
	width: min(100vw - 32px, 416px);
	max-height: min(84vh, 620px);
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.06);
	overflow: hidden;
}

.aerobuddy-panel[hidden] {
	display: none !important;
}

.aerobuddy-panel-inner {
	display: flex;
	flex-direction: column;
	max-height: min(84vh, 620px);
	min-height: 0;
}

/* Header + wave — equal vertical padding so title stays optically centered with mascot */
.aerobuddy-topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	padding: 0.85rem 0.85rem 0.85rem;
	background: linear-gradient(180deg, var(--ab-brand) 0%, var(--ab-brand-deep) 100%);
	color: #fff;
	position: relative;
}

.aerobuddy-topbar::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 14px;
	background: #fff;
	border-radius: 50% 50% 0 0 / 100% 100% 0 0;
	transform: scaleX(1.15);
}

.aerobuddy-topbar-brand {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	position: relative;
	z-index: 1;
	min-width: 0;
	flex: 1;
}

.aerobuddy-logo-ring {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: #fff;
	overflow: hidden;
	flex-shrink: 0;
}

.aerobuddy-logo-img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: 44px;
	max-height: 44px;
	object-fit: contain;
	object-position: center center;
}

.aerobuddy-brand-title {
	margin: 0;
	padding: 0;
	font-size: 1.28rem;
	font-weight: 700;
	line-height: 1.15;
	color: #fff;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	align-self: center;
}

.aerobuddy-close {
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	border: none;
	background: rgba(255, 255, 255, 0.18);
	border-radius: 10px;
	font-size: 1.45rem;
	line-height: 1;
	cursor: pointer;
	color: #fff;
	position: relative;
	z-index: 1;
}

.aerobuddy-close:hover {
	background: rgba(255, 255, 255, 0.28);
}

.aerobuddy-body {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	padding: 0.65rem 0.85rem 0.5rem;
	background: #fff;
}

.aerobuddy-step {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
}

/* Chat rows: label above bubble, Kidzee-style alignment */
.aerobuddy-msg {
	display: flex;
	flex-direction: column;
	width: 100%;
	margin-bottom: 0.65rem;
}

.aerobuddy-msg-bot {
	align-items: flex-start;
}

.aerobuddy-msg-user {
	align-items: flex-end;
}

.aerobuddy-msg-label {
	font-size: 0.94rem;
	font-weight: 600;
	color: #757575;
	margin-bottom: 0.3rem;
	line-height: 1.25;
	max-width: 100%;
}

.aerobuddy-msg-user .aerobuddy-msg-label {
	text-align: right;
	width: 100%;
}

.aerobuddy-bubble {
	max-width: 92%;
	padding: 0.78rem 1rem;
	border-radius: 16px;
	font-size: 1.22rem;
	line-height: 1.5;
	white-space: pre-wrap;
	word-break: break-word;
	text-align: left;
}

.aerobuddy-bubble-user {
	align-self: flex-end;
	background: var(--ab-brand-deep);
	color: #fff;
	border-bottom-right-radius: 5px;
}

.aerobuddy-bubble-bot {
	align-self: flex-start;
	background: #eceff1;
	color: #212121;
	border-bottom-left-radius: 5px;
}

.aerobuddy-bubble-error {
	align-self: flex-start;
	background: #ffebee;
	color: #b71c1c;
	border: 1px solid #ffcdd2;
}

.aerobuddy-card {
	background: #e0e0e0;
	border-radius: 12px;
	padding: 0.75rem 0.85rem 0.85rem;
}

.aerobuddy-card-title {
	font-weight: 600;
	font-size: 1.12rem;
	margin-bottom: 0.5rem;
	color: #212121;
}

.aerobuddy-email-input {
	width: 100%;
	padding: 0.6rem 0.7rem;
	border: 1px solid #bdbdbd;
	border-radius: 8px;
	font: inherit;
	font-size: 1.1rem;
	background: #fff;
	margin-bottom: 0.5rem;
}

.aerobuddy-email-input::placeholder {
	color: #9e9e9e;
	font-size: 1em;
	opacity: 1;
}

.aerobuddy-email-input:focus {
	outline: none;
	border-color: var(--ab-brand);
	box-shadow: 0 0 0 2px var(--ab-focus-ring);
}

.aerobuddy-submit-green {
	border: none;
	background: none;
	color: var(--ab-brand-deep);
	font-weight: 700;
	font-size: 1.08rem;
	cursor: pointer;
	padding: 0.25rem 0;
	align-self: flex-end;
}

.aerobuddy-submit-green:hover {
	text-decoration: underline;
	color: var(--ab-brand);
}

.aerobuddy-submit-green:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	text-decoration: none;
}

.aerobuddy-email-hint {
	margin: 0.35rem 0 0;
	font-size: 0.9rem;
	color: #c62828;
}

.aerobuddy-intro-block {
	margin-bottom: 0.35rem;
}

.aerobuddy-intro-text {
	margin: 0 0 0.65rem;
	font-size: 1.12rem;
	color: #37474f;
	line-height: 1.52;
}

.aerobuddy-menu-list {
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
	margin-bottom: 0.75rem;
}

.aerobuddy-menu-item {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	width: 100%;
	text-align: left;
	padding: 0.6rem 0.7rem;
	border: 1px solid #cfd8dc;
	border-radius: 10px;
	background: #fff;
	font: inherit;
	font-size: 1.1rem;
	color: #1565c0;
	cursor: pointer;
}

.aerobuddy-menu-item:hover {
	border-color: var(--ab-brand);
	background: rgba(27, 180, 185, 0.1);
}

.aerobuddy-menu-arrow {
	color: var(--ab-brand-deep);
	font-weight: 700;
}

.aerobuddy-more-prompt {
	margin: 0 0 0.45rem;
	font-size: 1.08rem;
	color: #455a64;
	line-height: 1.48;
}

.aerobuddy-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-bottom: 0.5rem;
}

.aerobuddy-pill {
	padding: 0.4rem 0.8rem;
	border: 1px solid #cfd8dc;
	border-radius: 999px;
	background: #fff;
	font: inherit;
	font-size: 1.08rem;
	color: #37474f;
	cursor: pointer;
}

.aerobuddy-pill:hover {
	border-color: var(--ab-brand-deep);
	color: var(--ab-brand-deep);
}

.aerobuddy-messages {
	display: flex;
	flex-direction: column;
	min-height: 102px;
	max-height: 260px;
	overflow-y: auto;
	padding: 0.4rem 0;
	border-top: 1px solid #eee;
	margin-top: 0.25rem;
	gap: 0;
}

.aerobuddy-msg-bot .aerobuddy-btn-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-top: 0.35rem;
	width: 100%;
	max-width: 100%;
	justify-content: flex-start;
}

.aerobuddy-chip-btn {
	display: inline-block;
	padding: 0.48rem 0.85rem;
	border-radius: 999px;
	background: var(--ab-brand-deep);
	color: #fff !important;
	font-size: 1.07rem;
	font-weight: 600;
	text-decoration: none;
	border: none;
	cursor: pointer;
}

.aerobuddy-chip-btn:hover {
	filter: brightness(1.08);
}

.aerobuddy-bottom-bar {
	display: flex;
	justify-content: center;
	padding: 0.4rem 0 0.3rem;
	border-top: 1px solid #eee;
}

.aerobuddy-restart {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	border: none;
	background: none;
	color: var(--ab-brand-deep);
	font-weight: 600;
	font-size: 1.05rem;
	cursor: pointer;
	padding: 0.25rem 0;
}

.aerobuddy-restart:hover {
	text-decoration: underline;
}

.aerobuddy-restart-icon {
	font-size: 1.2rem;
}

.aerobuddy-form {
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
	padding: 0.35rem 0 0.25rem;
}

.aerobuddy-input {
	width: 100%;
	resize: vertical;
	min-height: 54px;
	max-height: 118px;
	padding: 0.62rem 0.72rem;
	border: 1px solid #bdbdbd;
	border-radius: 10px;
	font: inherit;
	font-size: 1.14rem;
}

.aerobuddy-input::placeholder {
	color: #9e9e9e;
	font-size: 1em;
	opacity: 1;
}

.aerobuddy-input:focus {
	outline: none;
	border-color: var(--ab-brand);
	box-shadow: 0 0 0 2px var(--ab-focus-ring);
}

.aerobuddy-input:disabled {
	background: #f5f5f5;
	color: #9e9e9e;
}

.aerobuddy-send {
	align-self: flex-end;
	padding: 0.5rem 1.15rem;
	border: none;
	border-radius: 10px;
	background: linear-gradient(180deg, var(--ab-brand) 0%, var(--ab-brand-deep) 100%);
	color: #fff;
	font-weight: 600;
	font-size: 1.05rem;
	cursor: pointer;
}

.aerobuddy-send:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.aerobuddy-disclaimer {
	margin: 0;
	padding: 0.45rem 0.85rem 0.65rem;
	font-size: 0.86rem;
	color: #78909c;
	line-height: 1.45;
	background: #fafafa;
	border-top: 1px solid #eee;
}

.aerobuddy-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (max-width: 600px) {
	.aerobuddy-root {
		right: calc(12px + env(safe-area-inset-right, 0px));
		bottom: calc(18px + env(safe-area-inset-bottom, 0px));
	}

	.aerobuddy-panel {
		width: calc(100vw - 24px);
		right: -6px;
	}

	.aerobuddy-launch-text {
		display: none;
	}

	.aerobuddy-launch {
		padding: 0.75rem;
		border-radius: 50%;
	}
}

/*
 * reCAPTCHA v3 badge: keep visible (policy), but shrink and tuck into the
 * bottom-left so it blocks less page content than the default size.
 */
.grecaptcha-badge {
	left: 8px !important;
	right: auto !important;
	bottom: 8px !important;
	transform: scale(0.62) !important;
	transform-origin: left bottom !important;
}
