/* ============================================================
   OA FAQ Assistant — Stylesheet
   Base chatbot chrome + FAQ question chips
   ============================================================ */

.oa-chatbot-wrap {
	display: flex;
	flex-direction: column;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
		'Helvetica Neue', Arial, sans-serif;
	background: #fff;
}

/* ── Header ─────────────────────────────────────────────── */

.oa-chatbot-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 20px;
	background: #1a1a2e;
	color: #fff;
	flex-shrink: 0;
}

.oa-chatbot-title {
	font-weight: 600;
	font-size: 15px;
	letter-spacing: 0.15px;
}

.oa-chatbot-status {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	opacity: 0.85;
}

.oa-status-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #4ade80;
	box-shadow: 0 0 6px rgba(74, 222, 128, 0.7);
	flex-shrink: 0;
}

/* ── FAQ section ─────────────────────────────────────────── */

.oa-faq-section {
	padding: 14px 16px 12px;
	background: #f4f6fb;
	border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.oa-faq-label {
	margin: 0 0 10px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #6b7280;
}

.oa-faq-chips {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
}

.oa-faq-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	background: #ffffff;
	color: #1a1a2e;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-size: 14px;
	font-family: inherit;
	line-height: 1.45;
	text-align: left;
	cursor: pointer;
	white-space: normal;
	transition: background 0.15s, color 0.15s, border-color 0.15s,
	            box-shadow 0.15s, transform 0.1s;
}

.oa-faq-chip::after {
	content: '\2192';
	flex-shrink: 0;
	font-size: 13px;
	opacity: 0.4;
	margin-left: 4px;
	transition: opacity 0.15s, transform 0.15s;
}

.oa-faq-chip:hover {
	background: #1a1a2e;
	color: #ffffff;
	border-color: #1a1a2e;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
	transform: translateY(-1px);
}

.oa-faq-chip:hover::after {
	opacity: 1;
	transform: translateX(3px);
}

.oa-faq-chip:active {
	transform: translateY(0);
	box-shadow: none;
}

.oa-faq-chip--active {
	background: #1a1a2e;
	color: #ffffff;
	border-color: #1a1a2e;
}

.oa-faq-chip--active::after {
	opacity: 1;
}

.oa-faq-chip:disabled {
	opacity: 0.5;
	cursor: default;
	transform: none;
	box-shadow: none;
}

/* ── Messages area ───────────────────────────────────────── */

.oa-chatbot-messages {
	flex-shrink: 0;        /* respect the explicit height — don't stretch to fill parent */
	overflow-y: auto;
	padding: 20px 16px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	background: #fafafa;
	height: 340px;
	scroll-behavior: smooth;
}

.oa-chatbot-message {
	display: flex;
	align-items: flex-end;
}

.oa-chatbot-message.user {
	justify-content: flex-end;
}

.oa-chatbot-message.assistant,
.oa-chatbot-message.error {
	justify-content: flex-start;
}

.oa-bubble {
	max-width: 78%;
	padding: 10px 14px;
	border-radius: 16px;
	font-size: 14px;
	line-height: 1.6;
	word-break: break-word;
}

.oa-bubble strong { font-weight: 600; }
.oa-bubble em     { font-style: italic; }

.oa-bubble .oa-chat-link {
	color: #1a1a2e;
	text-decoration: underline;
	text-underline-offset: 2px;
	word-break: break-all;
}
.oa-bubble .oa-chat-link:hover { opacity: 0.7; }

.oa-bubble .oa-chat-btn {
	display: inline-block;
	background: #1a1a2e;
	color: #fff !important;
	padding: 8px 18px;
	border-radius: 6px;
	text-decoration: none;
	font-size: 13px;
	font-weight: 600;
	margin: 6px 0 2px;
	transition: opacity 0.2s, transform 0.15s;
	line-height: 1.4;
}
.oa-bubble .oa-chat-btn:hover  { opacity: 0.85; transform: translateY(-1px); }
.oa-bubble .oa-chat-btn:active { transform: translateY(0); }

.oa-bubble code {
	font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
	font-size: 12px;
	background: rgba(0,0,0,0.08);
	padding: 1px 5px;
	border-radius: 4px;
}

.oa-bubble pre {
	background: rgba(0,0,0,0.07);
	border-radius: 6px;
	padding: 10px 12px;
	overflow-x: auto;
	margin: 6px 0;
}

.oa-bubble pre code { background: none; padding: 0; font-size: 12px; }

.oa-bubble ul { margin: 4px 0 4px 18px; padding: 0; }
.oa-bubble li { margin: 2px 0; }

.oa-chatbot-message.user .oa-bubble {
	background: #1a1a2e;
	color: #fff;
	border-bottom-right-radius: 4px;
}

.oa-chatbot-message.assistant .oa-bubble {
	background: #f0f0f0;
	color: #1a1a1a;
	border-bottom-left-radius: 4px;
}

.oa-chatbot-message.error .oa-bubble {
	background: #fee2e2;
	color: #991b1b;
	border-bottom-left-radius: 4px;
}

/* ── Typing indicator ────────────────────────────────────── */

.oa-chatbot-typing .oa-bubble {
	padding: 12px 18px;
	background: #f0f0f0;
}

.oa-typing-dots {
	display: flex;
	gap: 5px;
	align-items: center;
}

.oa-typing-dots span {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #999;
	animation: oa-bounce 1.2s infinite ease-in-out both;
}

.oa-typing-dots span:nth-child(1) { animation-delay: 0s; }
.oa-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.oa-typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes oa-bounce {
	0%, 80%, 100% { transform: translateY(0);    opacity: 0.4; }
	40%            { transform: translateY(-6px); opacity: 1;   }
}

/* ── Input area ─────────────────────────────────────────── */

.oa-chatbot-form {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	padding: 12px 16px;
	border-top: 1px solid #e8e8e8;
	background: #fff;
	flex-shrink: 0;
}

.oa-chatbot-input {
	flex: 1;
	border: 1px solid #e0e0e0;
	border-radius: 22px;
	padding: 10px 16px;
	font-size: 14px;
	font-family: inherit;
	resize: none;
	outline: none;
	line-height: 1.4;
	max-height: 120px;
	overflow-y: auto;
	transition: border-color 0.2s;
	background: transparent;
	color: inherit;
}

.oa-chatbot-input:focus       { border-color: #1a1a2e; }
.oa-chatbot-input::placeholder { color: #aaa; }

.oa-chatbot-send {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: none;
	background: #1a1a2e;
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: opacity 0.2s, transform 0.15s;
	padding: 0;
}

.oa-chatbot-send:hover    { opacity: 0.85; transform: scale(1.06); }
.oa-chatbot-send:active   { transform: scale(0.96); }
.oa-chatbot-send:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }

.oa-chatbot-send svg {
	width: 16px;
	height: 16px;
	display: block;
}
