/* =============================================================================
   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: var(--inv-header-h, 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;
}

/* Announcement wrap needs visible overflow for popover */
.inv-sidebar__ann-wrap {
	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), padding-right 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

#invictus-site-header {
	left: 0;
	right: 0;
}

/* ── 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;
	scrollbar-width: thin;
	scrollbar-color: rgba(255,255,255,0.06) transparent;
}

.inv-sidebar__avatars::-webkit-scrollbar {
	width: 3px;
}

.inv-sidebar__avatars::-webkit-scrollbar-track {
	background: transparent;
}

.inv-sidebar__avatars::-webkit-scrollbar-thumb {
	background: rgba(255,255,255,0.08);
	border-radius: 2px;
}

.inv-sidebar__avatars::-webkit-scrollbar-thumb:hover {
	background: rgba(255,255,255,0.15);
}

.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;
}

/* =============================================================================
   Logged-in sidebar: full navigation (Twitter/X style)
   ============================================================================= */

/* Default expanded for logged-in */
body.inv-logged-in {
	--inv-sidebar-w: 320px;
}

body.inv-logged-in.inv-sidebar-collapsed {
	--inv-sidebar-w: 64px;
}

/* ── Profile card ── */
.inv-sidebar__profile {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	text-decoration: none;
	flex-shrink: 0;
	transition: background 0.12s;
}

.inv-sidebar__profile:hover {
	background: rgba(255, 255, 255, 0.04);
}

.inv-sidebar__profile-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
	background: #1a2235;
}

.inv-sidebar__profile-info {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.inv-sidebar__profile-name {
	font-size: 0.85rem;
	font-weight: 600;
	color: #fff;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.inv-sidebar__profile-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.68rem;
	color: #6b7494;
}

.inv-sidebar__profile-level {
	font-weight: 600;
	text-transform: capitalize;
}

.inv-sidebar__profile-coins {
	display: inline-flex;
	align-items: center;
	gap: 3px;
}

/* ── Full profile card (expanded left sidebar) ── */
.inv-sidebar__profile-full {
	padding-bottom: 8px;
	flex-shrink: 0;
}

.inv-sidebar__profile-avatar-wrap .inv-avatar-wrap {
	width: 40px !important;
	height: 40px !important;
}

/* Avatar hover overlay for edit */
.inv-sidebar__profile-avatar-wrap {
	position: relative;
	flex-shrink: 0;
}

.inv-sidebar__avatar-overlay {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.6);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.2s;
	z-index: 2;
}

.inv-sidebar__avatar-overlay svg {
	width: 20px;
	height: 20px;
	color: #fff;
}

.inv-sidebar__profile-avatar-wrap:hover .inv-sidebar__avatar-overlay {
	opacity: 1;
}

/* Social stat text */
.inv-sidebar__social-stat {
	display: inline;
}

.inv-sidebar__social-stat strong {
	color: #c8cce8;
	font-weight: 600;
}

/* Social buttons (followers/following) */
.inv-sidebar__social-btn {
	background: none;
	border: none;
	padding: 0;
	margin: 0;
	font: inherit;
	color: inherit;
	cursor: pointer;
	transition: color 0.12s;
}

.inv-sidebar__social-btn:hover {
	color: #f59e0b;
}

.inv-sidebar__social-btn strong {
	color: #c8cce8;
	font-weight: 600;
}

.inv-sidebar__social-btn:hover strong {
	color: #f59e0b;
}


.inv-sidebar__avatar-home-link {
	text-decoration: none;
	display: block;
}

.inv-sidebar__profile-badge {
	display: inline-flex;
	align-items: center;
	padding: 1px 6px;
	border-radius: 9999px;
	font-family: 'Rajdhani', sans-serif;
	font-size: 0.55rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	border: 1px solid currentColor;
	width: fit-content;
}

.inv-sidebar__profile-details {
	padding: 0 14px;
}

.inv-sidebar__profile-since {
	font-family: 'Inter', sans-serif;
	font-size: 0.58rem;
	color: #3d4560;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin: 4px 0 0;
}

.inv-sidebar__profile-kingdom {
	display: flex;
	align-items: center;
	gap: 5px;
	font-family: 'Inter', sans-serif;
	font-size: 0.7rem;
	color: #6b7494;
	margin: 2px 0 0;
}

