/* Web Akash Assistant — floating chat widget. Mobile-first, orange/teal. */

.waa-root {
	--waa-orange: #f97316;
	--waa-orange-dark: #ea580c;
	--waa-teal: #0f766e;
	--waa-ink: #1f2937;
	--waa-muted: #6b7280;
	--waa-bg: #ffffff;
	--waa-soft: #f3f4f6;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.45;
	color: var(--waa-ink);
}

.waa-root *,
.waa-root *::before,
.waa-root *::after {
	box-sizing: border-box;
}

/* Floating action button */
.waa-fab {
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 99998;
	width: 56px;
	height: 56px;
	border: none;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--waa-orange) 0%, var(--waa-teal) 130%);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.waa-fab:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
}
.waa-fab:focus-visible {
	outline: 3px solid var(--waa-teal);
	outline-offset: 2px;
}

/* Proactive greeting teaser bubble */
.waa-teaser {
	position: fixed;
	right: 16px;
	bottom: 84px;
	z-index: 99998;
	max-width: min(300px, calc(100vw - 32px));
	background: var(--waa-bg);
	border: 1px solid #e5e7eb;
	border-radius: 14px 14px 4px 14px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
	padding: 12px 34px 12px 14px;
	cursor: pointer;
	opacity: 0;
	transform: translateY(8px);
	pointer-events: none;
	transition: opacity 0.25s ease, transform 0.25s ease;
}
.waa-teaser.waa-show {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}
.waa-teaser-text {
	margin: 0;
	font-size: 14px;
}
.waa-teaser-close {
	position: absolute;
	top: 2px;
	right: 6px;
	border: none;
	background: none;
	font-size: 18px;
	line-height: 1;
	color: var(--waa-muted);
	cursor: pointer;
	padding: 4px;
}

/* Chat panel */
.waa-panel {
	position: fixed;
	right: 16px;
	bottom: 84px;
	z-index: 99999;
	width: min(370px, calc(100vw - 24px));
	height: min(560px, calc(100dvh - 110px));
	background: var(--waa-bg);
	border-radius: 16px;
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.30);
	display: none !important;
	flex-direction: column;
	overflow: hidden;
	transition: width 0.2s ease, height 0.2s ease;
}
.waa-panel.waa-open {
	display: flex !important;
}

.waa-header {
	background: linear-gradient(120deg, var(--waa-orange) 0%, var(--waa-orange-dark) 55%, var(--waa-teal) 140%);
	color: #fff;
	padding: 12px 14px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}
