/* Legacy Beach Homes Chat Assistant — frontend styles
   Vanilla CSS, no framework, no external fonts (inherits site fonts). */

#lbh-chat-root {
	--lbh-primary: #1a5f7a;
	--lbh-primary-dark: #0f3d4f;
	--lbh-accent: #f4a261;
	--lbh-bg: #ffffff;
	--lbh-text: #1f2937;
	--lbh-muted: #6b7280;
	--lbh-border: #e5e7eb;
	--lbh-radius: 14px;
	position: fixed;
	z-index: 999999;
	bottom: 20px;
	right: 20px;
	font-family: inherit;
}

#lbh-chat-root.lbh-pos-bottom-left {
	right: auto;
	left: 20px;
}

.lbh-chat-launcher {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: var(--lbh-primary);
	color: #fff;
	border: none;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
	cursor: pointer;
	font-size: 26px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.15s ease, background 0.15s ease;
}

.lbh-chat-launcher:hover {
	transform: scale(1.05);
	background: var(--lbh-primary-dark);
}

.lbh-chat-launcher:focus-visible {
	outline: 3px solid var(--lbh-accent);
	outline-offset: 2px;
}

.lbh-chat-panel {
	position: absolute;
	bottom: 76px;
	right: 0;
	width: 360px;
	max-width: calc(100vw - 32px);
	max-height: min(70vh, 620px);
	background: var(--lbh-bg);
	border-radius: var(--lbh-radius);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--lbh-border);
}

#lbh-chat-root.lbh-pos-bottom-left .lbh-chat-panel {
	right: auto;
	left: 0;
}

.lbh-chat-header {
	background: var(--lbh-primary);
	color: #fff;
	padding: 14px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-shrink: 0;
}

.lbh-chat-header h2 {
	font-size: 15px;
	margin: 0;
	font-weight: 600;
}

.lbh-chat-close {
	background: transparent;
	border: none;
	color: #fff;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	padding: 4px 8px;
}

.lbh-chat-body {
	padding: 14px 16px;
	overflow-y: auto;
	flex: 1 1 auto;
	background: #f9fafb;
}

.lbh-chat-message {
	background: #fff;
	border: 1px solid var(--lbh-border);
	border-radius: 10px;
	padding: 10px 12px;
	margin-bottom: 12px;
	font-size: 14px;
	line-height: 1.5;
	color: var(--lbh-text);
}

.lbh-chat-options {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 12px;
}

.lbh-chat-option-btn {
	text-align: left;
	background: #fff;
	border: 1px solid var(--lbh-border);
	border-radius: 10px;
	padding: 10px 12px;
	font-size: 14px;
	cursor: pointer;
	color: var(--lbh-text);
	transition: border-color 0.15s ease, background 0.15s ease;
}

.lbh-chat-option-btn:hover {
	border-color: var(--lbh-primary);
	background: #eef6f8;
}

.lbh-chat-cta {
	display: inline-block;
	margin-top: 8px;
	background: var(--lbh-accent);
	color: #1f2937;
	text-decoration: none;
	font-weight: 600;
	font-size: 13px;
	padding: 8px 14px;
	border-radius: 999px;
}

.lbh-chat-cta:hover {
	filter: brightness(0.95);
}

.lbh-chat-back {
	background: none;
	border: none;
	color: var(--lbh-primary);
	font-size: 13px;
	cursor: pointer;
	padding: 4px 0 12px;
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.lbh-chat-footer {
	border-top: 1px solid var(--lbh-border);
	padding: 10px;
	display: flex;
	gap: 8px;
	flex-shrink: 0;
	background: #fff;
}

.lbh-chat-input {
	flex: 1;
	border: 1px solid var(--lbh-border);
	border-radius: 999px;
	padding: 8px 14px;
	font-size: 14px;
	min-width: 0;
}

.lbh-chat-send {
	background: var(--lbh-primary);
	color: #fff;
	border: none;
	border-radius: 999px;
	width: 38px;
	height: 38px;
	flex-shrink: 0;
	cursor: pointer;
	font-size: 16px;
}

.lbh-chat-form-field {
	margin-bottom: 10px;
}

.lbh-chat-form-field label {
	display: block;
	font-size: 12px;
	color: var(--lbh-muted);
	margin-bottom: 4px;
}

.lbh-chat-form-field input,
.lbh-chat-form-field textarea {
	width: 100%;
	border: 1px solid var(--lbh-border);
	border-radius: 8px;
	padding: 8px 10px;
	font-size: 14px;
	font-family: inherit;
	box-sizing: border-box;
}

.lbh-chat-form-field textarea {
	min-height: 70px;
	resize: vertical;
}

.lbh-chat-submit-btn {
	background: var(--lbh-primary);
	color: #fff;
	border: none;
	border-radius: 999px;
	padding: 9px 16px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	width: 100%;
}

.lbh-chat-hp-field {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Mobile: never cover booking buttons/content; smaller footprint, safe-area aware */
@media (max-width: 480px) {
	#lbh-chat-root {
		bottom: max(14px, env(safe-area-inset-bottom));
		right: 14px;
	}
	#lbh-chat-root.lbh-pos-bottom-left {
		left: 14px;
	}
	.lbh-chat-launcher {
		width: 52px;
		height: 52px;
		font-size: 22px;
	}
	.lbh-chat-panel {
		width: calc(100vw - 28px);
		bottom: 64px;
		max-height: 75vh;
	}
}