.inv-sidebar__profile-kingdom a {
	color: #f59e0b;
	text-decoration: none;
	font-weight: 600;
}

.inv-sidebar__profile-role {
	font-family: 'Rajdhani', sans-serif;
	font-size: 0.6rem;
	font-weight: 700;
	border: 1px solid currentColor;
	padding: 0 5px;
	border-radius: 9999px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.inv-sidebar__profile-social {
	display: flex;
	align-items: center;
	gap: 4px;
	flex-wrap: wrap;
	font-family: 'Inter', sans-serif;
	font-size: 0.68rem;
	color: #8b93b0;
	margin-top: 6px;
}

.inv-sidebar__profile-social strong {
	color: #c8cce8;
	font-weight: 600;
}

.inv-sidebar__profile-sep {
	color: #3d4560;
}

.inv-sidebar__profile-stamps {
	display: flex;
	gap: 6px;
	font-family: 'Inter', sans-serif;
	font-size: 0.68rem;
	color: #8b93b0;
	margin-top: 4px;
}

.inv-sidebar__profile-stamp {
	display: inline-flex;
	align-items: center;
	gap: 2px;
}

/* ── Nav container ── */
.inv-sidebar__nav {
	flex: 1;
	display: flex;
	flex-direction: column;
	padding: 8px;
	gap: 2px;
	overflow-y: auto;
	min-height: 0;
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 255, 255, 0.06) transparent;
}

.inv-sidebar__nav::-webkit-scrollbar {
	width: 3px;
}

.inv-sidebar__nav::-webkit-scrollbar-track {
	background: transparent;
}

.inv-sidebar__nav::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.06);
	border-radius: 3px;
}

.inv-sidebar__nav::-webkit-scrollbar-thumb:hover {
	background: rgba(245, 158, 11, 0.2);
}

/* ── Nav section headers ── */
.inv-sidebar__nav-section {
	font-size: 0.6rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	color: #4b5563;
	padding: 12px 12px 4px;
}

.inv-sidebar__nav-section--stellar {
	color: rgba(59, 130, 246, 0.5);
}

.inv-sidebar__nav-section--members {
	color: rgba(245, 158, 11, 0.5);
}

/* ── Create Lineup CTA button ── */
.inv-sidebar__create-btn {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 8px 8px 4px;
	padding: 9px 14px;
	font-family: 'Rajdhani', sans-serif;
	font-size: 0.82rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #080d1a;
	background: linear-gradient(135deg, #f59e0b, #fbbf24);
	border-radius: 10px;
	text-decoration: none;
	transition: transform 0.15s, box-shadow 0.15s;
	white-space: nowrap;
}

.inv-sidebar__create-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
}

.inv-sidebar__create-btn svg {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}

body.inv-logged-in.inv-sidebar-collapsed .inv-sidebar__create-btn span {
	display: none;
}

body.inv-logged-in.inv-sidebar-collapsed .inv-sidebar__create-btn {
	justify-content: center;
	margin: 8px 12px 4px;
	padding: 9px 0;
}

/* ── Heroes mini-banner ── */
.inv-sidebar__heroes-banner {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 8px 8px 4px;
	padding: 8px 10px;
	border-radius: 10px;
	background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(59, 130, 246, 0.08) 100%);
	text-decoration: none;
	transition: background 0.15s;
	overflow: hidden;
}

.inv-sidebar__heroes-banner:hover {
	background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(59, 130, 246, 0.14) 100%);
}

.inv-sidebar__heroes-banner-img {
	width: 36px;
	height: 36px;
	border-radius: 8px;
	object-fit: cover;
	flex-shrink: 0;
}

.inv-sidebar__heroes-banner-text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.inv-sidebar__heroes-banner-title {
	font-family: 'Rajdhani', sans-serif;
	font-size: 0.75rem;
	font-weight: 700;
	color: #f59e0b;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	line-height: 1.2;
}

.inv-sidebar__heroes-banner-sub {
	font-size: 0.6rem;
	color: #6b7494;
	line-height: 1.3;
}

.inv-sidebar__heroes-banner-arrow {
	width: 16px;
	height: 16px;
	color: #6b7494;
	flex-shrink: 0;
	margin-left: auto;
	transition: color 0.15s;
}

.inv-sidebar__heroes-banner:hover .inv-sidebar__heroes-banner-arrow {
	color: #f59e0b;
}