.waa-head-text {
	min-width: 0;
	flex: 1 1 auto;
}
.waa-title {
	font-weight: 700;
	font-size: 15px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.waa-subtitle {
	font-size: 12px;
	opacity: 0.9;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.waa-head-btns {
	display: flex;
	align-items: center;
	gap: 6px;
	flex: 0 0 auto;
}
.waa-head-btn,
.waa-close {
	border: none;
	background: rgba(255, 255, 255, 0.18);
	color: #fff;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}
.waa-head-btn:hover,
.waa-close:hover {
	background: rgba(255, 255, 255, 0.32);
}
.waa-expand.waa-is-big {
	background: rgba(255, 255, 255, 0.38);
}

/* Slim bar shown while minimised (inside the panel, header hidden) */
.waa-bar {
	display: none;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	height: 48px;
	padding: 0 14px;
	background: linear-gradient(120deg, var(--waa-orange) 0%, var(--waa-orange-dark) 55%, var(--waa-teal) 140%);
	color: #fff;
	cursor: pointer;
}
.waa-bar-title {
	font-weight: 700;
	font-size: 14px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.waa-bar-restore {
	font-size: 18px;
	line-height: 1;
	flex: 0 0 auto;
}

/* Minimised: collapse to the slim bar only; the bar never blocks the page */
.waa-panel.waa-min {
	height: 48px !important;
}
.waa-panel.waa-min .waa-header,
.waa-panel.waa-min .waa-messages,
.waa-panel.waa-min .waa-chips,
.waa-panel.waa-min .waa-form {
	display: none;
}
.waa-panel.waa-min .waa-bar {
	display: flex;
}

/* Big mode (visitor-chosen, desktop/tablet) */
.waa-panel.waa-big {
	width: min(720px, 96vw);
	height: 88dvh;
}

/* Gentle ring pulse on the chat button when the teaser appears */
.waa-fab.waa-pulse-ring {
	animation: waa-ring 1.6s ease-out 2;
}
@keyframes waa-ring {
	0% { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28), 0 0 0 0 rgba(249, 115, 22, 0.55); }
	100% { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28), 0 0 0 18px rgba(249, 115, 22, 0); }
}

.waa-messages {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 14px 12px;
	background: #fafafa;
}
.waa-row {
	display: flex;
	margin-bottom: 10px;
}
.waa-row-user {
	justify-content: flex-end;
}
.waa-row-assistant {
	justify-content: flex-start;
}
.waa-bubble {
	max-width: 82%;
	padding: 9px 12px;
	border-radius: 14px;
	font-size: 14.5px;
	white-space: pre-wrap;
	word-wrap: break-word;
	overflow-wrap: anywhere;
}
.waa-bubble-user {
	background: var(--waa-teal);
	color: #fff;
	border-bottom-right-radius: 4px;
}
.waa-bubble-assistant {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-bottom-left-radius: 4px;
}
.waa-typing {
	color: var(--waa-muted);
	letter-spacing: 2px;
}

/* "Open" button under a reply that recommends a page */
.waa-open-btn {
	display: inline-block;
	border: 1.5px solid var(--waa-teal);
	background: #f0fdfa;
	color: var(--waa-teal);
	border-radius: 999px;
	padding: 7px 14px;
	font-size: 13.5px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.12s ease;
}
.waa-open-btn:hover {
	background: #ccfbf1;
}

/* Quick-action chips */
.waa-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 8px 12px;
	background: #fafafa;
	border-top: 1px solid #eeeeee;
}
.waa-chips:empty {
	display: none;
}
.waa-chip {
	border: 1.5px solid var(--waa-orange);
	background: #fff7ed;
	color: #9a3412;
	border-radius: 999px;
	padding: 6px 12px;
	font-size: 13.5px;
	cursor: pointer;
	transition: background 0.12s ease;
}
.waa-chip:hover {
	background: #ffedd5;
}

/* Input row */
.waa-form {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 10px;
	border-top: 1px solid #e5e7eb;
	background: var(--waa-bg);
}
.waa-input {
	flex: 1 1 auto;
	min-width: 0;
	border: 1.5px solid #d1d5db;
	border-radius: 999px;
	padding: 10px 14px;
	font-size: 15px;
	font-family: inherit;
	outline: none;
}
.waa-input:focus {
	border-color: var(--waa-teal);
}
.waa-send {
	border: none;
	background: var(--waa-orange);
	color: #fff;
	font-weight: 600;
	font-size: 14.5px;
	border-radius: 999px;
	padding: 10px 16px;
	cursor: pointer;
	flex: 0 0 auto;
}
.waa-send:hover {
	background: var(--waa-orange-dark);
}
.waa-mic {
	border: none;
	background: var(--waa-soft);
	color: var(--waa-ink);
	width: 40px;
	height: 40px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
}
.waa-mic-on {
	background: #fee2e2;
	color: #b91c1c;
	animation: waa-pulse 1.1s ease-in-out infinite;
}
@keyframes waa-pulse {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.1); }
}

/* Tablets: a roomier sheet, still clear of the page edges */
@media (min-width: 481px) and (max-width: 1024px) {
	.waa-panel {
		width: min(420px, calc(100vw - 32px));
		height: min(600px, 70dvh);
	}
	.waa-panel.waa-big {
		width: min(720px, 96vw);
		height: 88dvh;
	}
}

/* Small phones: a compact sheet — never covers the whole screen
   (owner feedback 2026-11-24: the near-full sheet blocked the site) */
@media (max-width: 480px) {
	.waa-panel {
		right: 8px;
		left: 8px;
		width: auto;
		bottom: 80px;
		height: min(520px, 62dvh);
	}
	.waa-panel.waa-big {
		width: auto;
		height: 88dvh;
	}
	.waa-fab {
		right: 14px;
		bottom: 14px;
	}
	.waa-teaser {
		right: 14px;
		bottom: 80px;
	}
}
