/*
 * Garage Door Repair VIP Chat Assistant 1.0.0
 * Brand: cyan #BB9B41 (primary) and gold #9D7F2C (secondary) on a white background.
 * Text uses a deep navy (#1E1B14) for readability on both colours.
 */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600;700&display=swap');

#wca-chat-root {
	--wca-primary: #BB9B41;
	--wca-secondary: #9D7F2C;
	--wca-ink: #1E1B14;
	--wca-muted: #5B6B78;
	--wca-bottom: 88px;
	--wca-right: 20px;
	position: fixed;
	right: var(--wca-right);
	bottom: var(--wca-bottom);
	width: 60px;
	height: 60px;
	z-index: 999998;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color: var(--wca-ink);
	line-height: 1.4;
	-webkit-font-smoothing: antialiased;
}
#wca-chat-root *,
#wca-chat-root *::before,
#wca-chat-root *::after {
	box-sizing: border-box;
}

/* Robot launcher */
#wca-chat-root .wca-launcher {
	position: absolute;
	right: 0;
	bottom: 0;
	width: 60px;
	height: 60px;
	padding: 0;
	margin: 0;
	border: 3px solid var(--wca-secondary);
	border-radius: 50%;
	background: radial-gradient(circle at 30% 25%, #3B3428 0%, #1E1B14 72%);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 0 0 4px rgba(157, 127, 44, 0.25), 0 10px 26px rgba(0, 120, 170, 0.35);
	transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
#wca-chat-root .wca-launcher:hover {
	transform: scale(1.06);
	box-shadow: 0 0 0 5px rgba(157, 127, 44, 0.35), 0 12px 30px rgba(0, 120, 170, 0.42);
}
#wca-chat-root .wca-launcher:focus-visible {
	outline: 3px solid var(--wca-ink);
	outline-offset: 3px;
}
#wca-chat-root .wca-robot {
	display: flex;
	width: 40px;
	height: 40px;
	color: var(--wca-primary);
}
#wca-chat-root .wca-robot svg {
	width: 100%;
	height: 100%;
	display: block;
}

/* Text box beside the launcher */
#wca-chat-root .wca-greeting {
	position: absolute;
	right: 76px;
	bottom: 12px;
	display: inline-flex;
	align-items: center;
	gap: 9px;
	max-width: calc(100vw - 120px);
	white-space: nowrap;
	padding: 10px 18px 10px 14px;
	background: #ffffff;
	color: var(--wca-ink);
	font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	font-size: 13.5px;
	font-weight: 600;
	letter-spacing: 0.2px;
	border: 1px solid #EEE7D3;
	border-radius: 999px;
	box-shadow: 0 10px 28px rgba(30, 27, 20, 0.12), 0 2px 6px rgba(30, 27, 20, 0.05);
	pointer-events: auto;
	transition: opacity 0.2s ease, transform 0.2s ease;
}
#wca-chat-root .wca-greeting::before {
	content: "";
	flex-shrink: 0;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--wca-secondary);
	box-shadow: 0 0 0 3px rgba(157, 127, 44, 0.25);
}

/* Hidden while the chat is open */
#wca-chat-root.wca-open .wca-launcher,
#wca-chat-root.wca-open .wca-greeting {
	opacity: 0;
	pointer-events: none;
	transform: scale(0.9);
}

/* Header logo */
#wca-chat-root .wca-logo {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: #ffffff;
	overflow: hidden;
}
#wca-chat-root .wca-logo img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}
#wca-chat-root .wca-logo-fallback {
	background: radial-gradient(circle at 30% 25%, #D9C277 0%, #BB9B41 60%, #9D7F2C 100%);
	border: 2px solid var(--wca-secondary);
	color: var(--wca-ink);
}
#wca-chat-root .wca-logo-fallback svg {
	width: 26px;
	height: 26px;
	display: block;
}

/* Chat window */
#wca-chat-root .wca-window {
	position: absolute;
	right: 0;
	bottom: 0;
	width: min(330px, calc(100vw - 40px));
	height: min(460px, calc(100vh - var(--wca-bottom) - 40px));
	min-height: 340px;
	display: flex;
	flex-direction: column;
	background: #ffffff;
	border: 1px solid #EEE7D3;
	border-radius: 16px;
	box-shadow: 0 18px 50px rgba(30, 27, 20, 0.2);
	overflow: hidden;
	opacity: 0;
	visibility: hidden;
	transform: translateY(12px) scale(0.98);
	transform-origin: bottom right;
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
#wca-chat-root .wca-window.wca-open {
	opacity: 1;
	visibility: visible;
	transform: translateY(0) scale(1);
}

/* Header: white with a gold accent line */
#wca-chat-root .wca-header {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
	padding: 12px 12px 12px 14px;
	background: #ffffff;
	border-bottom: 2px solid var(--wca-secondary);
}
#wca-chat-root .wca-head-text {
	flex: 1;
	min-width: 0;
}
#wca-chat-root .wca-title {
	font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	font-size: 13.5px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: 0.2px;
	color: var(--wca-ink);
	overflow-wrap: anywhere;
}
#wca-chat-root .wca-sub {
	font-size: 11.5px;
	color: var(--wca-muted);
	margin-top: 2px;
}
#wca-chat-root .wca-close {
	flex-shrink: 0;
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 1px solid #E6DDC8;
	border-radius: 50%;
	background: #ffffff;
	color: var(--wca-ink);
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
}
#wca-chat-root .wca-close:hover {
	border-color: var(--wca-secondary);
	background: #FAF5E6;
}
#wca-chat-root .wca-close:focus-visible {
	outline: 2px solid var(--wca-primary);
	outline-offset: 2px;
}