body.inv-logged-in.inv-sidebar-collapsed .inv-sidebar__heroes-banner {
	padding: 6px;
	justify-content: center;
}

body.inv-logged-in.inv-sidebar-collapsed .inv-sidebar__heroes-banner-text,
body.inv-logged-in.inv-sidebar-collapsed .inv-sidebar__heroes-banner-arrow {
	display: none;
}

body.inv-logged-in.inv-sidebar-collapsed .inv-sidebar__heroes-banner-img {
	width: 28px;
	height: 28px;
}

/* ── Store preview ── */
.inv-sidebar__store {
	margin: 4px 8px 8px;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.03);
	overflow: hidden;
}

.inv-sidebar__store-header {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 8px 10px;
	text-decoration: none;
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.inv-sidebar__store-title {
	font-family: 'Rajdhani', sans-serif;
	font-size: 0.7rem;
	font-weight: 700;
	color: #c8cce8;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.inv-sidebar__store-new {
	font-family: 'Rajdhani', sans-serif;
	font-size: 0.5rem;
	font-weight: 700;
	text-transform: uppercase;
	color: #fff;
	background: rgba(244, 114, 182, 0.6);
	padding: 1px 5px;
	border-radius: 4px;
	margin-left: auto;
}

.inv-sidebar__store-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 10px;
	text-decoration: none;
	transition: background 0.15s;
}

.inv-sidebar__store-item:hover {
	background: rgba(255, 255, 255, 0.05);
}

.inv-sidebar__store-item-img {
	width: 28px;
	height: 28px;
	border-radius: 6px;
	object-fit: cover;
	flex-shrink: 0;
	background: rgba(255, 255, 255, 0.05);
}

.inv-sidebar__store-item-icon {
	width: 28px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.05);
	font-size: 0.8rem;
	flex-shrink: 0;
}

