/* CodeForge Console */

.cfc-shell {
	min-height: calc(100vh - 3.25rem);
	min-width: 0;
	max-width: 100%;
	align-items: stretch;
}

/* Let the main flex item shrink beside the desktop sidebar without creating a page-wide scrollbar. */
.content.cfc-shell > .cfc-main {
	width: auto;
	min-width: 0;
	flex: 1 1 0%;
	display: block;
	height: 100dvh;
	min-height: 0;
	overflow-y: auto !important; /* index.css sets overflow: hidden !important for the chat layout; console pages must scroll here */
	overflow-x: hidden;
}

/* Sidebar (desktop static, mobile offcanvas) */
.cfc-sidebar {
	width: 280px;
	flex: 0 0 280px;
}

.cfc-sidebar-inner {
	position: sticky;
	top: 3.25rem;
	height: calc(100vh - 3.25rem);
	overflow-y: auto;
	scrollbar-width: thin;
}

.cfc-offcanvas {
	width: 280px !important;
}

.cfc-nav .list-group-item {
	border: 0;
	border-radius: .5rem !important;
	margin: 2px 8px;
	padding: .55rem .75rem;
	color: var(--cz-body-color);
}

.cfc-nav .list-group-item:hover {
	background: var(--cz-tertiary-bg);
}

.cfc-nav .list-group-item.active {
	background: var(--cz-primary-bg-subtle, rgba(38, 191, 196, .12));
	color: var(--cz-primary, #26bfc4);
	font-weight: 600;
}

.cfc-nav .list-group-item.active i {
	color: inherit !important;
}

.cfc-nav-divider {
	font-size: .72rem;
	letter-spacing: .04em;
}

.cfc-content {
	min-width: 0;
	background: var(--cz-body-bg);
}

/* Tool branding header, always at the top of console pages */
.cfc-tool-header {
	display: flex;
	align-items: center;
	padding: .75rem 1rem;
	border-bottom: 1px solid var(--cz-border-color);
	background: var(--cz-body-bg);
}

@media (min-width: 992px) {
	.cfc-tool-header {
		padding-left: 1.5rem;
		padding-right: 1.5rem;
	}
}

/* index.css zeroes .container-fluid padding; restore it for console page content */
.cfc-content .container-fluid {
	padding-left: 1rem !important;
	padding-right: 1rem !important;
}

@media (min-width: 992px) {
	.cfc-content .container-fluid {
		padding-left: 1.5rem !important;
		padding-right: 1.5rem !important;
	}
}

@media (max-width: 991.98px) {
	.cfc-sidebar {
		width: auto;
		flex: 0 0 auto;
	}
	.cfc-sidebar-inner {
		position: static;
		height: auto;
	}
	.cfc-content {
		width: 100%;
	}
}

/* Stat cards */
.cfc-stat-card {
	border: 1px solid var(--cz-border-color);
	box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}

.cfc-stat-icon {
	width: 40px;
	height: 40px;
	flex: 0 0 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: .75rem;
	font-size: 1.25rem;
}

.cfc-stat-value {
	font-variant-numeric: tabular-nums;
}

/* Connect banner (sticky) */
.cfc-connect-banner {
	position: sticky;
	top: 3.25rem;
	z-index: 1040;
	background: rgba(255, 193, 7, .12);
	border-bottom: 1px solid rgba(255, 193, 7, .35);
	backdrop-filter: blur(6px);
}

.cfc-connect-banner-inner {
	max-width: 100%;
	padding: .6rem 1rem;
	display: flex;
	align-items: center;
	gap: .9rem;
	flex-wrap: wrap;
}

.cfc-connect-banner-icon {
	width: 38px;
	height: 38px;
	flex: 0 0 38px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: .75rem;
	background: rgba(255, 193, 7, .18);
	color: #f59e0b;
	font-size: 1.2rem;
}

.cfc-connect-banner-text {
	flex-grow: 1;
	min-width: 220px;
}

.cfc-connect-banner-actions {
	display: flex;
	align-items: center;
	gap: .5rem;
}

/* Provider icon */
.cfc-provider-icon {
	width: 46px;
	height: 46px;
	flex: 0 0 46px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: .75rem;
	background: var(--cz-tertiary-bg);
	border: 1px solid var(--cz-border-color);
	font-size: 1.5rem;
}

/* Pill */
.cfc-pill {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	padding: .45rem .8rem;
	border: 1px solid var(--cz-border-color);
	border-radius: 999px;
	background: var(--cz-body-bg);
	color: var(--cz-body-secondary-color);
	font-size: .85rem;
}

/* Workspace page */
.cfc-workspace-body {
	align-items: flex-start;
	gap: 1.25rem;
}

.cfc-workspace-nav {
	width: 280px;
	flex: 0 0 280px;
	position: sticky;
	top: 7rem;
	max-height: calc(100vh - 8rem);
	overflow-y: auto;
	scrollbar-width: thin;
	border: 1px solid var(--cz-border-color);
	border-radius: .75rem;
	background: var(--cz-tertiary-bg);
	padding: .5rem .25rem;
}

.cfc-workspace-navigator .cf-nav-project-header {
	border-radius: .5rem;
}

.cfc-workspace-main .tool-container {
	padding: 0 !important;
}
