.GroupAIInsightControl {
	position: relative;
}

.GroupAIInsightTrigger {
	align-items: center;
	background: transparent;
	border: 0;
	border-radius: 0;
	color: var(--TenantMainColor, #52708f);
	display: inline-flex;
	font-size: .875rem;
	font-weight: 600;
	gap: .4rem;
	line-height: 1.35;
	padding: 0;
	text-decoration: none;
}

.GroupAIInsightTrigger:hover,
.GroupAIInsightTrigger:focus {
	background: transparent;
	color: var(--TenantMainColor, #395775);
	outline: none;
	text-decoration: underline;
}

.GroupAIInsightTrigger:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

.GroupAIInsightDrawerContent {
	box-sizing: border-box;
	width: 100%;
	max-width: 56rem;
	margin: 0 auto;
	color: #344054;
	font-size: 1rem;
	padding: 1.5rem;
}

.GroupAIInsightDrawerIntro {
	display: flex;
	align-items: center;
	gap: .875rem;
	margin-bottom: 1.25rem;
	padding-bottom: 1.25rem;
	border-bottom: 1px solid #eaecf0;
}

.GroupAIInsightDrawerIntroIcon,
.GroupAIInsightDrawerSectionIcon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	color: var(--TenantMainColor, #52708f);
	background: #eef4fa;
}

.GroupAIInsightDrawerIntroIcon {
	width: 2.75rem;
	height: 2.75rem;
	border-radius: .75rem;
	font-size: 1.125rem;
}

.GroupAIInsightDrawerIntroCopy {
	min-width: 0;
}

.GroupAIInsightDrawerEyebrow {
	margin-bottom: .3rem;
	color: #344054;
	font-size: 1rem;
	font-weight: 600;
}

.GroupAIInsightDrawerMeta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: .25rem .65rem;
	color: #667085;
	font-size: .875rem;
}

.GroupAIInsightDrawerStatus {
	display: inline-flex;
	align-items: center;
	gap: .35rem;
}

.GroupAIInsightDrawerStats {
	background: #f8fafc;
	border: 1px solid #eaecf0;
	border-radius: .5rem;
	display: flex;
	margin: 0 0 1.25rem;
	overflow: hidden;
}

.GroupAIInsightDrawerStat {
	border-right: 1px solid #eaecf0;
	flex: 1 1 0;
	min-width: 0;
	padding: .75rem 1rem;
}

.GroupAIInsightDrawerStat:last-child {
	border-right: 0;
	padding-right: 1rem;
}

.GroupAIInsightDrawerStat--primary {
	background: #f1f6fb;
}

.GroupAIInsightDrawerStat dt {
	align-items: center;
	color: #667085;
	display: flex;
	font-size: .875rem;
	font-weight: 400;
	gap: .4rem;
}

.GroupAIInsightDrawerStat dd {
	color: #1d2939;
	font-size: 1.25rem;
	font-weight: 600;
	line-height: 1.3;
	margin: .25rem 0 0;
}

.GroupAIInsightDrawerLead {
	margin-bottom: .25rem;
	padding: 1.125rem;
	border: 1px solid #d9e4ef;
	border-left: 3px solid var(--TenantMainColor, #52708f);
	border-radius: .5rem;
	background: #f7f9fc;
}

.GroupAIInsightDrawerLead p,
.GroupAIInsightDrawerSection p {
	font-size: 1rem;
	line-height: 1.65;
	margin: 0;
}

.GroupAIInsightMarkdown > :first-child {
	margin-top: 0;
}

.GroupAIInsightMarkdown > :last-child {
	margin-bottom: 0;
}

.GroupAIInsightMarkdown p + p {
	margin-top: .75rem;
}

.GroupAIInsightMarkdown ul,
.GroupAIInsightMarkdown ol {
	margin: 0;
	padding-left: 1.35rem;
}

.GroupAIInsightMarkdown li {
	font-size: 1rem;
	line-height: 1.6;
	margin-bottom: .55rem;
}

.GroupAIInsightMarkdown li:last-child {
	margin-bottom: 0;
}

.GroupAIInsightMarkdown strong {
	color: #1d2939;
	font-weight: 600;
}

.GroupAIInsightMarkdown a {
	color: var(--TenantMainColor, #52708f);
	text-decoration: underline;
}

.GroupAIInsightDrawerSection {
	border-top: 1px solid #eaecf0;
	padding-top: 1.25rem;
	margin-top: 1.25rem;
}

.GroupAIInsightDrawerLead h3,
.GroupAIInsightDrawerSection h3 {
	display: flex;
	align-items: center;
	gap: .625rem;
	color: #1d2939;
	font-size: 1rem;
	font-weight: 600;
	margin: 0 0 .75rem;
}

.GroupAIInsightDrawerSectionIcon {
	width: 1.75rem;
	height: 1.75rem;
	border-radius: 50%;
	font-size: .75rem;
}

.GroupAIInsightDrawerActions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 1rem;
	margin-top: 1.25rem;
	padding-top: 1.25rem;
	border-top: 1px solid #eaecf0;
}

.GroupAIInsightDrawerFollow {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	flex: 0 0 auto;
}

@media (max-width: 768px) {
	#wolPushDrawerBody:has(> .GroupAIInsightDrawerContent) {
		padding: 0;
	}

	#wolPushDrawerBody > .GroupAIInsightDrawerContent > .wol-insight-scroll {
		padding: .5rem .25rem;
	}

	#wolPushDrawerBody > .GroupAIInsightDrawerContent > .wol-insight-composer {
		padding-left: .25rem;
		padding-right: .25rem;
	}

	#wolPushDrawerBody .GroupAIInsightDrawerLead,
	#wolPushDrawerBody .GroupAIInsightDrawerStat {
		padding: .75rem .625rem;
	}
}