.inv-sidebar__store-item-name {
	font-size: 0.7rem;
	color: #c8cce8;
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.inv-sidebar__store-item-price {
	font-size: 0.65rem;
	font-weight: 700;
	color: #f59e0b;
	white-space: nowrap;
	flex-shrink: 0;
}

body.inv-logged-in.inv-sidebar-collapsed .inv-sidebar__store {
	display: none;
}

/* ── Nav divider ── */
.inv-sidebar__nav-divider {
	height: 1px;
	background: rgba(255, 255, 255, 0.05);
	margin: 4px 8px;
}

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

button.inv-sidebar__nav-link {
	border: none;
	background: none;
	cursor: pointer;
	width: 100%;
	text-align: left;
}

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

.inv-sidebar__nav-link.is-active {
	background: rgba(245, 158, 11, 0.12);
	color: #f59e0b;
}

.inv-sidebar__nav-link.is-active svg {
	color: #f59e0b;
}

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

.inv-sidebar__nav-link:hover svg {
	opacity: 1;
}

.inv-sidebar__nav-link.is-active svg {
	opacity: 1;
}

.inv-sidebar__nav-link--pets {
	color: #f472b6;
}

.inv-sidebar__nav-link--pets:hover {
	color: #fb7bb8;
	background: rgba(244, 114, 182, 0.08);
}

.inv-sidebar__nav-link--pets.is-active {
	background: rgba(244, 114, 182, 0.12);
	color: #f472b6;
}

.inv-sidebar__pets-emoji {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

.inv-sidebar__pets-egg {
	font-size: 1.1rem;
	font-style: normal;
	line-height: 1;
	flex-shrink: 0;
}

.inv-sidebar__pets-new {
	font-family: 'Rajdhani', sans-serif;
	font-size: 0.55rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #fff;
	background: rgba(244, 114, 182, 0.6);
	padding: 1px 6px;
	border-radius: 4px;
	margin-left: auto;
}

body.inv-logged-in.inv-sidebar-collapsed .inv-sidebar__pets-new,
body.inv-logged-in.inv-sidebar-collapsed .inv-sidebar__nav-soon,
body.inv-logged-in.inv-sidebar-collapsed .inv-new-badge {
	display: none;
}

.inv-new-badge {
	font-family: 'Rajdhani', sans-serif;
	font-size: 0.55rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #000;
	background: linear-gradient(135deg, #f59e0b, #f97316);
	padding: 1px 6px;
	border-radius: 4px;
	margin-left: auto;
	animation: inv-new-pulse 2s ease-in-out infinite;
}

@keyframes inv-new-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.7; }
}

.inv-sidebar__nav-soon {
	font-family: 'Rajdhani', sans-serif;
	font-size: 0.5rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #6b7494;
	background: rgba(107, 116, 148, 0.15);
	padding: 1px 5px;
	border-radius: 4px;
	margin-left: auto;
}

.inv-sidebar__nav-badge {
	font-family: 'Rajdhani', sans-serif;
	font-size: 0.6rem;
	font-weight: 700;
	min-width: 18px;
	height: 18px;
	line-height: 18px;
	text-align: center;
	color: #fff;
	background: #ef4444;
	border-radius: 9999px;
	padding: 0 5px;
	margin-left: auto;
}

body.inv-logged-in.inv-sidebar-collapsed .inv-sidebar__nav-badge {
	display: none;
}

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

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

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

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

/* ── Collapsed state overrides (logged-in) ── */
body.inv-logged-in.inv-sidebar-collapsed .inv-sidebar__profile-info,
body.inv-logged-in.inv-sidebar-collapsed .inv-sidebar__profile-details,
body.inv-logged-in.inv-sidebar-collapsed .inv-sidebar__nav-section,
body.inv-logged-in.inv-sidebar-collapsed .inv-sidebar__nav-link span,
body.inv-logged-in.inv-sidebar-collapsed .inv-sidebar__footer-link span {
	display: none;
}

body.inv-logged-in.inv-sidebar-collapsed .inv-sidebar__profile {
	justify-content: center;
	padding: 12px 0;
}

body.inv-logged-in.inv-sidebar-collapsed .inv-sidebar__profile-avatar {
	width: 32px;
	height: 32px;
}

body.inv-logged-in.inv-sidebar-collapsed .inv-sidebar__profile-avatar-wrap .inv-avatar-wrap {
	width: 32px !important;
	height: 32px !important;
}

body.inv-logged-in.inv-sidebar-collapsed .inv-sidebar__nav-link,
body.inv-logged-in.inv-sidebar-collapsed .inv-sidebar__footer-link {
	justify-content: center;
	padding: 10px 0;
}

body.inv-logged-in.inv-sidebar-collapsed .inv-sidebar__nav-link svg {
	width: 20px;
	height: 20px;
}

body.inv-logged-in.inv-sidebar-collapsed .inv-sidebar__nav-divider {
	margin: 4px 12px;
}

/* ── View public profile link ── */
.inv-sidebar__public-link {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 4px 14px 0;
	font-family: 'Inter', sans-serif;
	font-size: 0.6rem;
	color: #3d4560;
	text-decoration: none;
	transition: color 0.12s;
}

.inv-sidebar__public-link:hover {
	color: #8b93b0;
}

.inv-sidebar__public-link svg {
	width: 12px;
	height: 12px;
	flex-shrink: 0;
}

body.inv-logged-in.inv-sidebar-collapsed .inv-sidebar__public-link {
	display: none;
}

/* ── Pet widget (between profile & nav) ── */
.inv-sidebar-pet {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 14px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
	text-decoration: none;
	flex-shrink: 0;
	transition: background 0.12s;
}

.inv-sidebar-pet:hover {
	background: rgba(255, 255, 255, 0.04);
}

.inv-sidebar-pet__info {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.inv-sidebar-pet__name {
	font-family: 'Inter', sans-serif;
	font-size: 0.75rem;
	font-weight: 600;
	color: #c8cce8;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.inv-sidebar-pet__streak {
	font-family: 'Inter', sans-serif;
	font-size: 0.68rem;
	color: #f59e0b;
	font-weight: 600;
}

/* Streak tiers — escalating visual intensity */
.inv-sidebar-pet__streak--warm {
	color: #f59e0b;
}

.inv-sidebar-pet__streak--hot {
	color: #f97316;
}

.inv-sidebar-pet__streak--epic {
	color: #ef4444;
	text-shadow: 0 0 6px rgba(239, 68, 68, 0.4);
}

.inv-sidebar-pet__streak--legendary {
	color: #a855f7;
	text-shadow: 0 0 8px rgba(168, 85, 247, 0.5);
	animation: inv-streak-glow 2s ease-in-out infinite;
}

@keyframes inv-streak-glow {
	0%, 100% { text-shadow: 0 0 8px rgba(168, 85, 247, 0.5); }
	50%      { text-shadow: 0 0 14px rgba(168, 85, 247, 0.8), 0 0 4px rgba(245, 158, 11, 0.3); }
}

/* Pet: collapsed = sprite + streak only, centered */
body.inv-logged-in.inv-sidebar-collapsed .inv-sidebar-pet {
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 2px;
	padding: 8px 0;
}

body.inv-logged-in.inv-sidebar-collapsed .inv-sidebar-pet__name {
	display: none;
}

body.inv-logged-in.inv-sidebar-collapsed .inv-sidebar-pet__streak {
	font-size: 0.6rem;
}

/* Hide logged-out content when logged in */
body.inv-logged-in .inv-sidebar__avatars,
body.inv-logged-in .inv-sidebar-pet-collapsed {
	display: none !important;
}

/* Hide logged-in nav when not logged in */
body:not(.inv-logged-in) .inv-sidebar__profile,
body:not(.inv-logged-in) .inv-sidebar__nav,
body:not(.inv-logged-in) .inv-sidebar__footer {
	display: none !important;
}

/* ── Logged-in: fluid content between sidebars ────────────────────────────── */
body.inv-logged-in .max-w-\[1200px\] {
	max-width: 100%;
}

/* =============================================================================
   Right sidebar — global for logged-in users
   ============================================================================= */

/* ── Right sidebar — CSS custom properties ────────────────────────────────── */
:root {
	--inv-right-w: 0px;
}

body.inv-logged-in {
	--inv-right-w: 300px;
	padding-right: var(--inv-right-w);
}

body.inv-logged-in.inv-right-collapsed {
	--inv-right-w: 64px;
}

body.inv-logged-in #invictus-site-header {
	right: 0;
}

/* ── Right sidebar container ──────────────────────────────────────────────── */
.inv-home-right {
	position: fixed;
	top: var(--inv-header-h, 64px);
	right: 0;
	bottom: 0;
	width: var(--inv-right-w);
	z-index: 30;
	background: rgba(8, 13, 26, 0.97);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-left: 1px solid rgba(255, 255, 255, 0.05);
	overflow-y: auto;
	overflow-x: hidden;
	scrollbar-width: thin;
	scrollbar-color: rgba(255,255,255,0.08) transparent;
	display: flex;
	flex-direction: column;
}

.inv-home-right::-webkit-scrollbar {
	width: 4px;
}

.inv-home-right::-webkit-scrollbar-thumb {
	background: rgba(255,255,255,0.08);
	border-radius: 2px;
}

/* ── Right sidebar: expanded vs collapsed content ── */
.inv-right-icons {
	display: none;
}

.inv-right-expanded {
	display: flex;
	flex-direction: column;
	flex: 1;
}

body.inv-right-collapsed .inv-right-expanded {
	display: none;
}

body.inv-right-collapsed .inv-right-icons {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	padding: 10px 0;
}

/* ── Right sidebar: collapsed icon buttons ── */
.inv-right-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 10px;
	color: #8b93b0;
	text-decoration: none;
	background: none;
	border: none;
	cursor: pointer;
	transition: background 0.12s, color 0.12s;
	position: relative;
}

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

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