/* Conversation */
#wca-chat-root .wca-messages {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	padding: 12px;
	background: #ffffff;
	display: flex;
	flex-direction: column;
	gap: 9px;
}
#wca-chat-root .wca-msg {
	max-width: 92%;
	padding: 8px 11px;
	border-radius: 12px;
	font-size: 12.5px;
	line-height: 1.5;
	overflow-wrap: anywhere;
}
#wca-chat-root .wca-msg a {
	color: #6E5820;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
	word-break: break-all;
}
#wca-chat-root .wca-msg-bot {
	align-self: flex-start;
	background: #FBF8F1;
	color: var(--wca-ink);
	border: 1px solid #EFE6CC;
	border-bottom-left-radius: 4px;
}
#wca-chat-root .wca-msg-bot strong {
	font-weight: 700;
}
#wca-chat-root .wca-msg-user {
	align-self: flex-end;
	background: var(--wca-primary);
	color: var(--wca-ink);
	font-weight: 600;
	border-bottom-right-radius: 4px;
}
#wca-chat-root .wca-msg-typing {
	align-self: flex-start;
	display: inline-flex;
	gap: 4px;
	padding: 10px 12px;
	background: #FBF8F1;
	border: 1px solid #EFE6CC;
	border-radius: 12px;
	border-bottom-left-radius: 4px;
}
#wca-chat-root .wca-msg-typing span {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--wca-secondary);
	opacity: 0.4;
	animation: wca-blink 1.2s infinite ease-in-out;
}
#wca-chat-root .wca-msg-typing span:nth-child(2) { animation-delay: 0.2s; }
#wca-chat-root .wca-msg-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes wca-blink {
	0%, 80%, 100% { opacity: 0.25; }
	40% { opacity: 1; }
}

/* Quick buttons: compact two-column grid */
#wca-chat-root .wca-quick {
	flex-shrink: 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 5px;
	padding: 8px;
	background: #ffffff;
	border-top: 1px solid #F1ECDD;
}
#wca-chat-root .wca-quick-btn {
	display: flex;
	align-items: center;
	gap: 6px;
	min-height: 30px;
	margin: 0;
	padding: 5px 7px;
	background: #ffffff;
	color: var(--wca-ink);
	border: 1px solid #EADFC4;
	border-radius: 9px;
	font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.2;
	text-align: left;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
}
#wca-chat-root .wca-quick-btn::before {
	content: "";
	flex-shrink: 0;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--wca-secondary);
}
#wca-chat-root .wca-quick-btn:hover {
	border-color: var(--wca-secondary);
	background: #FAF5E6;
}
#wca-chat-root .wca-quick-btn:focus-visible {
	outline: 2px solid var(--wca-primary);
	outline-offset: 2px;
}
#wca-chat-root .wca-quick-btn:disabled {
	opacity: 0.5;
	cursor: default;
}

/* Input row */
#wca-chat-root .wca-input-row {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
	margin: 0;
	padding: 8px 10px 10px;
	background: #ffffff;
	border-top: 1px solid #F1ECDD;
}
#wca-chat-root .wca-input {
	flex: 1;
	min-width: 0;
	height: 36px;
	margin: 0;
	padding: 0 14px;
	border: 1px solid #E2D7BA;
	border-radius: 999px;
	background: #ffffff;
	color: var(--wca-ink);
	font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	font-size: 12.5px;
	font-weight: 500;
	outline: none;
	box-shadow: inset 0 1px 2px rgba(30, 27, 20, 0.04);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
#wca-chat-root .wca-input::placeholder {
	color: #8A98A4;
	font-weight: 500;
}
#wca-chat-root .wca-input:hover {
	border-color: #CDBE93;
}
#wca-chat-root .wca-input:focus {
	border-color: var(--wca-primary);
	box-shadow: 0 0 0 3px rgba(187, 155, 65, 0.18);
}
#wca-chat-root .wca-send {
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	border-radius: 50%;
	background: linear-gradient(135deg, #D9C277 0%, #BB9B41 60%, #9D7F2C 100%);
	color: var(--wca-ink);
	box-shadow: 0 6px 16px rgba(187, 155, 65, 0.35);
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
#wca-chat-root .wca-send:hover {
	transform: translateY(-1px);
	box-shadow: 0 8px 20px rgba(187, 155, 65, 0.45);
}
#wca-chat-root .wca-send:active {
	transform: translateY(0);
}
#wca-chat-root .wca-send:focus-visible {
	outline: 2px solid var(--wca-secondary);
	outline-offset: 2px;
}
#wca-chat-root .wca-send:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

/* Small screens */
@media (max-width: 480px) {
	#wca-chat-root .wca-greeting {
		white-space: normal;
		width: min(190px, calc(100vw - 120px));
		font-size: 12.5px;
		line-height: 1.35;
		padding: 9px 14px 9px 12px;
	}
	#wca-chat-root .wca-window {
		width: calc(100vw - 32px);
		right: 0;
	}
}
@media (max-width: 340px) {
	#wca-chat-root .wca-quick {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	#wca-chat-root *,
	#wca-chat-root *::before,
	#wca-chat-root *::after {
		transition: none !important;
		animation: none !important;
	}
}
