/* Site-wide floating FAQ search widget. See inc/faq-widget.php for why
   this exists (it replaces Tawk). */

.tll-faq-widget {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 999999;
	font-family: inherit;
}

.tll-faq-widget-toggle {
	display: flex;
	align-items: center;
	gap: 8px;
	background: #1a2f6b;
	color: #fff;
	border: none;
	border-radius: 999px;
	padding: 12px 18px 12px 14px;
	box-shadow: 0 4px 16px rgba(15, 20, 61, 0.28);
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tll-faq-widget-toggle:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 20px rgba(15, 20, 61, 0.34);
}
.tll-faq-widget-toggle-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #22c55e;
	color: #0d1429;
	font-weight: 800;
	font-size: 14px;
	flex-shrink: 0;
}

.tll-faq-widget-panel {
	position: absolute;
	right: 0;
	bottom: 64px;
	width: 360px;
	max-width: calc(100vw - 40px);
	max-height: min(520px, calc(100vh - 120px));
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 12px 40px rgba(15, 20, 61, 0.24);
	overflow: hidden;
}

.tll-faq-widget-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	background: linear-gradient(135deg, #1a2f6b 0%, #0d1429 100%);
	color: #fff;
	padding: 16px;
	flex-shrink: 0;
}
.tll-faq-widget-header-title {
	display: block;
	font-weight: 700;
	font-size: 15.5px;
}
.tll-faq-widget-header-sub {
	display: block;
	font-weight: 400;
	font-size: 12px;
	color: rgba(255, 255, 255, 0.7);
	margin-top: 2px;
}
.tll-faq-widget-close {
	background: none;
	border: none;
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	opacity: 0.8;
	flex-shrink: 0;
}
.tll-faq-widget-close:hover { opacity: 1; }

#tll-faq-widget-search-view,
#tll-faq-widget-message-view {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
}

.tll-faq-widget-search-row {
	padding: 12px 14px;
	border-bottom: 1px solid #eceef4;
	flex-shrink: 0;
}
.tll-faq-widget-input {
	width: 100%;
	padding: 10px 12px;
	font-size: 14px;
	border: 1px solid #dbe0ee;
	border-radius: 8px;
	box-sizing: border-box;
}
.tll-faq-widget-input:focus {
	outline: none;
	border-color: #1a2f6b;
}

.tll-faq-widget-results {
	overflow-y: auto;
	flex: 1;
	padding: 4px 0;
}

.tll-faq-widget-result {
	border-bottom: 1px solid #f1f2f7;
}
.tll-faq-widget-result:last-child { border-bottom: none; }

.tll-faq-widget-question {
	width: 100%;
	text-align: left;
	background: none;
	border: none;
	padding: 12px 16px;
	font-size: 13.5px;
	font-weight: 600;
	color: #161b2e;
	cursor: pointer;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px;
}
.tll-faq-widget-question:hover { background: #f8f9ff; }
.tll-faq-widget-question-chevron {
	flex-shrink: 0;
	font-weight: 700;
	color: #1a2f6b;
}

.tll-faq-widget-answer {
	padding: 0 16px 14px;
	font-size: 13px;
	color: #5b6478;
	line-height: 1.5;
}

.tll-faq-widget-category {
	display: inline-block;
	font-size: 10.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #1a2f6b;
	background: #eef1f8;
	border-radius: 5px;
	padding: 2px 7px;
	margin: 0 16px 8px;
}

.tll-faq-widget-empty,
.tll-faq-widget-hint {
	padding: 24px 18px;
	text-align: center;
	color: #9aa1b4;
	font-size: 13px;
	line-height: 1.6;
}
.tll-faq-widget-empty a { color: #1a2f6b; font-weight: 600; }

.tll-faq-widget-footer {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 12px 16px;
	border-top: 1px solid #eceef4;
	flex-shrink: 0;
	background: #fafbff;
}
.tll-faq-widget-chat-btn {
	width: 100%;
	background: #22c55e;
	color: #0d1429;
	border: none;
	border-radius: 999px;
	padding: 10px 16px;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	white-space: nowrap;
}
.tll-faq-widget-chat-btn:hover { background: #16a34a; color: #fff; }

/* Message ("contact us") view */
.tll-faq-widget-message-form {
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	flex: 1;
	min-height: 0;
	overflow-y: auto;
}
.tll-faq-widget-back {
	align-self: flex-start;
	background: none;
	border: none;
	color: #1a2f6b;
	font-size: 12.5px;
	font-weight: 600;
	cursor: pointer;
	padding: 0;
	margin-bottom: 2px;
}
.tll-faq-widget-back:hover { text-decoration: underline; }
.tll-faq-widget-message-intro {
	font-size: 13px;
	color: #5b6478;
	margin: 0 0 4px;
	line-height: 1.5;
}
.tll-faq-widget-textarea {
	width: 100%;
	padding: 10px 12px;
	font-size: 14px;
	border: 1px solid #dbe0ee;
	border-radius: 8px;
	box-sizing: border-box;
	font-family: inherit;
	resize: vertical;
}
.tll-faq-widget-textarea:focus,
.tll-faq-widget-message-form .tll-faq-widget-input:focus {
	outline: none;
	border-color: #1a2f6b;
}
.tll-faq-widget-honeypot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	opacity: 0;
}
.tll-faq-widget-submit-btn {
	background: #1a2f6b;
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 11px 16px;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
}
.tll-faq-widget-submit-btn:hover { background: #142352; }
.tll-faq-widget-submit-btn:disabled { opacity: 0.6; cursor: default; }
.tll-faq-widget-message-status {
	font-size: 12.5px;
	line-height: 1.5;
	margin: 0;
	padding: 8px 10px;
	border-radius: 6px;
}
.tll-faq-widget-message-status-pending { color: #5b6478; }
.tll-faq-widget-message-status-success { color: #16a34a; background: #f0fdf4; }
.tll-faq-widget-message-status-error { color: #dc2626; background: #fef2f2; }

@media (max-width: 480px) {
	.tll-faq-widget { right: 12px; bottom: 12px; }
	.tll-faq-widget-panel { width: calc(100vw - 24px); bottom: 60px; }
	.tll-faq-widget-toggle-label { display: none; }
	.tll-faq-widget-toggle { padding: 12px; }
}