.inv-right-icon--cta {
	color: #080d1a;
	background: linear-gradient(135deg, #f59e0b, #fbbf24);
	width: 38px;
	height: 38px;
	margin-bottom: 6px;
}

.inv-right-icon--cta:hover {
	color: #080d1a;
	box-shadow: 0 2px 12px rgba(245, 158, 11, 0.35);
	background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.inv-right-icon--cta svg {
	width: 18px;
	height: 18px;
}

/* Store icon — collapsed */
.inv-right-icon--store {
	position: relative;
	color: #f472b6;
}

.inv-right-icon--store:hover {
	color: #fb7bb8;
	background: rgba(244, 114, 182, 0.1);
}

.inv-right-icon__new {
	position: absolute;
	bottom: 0;
	right: -2px;
	font-family: 'Rajdhani', sans-serif;
	font-size: 0.45rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #fff;
	background: rgba(244, 114, 182, 0.7);
	padding: 0 3px;
	border-radius: 3px;
	line-height: 1.4;
	pointer-events: none;
}

.inv-right-icon__badge {
	position: absolute;
	top: 2px;
	right: 2px;
	min-width: 16px;
	height: 16px;
	border-radius: 9999px;
	background: #ef4444;
	color: #fff;
	font-family: 'Rajdhani', sans-serif;
	font-size: 0.6rem;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 4px;
	line-height: 1;
}

/* ── Right sidebar: announcements popover (collapsed) ── */
.inv-right-ann-popover {
	position: absolute;
	left: auto;
	right: 68px;
	top: 0;
	width: 280px;
	max-height: 400px;
	overflow-y: auto;
	background: #111827;
	border-radius: 12px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
	z-index: 50;
}

.inv-right-ann-popover__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 14px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
	font-family: 'Rajdhani', sans-serif;
	font-size: 0.82rem;
	font-weight: 700;
	color: #c8cce8;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.inv-right-ann-popover__close {
	background: none;
	border: none;
	color: #6b7494;
	font-size: 1.2rem;
	cursor: pointer;
	padding: 0 4px;
	line-height: 1;
}

.inv-right-ann-popover__close:hover {
	color: #fff;
}

.inv-right-ann-popover__item {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 10px 14px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.inv-right-ann-popover__item:last-child {
	border-bottom: none;
}

/* ── Right sidebar card sections ──────────────────────────────────────────── */
.inv-right-card {
	padding: 12px 16px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.inv-right-card:last-child {
	border-bottom: none;
}

.inv-right-card__title {
	font-family: 'Rajdhani', sans-serif;
	font-size: 0.82rem;
	font-weight: 700;
	color: #8b93b0;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin: 0 0 0.6rem;
}

.inv-right-card__more {
	display: block;
	text-align: left;
	font-family: 'Inter', sans-serif;
	font-size: 0.75rem;
	color: #f59e0b;
	text-decoration: none;
	padding-top: 0.5rem;
	transition: color 0.15s;
}

.inv-right-card__more:hover {
	color: #fbbf24;
}

/* ── Right: Create Lineup CTA ── */
.inv-right-cta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 100%;
	font-family: 'Rajdhani', sans-serif;
	font-size: 0.88rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #080d1a;
	background: linear-gradient(135deg, #f59e0b, #fbbf24);
	padding: 0.55rem 1rem;
	border-radius: 10px;
	text-decoration: none;
	transition: transform 0.15s, box-shadow 0.15s;
}

.inv-right-cta:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
}

.inv-right-cta svg {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}

/* ── Right: Search ── */
.inv-right-search {
	display: flex;
	align-items: center;
	gap: 8px;
	background: rgba(255, 255, 255, 0.03);
	border-radius: 8px;
	padding: 8px 12px;
	transition: background 0.15s;
}

.inv-right-search:focus-within {
	background: rgba(255, 255, 255, 0.06);
}

.inv-right-search__icon {
	width: 16px;
	height: 16px;
	opacity: 0.4;
	flex-shrink: 0;
}

.inv-right-search__input {
	flex: 1;
	background: none;
	border: none;
	outline: none;
	font-family: 'Inter', sans-serif;
	font-size: 0.82rem;
	color: #c8cce8;
	min-width: 0;
}

.inv-right-search__input::placeholder {
	color: #4a5068;
}

.inv-right-search__results {
	margin-top: 0.5rem;
}

/* ── Right: Announcements ── */
.inv-right-announcements {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.inv-right-ann {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 0.5rem 0.625rem;
	border-left: 3px solid transparent;
	border-radius: 0.375rem;
}

.inv-right-ann + .inv-right-ann {
	margin-top: 0.25rem;
}

/* Type colors — left border accent */
.inv-right-ann--info    { border-left-color: #3b82f6; }
.inv-right-ann--event   { border-left-color: #f59e0b; }
.inv-right-ann--warning { border-left-color: #ef4444; }
.inv-right-ann--update  { border-left-color: #22c55e; }

a.inv-right-ann--linked {
	text-decoration: none;
	color: inherit;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s;
}

a.inv-right-ann--linked:hover {
	background: rgba(255, 255, 255, 0.03);
}

.inv-right-ann__emoji {
	font-size: 1.2rem;
	line-height: 1;
	flex-shrink: 0;
	margin-top: 1px;
}

.inv-right-ann__body {
	flex: 1;
	min-width: 0;
}

.inv-right-ann__title {
	display: block;
	font-family: 'Rajdhani', sans-serif;
	font-size: 0.82rem;
	font-weight: 700;
	color: #c8cce8;
	margin-bottom: 0.2rem;
}

.inv-right-ann__text {
	font-family: 'Inter', sans-serif;
	font-size: 0.75rem;
	color: #8b93b0;
	line-height: 1.5;
	margin: 0;
}

.inv-right-ann__text .inv-ann-link {
	color: #f59e0b;
	text-decoration: none;
}

/* ── Right: Who to Follow ── */
.inv-right-follow-list {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

.inv-right-follow-row {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.4rem 0.35rem;
	border-radius: 8px;
	text-decoration: none;
	transition: background 0.12s;
}

.inv-right-follow-row:hover {
	background: rgba(255, 255, 255, 0.04);
}

.inv-right-follow-row__avatar .inv-avatar-wrap {
	width: 36px !important;
	height: 36px !important;
}

.inv-right-follow-row__name {
	font-family: 'Inter', sans-serif;
	font-size: 0.82rem;
	font-weight: 500;
	color: #c8cce8;
}

/* ── Right: Community Badges ── */
.inv-right-badges {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

.inv-right-badge-row {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.35rem 0;
}

.inv-right-badge-row__icon {
	font-size: 1.3rem;
	line-height: 1;
	flex-shrink: 0;
}

.inv-right-badge-row__info {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.inv-right-badge-row__name {
	font-family: 'Rajdhani', sans-serif;
	font-size: 0.78rem;
	font-weight: 700;
	color: #c8cce8;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.inv-right-badge-row__by {
	font-family: 'Inter', sans-serif;
	font-size: 0.68rem;
	color: #6b7494;
}

/* ── Right: Quiz ── */
.inv-right-quiz-btn {
	display: block;
	text-align: center;
	font-family: 'Rajdhani', sans-serif;
	font-size: 0.85rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #080d1a;
	background: linear-gradient(135deg, #3b82f6, #60a5fa);
	padding: 0.5rem;
	border-radius: 8px;
	text-decoration: none;
	transition: transform 0.15s, box-shadow 0.15s;
}

.inv-right-quiz-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35);
}

.inv-right-quiz-hint {
	display: block;
	font-family: 'Inter', sans-serif;
	font-size: 0.72rem;
	color: #f59e0b;
	text-align: center;
	margin-top: 0.35rem;
}

.inv-right-quiz-cd {
	font-family: 'Inter', sans-serif;
	font-size: 0.78rem;
	color: #4a5068;
	text-align: center;
	margin: 0;
}

/* ── Right: Search Results ── */
.inv-right-search-result {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.4rem 0.35rem;
	border-radius: 8px;
	text-decoration: none;
	transition: background 0.12s;
}

.inv-right-search-result:hover {
	background: rgba(255, 255, 255, 0.04);
}

.inv-right-search-result img {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.inv-right-search-result__name {
	font-family: 'Inter', sans-serif;
	font-size: 0.82rem;
	font-weight: 500;
	color: #c8cce8;
	display: block;
}

.inv-right-search-result__type {
	font-family: 'Inter', sans-serif;
	font-size: 0.68rem;
	color: #6b7494;
	display: block;
}

/* ── Right: Store / War Pets ── */
.inv-right-store__header {
	display: flex;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	padding: 6px 10px;
	margin: -4px -6px 8px;
	border-radius: 10px;
	background: rgba(244, 114, 182, 0.08);
	transition: background 0.15s;
}

.inv-right-store__header:hover {
	background: rgba(244, 114, 182, 0.14);
}

.inv-right-store__header img {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
}

.inv-right-store__title {
	font-family: 'Rajdhani', sans-serif;
	font-size: 0.88rem;
	font-weight: 700;
	color: #f472b6;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.inv-right-store__new {
	font-family: 'Rajdhani', sans-serif;
	font-size: 0.58rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #fff;
	background: rgba(244, 114, 182, 0.6);
	padding: 2px 8px;
	border-radius: 5px;
	margin-left: auto;
}

.inv-right-store__items {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.inv-right-store__item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 6px;
	border-radius: 8px;
	text-decoration: none;
	transition: background 0.12s;
}

.inv-right-store__item:hover {
	background: rgba(255, 255, 255, 0.04);
}

.inv-right-store__img {
	width: 36px;
	height: 36px;
	border-radius: 8px;
	object-fit: cover;
	flex-shrink: 0;
	background: rgba(255, 255, 255, 0.04);
}

.inv-right-store__placeholder {
	width: 36px;
	height: 36px;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.04);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1rem;
	flex-shrink: 0;
}

.inv-right-store__item-name {
	font-family: 'Inter', sans-serif;
	font-size: 0.75rem;
	font-weight: 500;
	color: #c8cce8;
	flex: 1;
	min-width: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.inv-right-store__item-link {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 1;
	min-width: 0;
	text-decoration: none;
	color: inherit;
}

.inv-right-store__price {
	font-family: 'Rajdhani', sans-serif;
	font-size: 0.72rem;
	font-weight: 700;
	color: #f59e0b;
	white-space: nowrap;
	flex-shrink: 0;
}

.inv-right-store__buy {
	font-family: 'Rajdhani', sans-serif;
	font-size: 0.65rem;
	font-weight: 700;
	color: #080d1a;
	background: #f59e0b;
	border: none;
	border-radius: 6px;
	padding: 4px 8px;
	cursor: pointer;
	white-space: nowrap;
	flex-shrink: 0;
	transition: opacity 0.15s;
	text-decoration: none;
}

.inv-right-store__buy:hover {
	opacity: 0.8;
	color: #080d1a;
}

/* ── Right sidebar toggle button ──────────────────────────────────────────── */
.inv-right-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	position: fixed;
	top: 72px;
	right: calc(var(--inv-right-w) + 4px);
	width: 24px;
	height: 24px;
	background: rgba(8, 13, 26, 0.9);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 50%;
	color: rgba(255, 255, 255, 0.4);
	cursor: pointer;
	z-index: 41;
	transition: right 0.28s cubic-bezier(0.4, 0, 0.2, 1), color 0.15s, background 0.15s;
}
.inv-right-toggle:hover {
	color: #fff;
	background: rgba(255, 255, 255, 0.08);
}
.inv-right-toggle svg {
	width: 14px;
	height: 14px;
}
body.inv-right-collapsed .inv-right-toggle {
	right: calc(64px + 4px);
}
body.inv-right-collapsed .inv-right-toggle svg {
	transform: rotate(180deg);
}

/* ── Responsive: Right sidebar (tablet) ── */
@media (max-width: 1023px) {
	body.inv-logged-in {
		--inv-right-w: 0px;
		padding-right: 0;
	}

	.inv-home-right,
	.inv-right-toggle {
		display: none !important;
	}

	body.inv-logged-in #invictus-site-header {
		right: 0;
	}
}

/* ── 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;
		right: 0 !important;
	}

	.inv-home-right,
	.inv-right-toggle {
		display: none !important;
	}

	body, body.inv-logged-in {
		--inv-right-w: 0px !important;
		padding-right: 0 !important;
	}
}

/* ── Right: Upgrade CTA (Scout users) ───────────────────────────────────── */
.inv-upgrade-cta {
	background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(168, 85, 247, 0.08));
	border-radius: 12px;
	margin: 0 4px;
}

.inv-upgrade-cta__header {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 8px;
}

.inv-upgrade-cta__icon {
	font-size: 1.1rem;
}

.inv-upgrade-cta__title {
	font-family: 'Rajdhani', sans-serif;
	font-size: 0.85rem;
	font-weight: 700;
	color: #f59e0b;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.inv-upgrade-cta__perks {
	list-style: none;
	padding: 0;
	margin: 0 0 10px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.inv-upgrade-cta__perks li {
	font-size: 0.75rem;
	color: #9ca3af;
	padding-left: 16px;
	position: relative;
}

.inv-upgrade-cta__perks li::before {
	content: '\2713';
	position: absolute;
	left: 0;
	color: #a855f7;
	font-weight: 700;
	font-size: 0.7rem;
}

.inv-upgrade-cta__btn {
	display: block;
	text-align: center;
	font-family: 'Rajdhani', sans-serif;
	font-size: 0.82rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #080d1a;
	background: linear-gradient(135deg, #f59e0b, #a855f7);
	padding: 0.45rem 1rem;
	border-radius: 8px;
	text-decoration: none;
	transition: transform 0.15s, box-shadow 0.15s;
}

.inv-upgrade-cta__btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 16px rgba(168, 85, 247, 0.35);
}

/* Unread mail dot on Town → Mail sidebar item */
.inv-sidebar__dot {
	position: absolute;
	top: 50%;
	right: 16px;
	transform: translateY(-50%);
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #ef4444;
	box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
}
