/* TA AI Chatbot — widget styles. Scoped under .ta-chatbot. */
.ta-chatbot {
	display: flex;
	flex-direction: column;
	max-width: 640px;
	height: 520px;
	margin: 1em 0;
	border: 1px solid #d6d2c8;
	border-radius: 10px;
	overflow: hidden;
	background: #fcfbf7;
	font-size: 15px;
	line-height: 1.5;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.ta-chatbot__header {
	padding: 12px 16px;
	font-weight: 600;
	color: #fff;
	background: #3f6f4e;
}

.ta-chatbot__log {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ta-chatbot__msg {
	max-width: 85%;
	padding: 9px 13px;
	border-radius: 12px;
	white-space: normal;
	word-wrap: break-word;
	overflow-wrap: anywhere;
}

.ta-chatbot__msg--user {
	align-self: flex-end;
	background: #3f6f4e;
	color: #fff;
	border-bottom-right-radius: 3px;
}

.ta-chatbot__msg--assistant {
	align-self: flex-start;
	background: #efece3;
	color: #1f1f1c;
	border-bottom-left-radius: 3px;
}

.ta-chatbot__msg--assistant a {
	color: #2c5d3c;
	text-decoration: underline;
}

.ta-chatbot__msg--typing {
	font-style: italic;
	color: #5a5a52;
	animation: ta-chatbot-pulse 1.2s ease-in-out infinite;
}

@keyframes ta-chatbot-pulse {
	0%, 100% { opacity: 0.45; }
	50%      { opacity: 0.95; }
}

.ta-chatbot__inputrow {
	display: flex;
	gap: 8px;
	padding: 10px;
	border-top: 1px solid #e3dfd4;
	background: #fff;
}

.ta-chatbot__input {
	flex: 1 1 auto;
	resize: none;
	padding: 9px 11px;
	border: 1px solid #cfcabd;
	border-radius: 8px;
	font: inherit;
	line-height: 1.4;
	max-height: 140px;
}

.ta-chatbot__input:focus {
	outline: none;
	border-color: #3f6f4e;
	box-shadow: 0 0 0 2px rgba(63, 111, 78, 0.2);
}

.ta-chatbot__send {
	flex: 0 0 auto;
	padding: 0 18px;
	border: none;
	border-radius: 8px;
	background: #3f6f4e;
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.ta-chatbot__send:disabled {
	opacity: 0.5;
	cursor: default;
}

@media (max-width: 600px) {
	.ta-chatbot { height: 70vh; }
}

/* ------------------------------------------------------------------ */
/* Non-AI search fallback (shown to visitors without chatbot access). */
/* ------------------------------------------------------------------ */
.ta-search {
	max-width: 640px;
	margin: 1em 0;
	font-size: 15px;
	line-height: 1.5;
	color: #1f1f1c;
}

.ta-search-form {
	display: flex;
	gap: 8px;
}

.ta-search-input {
	flex: 1 1 auto;
	padding: 10px 12px;
	border: 1px solid #cfcabd;
	border-radius: 8px;
	font: inherit;
	background: #fff;
}

.ta-search-input:focus {
	outline: none;
	border-color: #3f6f4e;
	box-shadow: 0 0 0 2px rgba(63, 111, 78, 0.2);
}

.ta-search-btn {
	flex: 0 0 auto;
	padding: 0 18px;
	border: none;
	border-radius: 8px;
	background: #3f6f4e;
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.ta-search-hint,
.ta-search-empty {
	color: #5a5a52;
	margin: 12px 2px 0;
}

.ta-search-results {
	margin-top: 8px;
}

.ta-search-intro {
	margin: 14px 2px 4px;
	color: #3a3a35;
	font-weight: 600;
}

.ta-search-section {
	margin-top: 18px;
}

.ta-search-heading {
	margin: 0 0 8px;
	padding-bottom: 4px;
	font-size: 14px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #3f6f4e;
	border-bottom: 1px solid #e3dfd4;
}

.ta-search-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ta-search-result {
	padding: 9px 0;
	border-bottom: 1px solid #efece3;
}

.ta-search-result:last-child {
	border-bottom: none;
}

.ta-search-result-title {
	font-weight: 600;
}

.ta-search-result-title a {
	color: #2c5d3c;
	text-decoration: none;
}

.ta-search-result-title a:hover {
	text-decoration: underline;
}

.ta-search-result-meta {
	font-size: 13px;
	color: #6b6b61;
	margin-top: 1px;
}

.ta-search-result-snippet {
	font-size: 14px;
	color: #3a3a35;
	margin-top: 3px;
}

/* ------------------------------------------------------------------ */
/* Transcript viewer ([trail_transcript]) — scan beside its AI text.  */
/* ------------------------------------------------------------------ */
.ta-transcript {
	margin: 1em 0;
	font-size: 15px;
	line-height: 1.6;
	color: #1f1f1c;
}

.ta-transcript-title {
	margin: 0 0 4px;
}

.ta-transcript-note {
	margin: 0 0 14px;
	font-size: 13px;
	font-style: italic;
	color: #6b6b61;
}

.ta-transcript-cols {
	display: flex;
	gap: 20px;
	align-items: flex-start;
}

.ta-transcript-scan {
	flex: 1 1 50%;
	position: sticky;
	top: 1em;
}

.ta-transcript-frame {
	width: 100%;
	height: 80vh;
	border: 1px solid #d6d2c8;
	border-radius: 8px;
	background: #fcfbf7;
}

.ta-transcript-open {
	margin: 6px 2px 0;
	font-size: 14px;
}

.ta-transcript-open a {
	color: #2c5d3c;
}

.ta-transcript-text {
	flex: 1 1 50%;
	max-height: 80vh;
	overflow-y: auto;
	padding: 4px 16px;
	border: 1px solid #e3dfd4;
	border-radius: 8px;
	background: #fff;
}

.ta-transcript-text p {
	margin: 0 0 0.8em;
}

.ta-transcript-h {
	margin: 1em 0 0.3em;
	font-size: 1.05em;
	color: #3f6f4e;
}

.ta-transcript-hr {
	border: none;
	border-top: 1px solid #e3dfd4;
	margin: 1em 0;
}

.ta-transcript-divider {
	flex: 0 0 12px;
	align-self: stretch;
	cursor: col-resize;
	position: relative;
	border-radius: 4px;
	background: #efece3;
}

.ta-transcript-divider:hover {
	background: #e3dfd4;
}

.ta-transcript-divider::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 3px;
	height: 42px;
	transform: translate(-50%, -50%);
	border-radius: 2px;
	background: #9a9588;
}

.ta-transcript-msg {
	margin: 1em 0;
	color: #5a5a52;
}

@media (max-width: 800px) {
	.ta-transcript-cols { flex-direction: column; }
	/* Reset any dragged widths and hide the divider in the stacked layout. */
	.ta-transcript-scan,
	.ta-transcript-text { flex: 1 1 auto !important; }
	.ta-transcript-scan { position: static; width: 100%; }
	.ta-transcript-frame { height: 60vh; }
	.ta-transcript-text { max-height: none; }
	.ta-transcript-divider { display: none; }
}
