/* =============================================================================
   Sidebar CSS — WeAreInvictus210 (Kick-style left sidebar)
   ============================================================================= */

/* ── CSS Custom Properties ─────────────────────────────────────────────────── */
:root {
	--inv-sidebar-w: 64px;
}

body.inv-sidebar-open {
	--inv-sidebar-w: 320px;
}

/* ── Sidebar container ─────────────────────────────────────────────────────── */
.inv-sidebar {
	position: fixed;
	top: 64px;
	left: 0;
	bottom: 0;
	z-index: 40;
	background: rgba(8, 13, 26, 0.97);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-right: 1px solid rgba(255, 255, 255, 0.05);
	width: var(--inv-sidebar-w);
	transition: width 0.28s cubic-bezier(0.4, 0, 0.2, 1);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

/* When expanded, allow popups (mention list, cmd palette) to overflow */
.inv-sidebar--expanded {
	overflow: visible;
}

/* ── Body & header offset ──────────────────────────────────────────────────── */
body {
	padding-left: var(--inv-sidebar-w);
	transition: padding-left 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

#invictus-site-header {
	left: var(--inv-sidebar-w);
	transition: left 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Toggle button ─────────────────────────────────────────────────────────── */
.inv-sidebar__toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 48px;
	background: none;
	border: none;
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
	color: rgba(255, 255, 255, 0.5);
	cursor: pointer;
	flex-shrink: 0;
	transition: color 0.15s, background 0.15s;
}

.inv-sidebar__toggle:hover {
	color: #fff;
	background: rgba(255, 255, 255, 0.04);
}

.inv-sidebar__toggle svg {
	width: 20px;
	height: 20px;
}

/* ── Collapsed: Avatar stack ───────────────────────────────────────────────── */
.inv-sidebar__avatars {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 12px 0;
	overflow-y: auto;
	flex: 1;
}

.inv-sidebar__avatar-link {
	display: block;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	overflow: visible;
	position: relative;
	transition: transform 0.15s;
	text-decoration: none;
}

.inv-sidebar__avatar-link:hover {
	transform: scale(1.12);
}

/* Hide avatars when expanded */
.inv-sidebar--expanded .inv-sidebar__avatars {
	display: none;
}

/* ── Expanded content ──────────────────────────────────────────────────────── */
.inv-sidebar__expanded {
	display: none;
	flex-direction: column;
	flex: 1;
	min-height: 0;
}

.inv-sidebar--expanded .inv-sidebar__expanded {
	display: flex;
}

/* ── Chat slot (receives chat widget children) ─────────────────────────────── */
.inv-sidebar__chat-slot {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-height: 0;
	position: relative;
}

/* When chat is inside sidebar, override its fixed positioning */
.inv-sidebar__chat-slot .inv-chat-widget {
	position: static !important;
	width: 100% !important;
	height: auto !important;
	max-height: none !important;
	border-radius: 0 !important;
	border: none !important;
	box-shadow: none !important;
	animation: none !important;
	display: flex !important;
	flex: 1;
	min-height: 0;
}

.inv-sidebar__chat-slot .inv-chat-widget__header {
	border-radius: 0;
}

/* Messages area scrolls independently */
.inv-sidebar__chat-slot .inv-chat-widget__messages {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
}

/* Input bar allows mention list to overflow above */
.inv-sidebar__chat-slot .inv-chat-widget__input {
	position: relative;
	overflow: visible;
}

/* ── Quick nav ─────────────────────────────────────────────────────────────── */
.inv-sidebar__quick-nav {
	flex-shrink: 0;
	border-top: 1px solid rgba(255, 255, 255, 0.06);
	padding: 8px;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.inv-sidebar__quick-link {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 12px;
	font-size: 0.75rem;
	font-weight: 500;
	color: #c8cce8;
	text-decoration: none;
	border-radius: 6px;
	transition: background 0.12s, color 0.12s;
	white-space: nowrap;
}

.inv-sidebar__quick-link:hover {
	background: rgba(255, 255, 255, 0.06);
	color: #fff;
}

.inv-sidebar__quick-link svg {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	opacity: 0.6;
}

/* ── Mobile: hide everything ───────────────────────────────────────────────── */
@media (max-width: 767px) {
	.inv-sidebar {
		display: none !important;
	}

	body,
	body.inv-sidebar-open {
		--inv-sidebar-w: 0px !important;
		padding-left: 0 !important;
	}

	#invictus-site-header {
		left: 0 !important;
	}
}