@media (max-width: 480px) {
	.GroupAIInsightDrawerContent {
		padding: 1rem;
	}

	.GroupAIInsightDrawerActions {
		align-items: stretch;
		flex-direction: column;
	}

	.GroupAIInsightDrawerStats {
		flex-direction: column;
	}

	.GroupAIInsightDrawerStat {
		border-bottom: 1px solid #eaecf0;
		border-right: 0;
	}

	.GroupAIInsightDrawerStat:last-child {
		border-bottom: 0;
	}

	.GroupAIInsightDrawerFollow {
		justify-content: center;
	}
}

.GroupAIInsightQuestion .input-pill-wrapper {
    align-items: center;
    background: var(--wol-chat-bg-input, #fff);
    border: 1px solid var(--wol-chat-border-light, #e5e7eb);
    border-radius: 24px;
    box-shadow: 0 1px 2px #0000000f, 0 4px 12px #00000014;
    display: flex;
    min-height: 48px;
    min-width: 0;
    padding: 4px 16px;
    transition: box-shadow .2s, border-color .2s;
    width: 100%;
}
.GroupAIInsightQuestion .input-pill-wrapper:focus-within {
    background: #fff;
    border-color: var(--wol-chat-text-secondary, #6b7280);
    box-shadow: 0 1px 2px #0000000f, 0 6px 16px #0000001a, 0 0 0 3px #0000000f;
}
.GroupAIInsightQuestion .chat-textarea {
    background: transparent;
    border: 0;
    flex: 1;
    font-family: inherit;
    font-size: 1rem;
    line-height: 24px;
    max-height: 134px;
    min-height: 34px;
    min-width: 0;
    outline: 0;
    overflow-y: hidden;
    padding: 7px 0;
    resize: none;
}
.GroupAIInsightQuestion .chat-textarea::placeholder {
    color: #999;
}
.GroupAIInsightQuestion .chat-textarea:focus {
    border: 0;
    box-shadow: none;
}
.GroupAIInsightQuestion .chat-textarea:disabled {
    background: transparent;
    cursor: not-allowed;
    opacity: .6;
}
.GroupAIInsightQuestion .send-icon-button {
    align-items: center;
    background: var(--wol-chat-button-bg, #4caf50);
    border: 0;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    flex: 0 0 34px;
    height: 34px;
    justify-content: center;
    padding: 0;
    transition: background .2s, opacity .2s, transform .1s;
    width: 34px;
}
.GroupAIInsightQuestion .send-icon-button:hover:not(:disabled) {
    background: var(--wol-chat-button-hover, #43a047);
    transform: scale(1.05);
}
.GroupAIInsightQuestion .send-icon-button:active:not(:disabled) {
    transform: scale(.95);
}
.GroupAIInsightQuestion .send-icon-button:disabled {
    background: var(--wol-chat-disabled-bg, #ccc);
    cursor: not-allowed;
    opacity: .6;
}
.GroupAIInsightQuestion .send-icon-button:focus-visible {
    outline: 2px solid var(--wol-chat-button-bg, #4caf50);
    outline-offset: 2px;
}

.GroupAIInsightQuestion .input-pill-wrapper { box-sizing: border-box; gap: .5rem; }
.GroupAIInsightQuestion .chat-textarea {
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    font-weight: 400;
    font-style: normal;
}
.GroupAIInsightQuestion .chat-textarea::placeholder { font-weight: 400; font-style: normal; }
.GroupAIInsightQuestion [role="status"] { margin: .5rem 0 0; font-size: .75rem; color: #6c7a82; }

/* Group follow-ups remain alongside the saved insight, like post analysis. */
.GroupAIInsightConversation { display: flex; flex-direction: column; gap: 1.25rem; }
.GroupAIInsightConversation:not(:empty) { margin-top: 1.5rem; }
.GroupAIInsightMessage { display: flex; align-items: flex-start; gap: .625rem; min-width: 0; }
.GroupAIInsightMessage .message-content {
    min-width: 0; overflow-wrap: anywhere; font-size: 1rem; line-height: 1.6;
    color: var(--wol-chat-text-primary, #344054);
}
.GroupAIInsightMessage.user { justify-content: flex-end; }
.GroupAIInsightMessage.user .message-content {
    max-width: 85%; white-space: pre-wrap; padding: .75rem 1rem;
    background: var(--wol-chat-user-bg, #f4f4f4);
    border-radius: 1rem 1rem .25rem 1rem;
}
.GroupAIInsightMessage.assistant .message-content { flex: 1; }
.GroupAIInsightMessage .message-avatar { width: 2rem; height: 2rem; flex: 0 0 2rem; object-fit: cover; border-radius: 50%; }
.GroupAIInsightMessage .message-content p { margin: 0 0 .75rem; font-size: 1rem; }
.GroupAIInsightMessage .message-content p:last-child { margin-bottom: 0; }
.GroupAIInsightMessage[aria-busy="true"] { opacity: .7; }

.GroupAIInsightFollowUpIntro { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid #eaecf0; font-size: 1rem; }
.GroupAIInsightFollowUpIntro p { margin: .25rem 0 0; color: #6c7a82; font-size: 1rem; }
.GroupAIInsightMessage .message-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.GroupAIInsightMessage.user { flex-direction: row-reverse; }
.GroupAIInsightMessage.user .message-content { width: 85%; }
.GroupAIInsightMessage .message-content { padding: .75rem 1rem; line-height: 1.5; border-radius: .75rem; }
.GroupAIInsightMessage.assistant .message-content { border-bottom-left-radius: .25rem; background: var(--wol-chat-bg-main, #fff); box-shadow: 0 1px 3px #0000001a; }
.GroupAIInsightMessage .message-actions { display: flex; margin-top: .5rem; gap: .25rem; }
.GroupAIInsightMessage .message-action { background: transparent; border: 0; border-radius: .375rem; padding: .25rem .5rem; font: inherit; font-size: .75rem; color: var(--wol-chat-text-secondary, #6b7280); cursor: pointer; }
.GroupAIInsightMessage .message-action:hover { background: var(--wol-chat-bg-input, #f5f5f5); }
.GroupAIInsightMessage .message-action:focus-visible { outline: 2px solid currentColor; }
.GroupAIInsightThinking { display: inline-flex; align-items: center; gap: .25rem; height: 1.5rem; }
.GroupAIInsightThinking > span { width: .25rem; height: .25rem; border-radius: 50%; background: #6b7280; animation: groupAIThinking .6s infinite; }
@keyframes groupAIThinking { 0%, 100% { transform: translateY(0); opacity: 1; } 50% { transform: translateY(-.375rem); opacity: .5; } }
.GroupAIInsightCursor { display: inline-block; width: 2px; height: 1em; margin-left: 3px; background: currentColor; vertical-align: -.12em; animation: groupAICursor 1s steps(2, start) infinite; }
@keyframes groupAICursor { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .GroupAIInsightThinking > span, .GroupAIInsightCursor { animation: none; } }
