/* Kirtanand — guided site assistant (deterministic knowledge base, no external AI)
   Brand: Divine Blue #1E4DB7 · Saffron Gold #F5A623 · navy text #0b2a4d */

.kirtanand {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 999900; /* deliberately below .whnf26-spop (999998) and the homepage popup (999999) */
	font-family: inherit;
}

/* Hidden while a site popup is open (toggled by JS) */
.kirtanand.kirtanand--suppressed { visibility: hidden; }

.kirtanand__sr {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0; border: 0;
	clip: rect(0 0 0 0); clip-path: inset(50%);
	overflow: hidden; white-space: nowrap;
}

/* ---------- Launcher ---------- */
.kirtanand__launcher {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	color: #fff;
	background: linear-gradient(135deg, #1E4DB7 0%, #163a8f 100%);
	box-shadow: 0 6px 20px rgba(11, 42, 77, 0.35);
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.kirtanand__launcher:hover,
.kirtanand__launcher:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(11, 42, 77, 0.45), 0 0 0 3px rgba(245, 166, 35, 0.55);
}
.kirtanand__launcher:focus-visible { outline: 2px solid #F5A623; outline-offset: 3px; }

.kirtanand__tip {
	position: absolute;
	right: calc(100% + 10px);
	top: 50%;
	transform: translateY(-50%);
	background: #0b2a4d;
	color: #fff;
	font-size: 13px;
	line-height: 1;
	padding: 7px 11px;
	border-radius: 8px;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.15s ease;
}
.kirtanand__launcher:hover .kirtanand__tip,
.kirtanand__launcher:focus-visible .kirtanand__tip { opacity: 1; }

.kirtanand--open .kirtanand__launcher { display: none; }

/* ---------- Panel ---------- */
.kirtanand__panel {
	position: fixed;
	right: 24px;
	bottom: 24px;
	width: min(380px, calc(100vw - 32px));
	max-height: min(600px, calc(100vh - 48px));
	display: flex;
	flex-direction: column;
	background: rgba(255, 255, 255, 0.94);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	border: 1px solid rgba(30, 77, 183, 0.18);
	border-radius: 18px;
	box-shadow: 0 18px 50px rgba(11, 42, 77, 0.30);
	overflow: hidden;
	color: #0b2a4d;
}
.kirtanand__panel[hidden] { display: none; }

.kirtanand__head {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 16px;
	background: linear-gradient(135deg, #1E4DB7 0%, #163a8f 100%);
	color: #fff;
	border-bottom: 3px solid #F5A623;
}
.kirtanand__head-txt { flex: 1; min-width: 0; }
.kirtanand__title {
	margin: 0;
	font-size: 17px;
	line-height: 1.2;
	font-weight: 700;
	color: #fff;
}
.kirtanand__subtitle {
	margin: 2px 0 0;
	font-size: 12.5px;
	line-height: 1.3;
	color: #ffe9c4; /* AA on #1E4DB7 */
}
.kirtanand__close {
	flex: none;
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}
.kirtanand__close:hover { background: rgba(255, 255, 255, 0.26); }
.kirtanand__close:focus-visible { outline: 2px solid #F5A623; outline-offset: 2px; }

.kirtanand__log {
	flex: 1;
	overflow-y: auto;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-height: 180px;
	scroll-behavior: smooth;
}

.kirtanand__msg {
	max-width: 88%;
	padding: 10px 13px;
	border-radius: 14px;
	font-size: 14.5px;
	line-height: 1.5;
	white-space: pre-line;
	overflow-wrap: break-word;
}
.kirtanand__msg--bot {
	align-self: flex-start;
	background: #eef2fb;
	border: 1px solid rgba(30, 77, 183, 0.14);
	border-bottom-left-radius: 4px;
	color: #0b2a4d;
}
.kirtanand__msg--user {
	align-self: flex-end;
	background: #1E4DB7;
	color: #fff;
	border-bottom-right-radius: 4px;
}

.kirtanand__links {
	align-self: flex-start;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	max-width: 88%;
}
.kirtanand__link {
	display: inline-block;
	padding: 7px 12px;
	border-radius: 999px;
	font-size: 13px;
	line-height: 1.2;
	text-decoration: none;
	color: #0b2a4d;
	background: #fdf1dc;
	border: 1px solid #F5A623;
	transition: background 0.15s ease;
}
.kirtanand__link:hover { background: #F5A623; color: #0b2a4d; text-decoration: none; }
.kirtanand__link:focus-visible { outline: 2px solid #1E4DB7; outline-offset: 2px; }

/* ---------- Quick-reply chips ---------- */
.kirtanand__chips {
	display: flex;
	gap: 6px;
	overflow-x: auto;
	padding: 8px 12px;
	border-top: 1px solid rgba(30, 77, 183, 0.12);
	scrollbar-width: thin;
}
.kirtanand__chip {
	flex: none;
	padding: 7px 12px;
	border-radius: 999px;
	border: 1px solid rgba(30, 77, 183, 0.35);
	background: #fff;
	color: #1E4DB7;
	font-size: 13px;
	line-height: 1.2;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}
.kirtanand__chip:hover { background: #1E4DB7; color: #fff; }
.kirtanand__chip:focus-visible { outline: 2px solid #F5A623; outline-offset: 2px; }

/* ---------- Input ---------- */
.kirtanand__form {
	display: flex;
	gap: 8px;
	padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
	border-top: 1px solid rgba(30, 77, 183, 0.12);
	background: rgba(255, 255, 255, 0.85);
}
.kirtanand__input {
	flex: 1;
	min-width: 0;
	padding: 10px 14px;
	border: 1px solid rgba(30, 77, 183, 0.35);
	border-radius: 999px;
	font-size: 14.5px;
	color: #0b2a4d;
	background: #fff;
}
.kirtanand__input::placeholder { color: #5a6b80; }
.kirtanand__input:focus { outline: 2px solid #1E4DB7; outline-offset: 1px; }
.kirtanand__send {
	flex: none;
	width: 42px;
	height: 42px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background: #1E4DB7;
	color: #fff;
	cursor: pointer;
	transition: background 0.15s ease;
}
.kirtanand__send:hover { background: #163a8f; }
.kirtanand__send:focus-visible { outline: 2px solid #F5A623; outline-offset: 2px; }

/* ---------- Mobile ---------- */
@media (max-width: 480px) {
	.kirtanand {
		right: 16px;
		/* keep the launcher above the WhatsApp-thumb zone */
		bottom: calc(84px + env(safe-area-inset-bottom, 0px));
	}
	.kirtanand__panel {
		right: 0;
		left: 0;
		bottom: 0;
		width: 100%;
		max-height: none;
		height: calc(100dvh - 56px);
		border-radius: 18px 18px 0 0;
		padding-top: env(safe-area-inset-top, 0px);
	}
	.kirtanand__tip { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	.kirtanand__launcher,
	.kirtanand__tip,
	.kirtanand__chip,
	.kirtanand__link,
	.kirtanand__send { transition: none; }
	.kirtanand__launcher:hover,
	.kirtanand__launcher:focus-visible { transform: none; }
	.kirtanand__log { scroll-behavior: auto; }
}
