/* ============================================================
   Ridgeline workspace shell + sidebar
   ============================================================ */

:root {
	--ridgeline-rail: #1f2333;
	--ridgeline-panel: #2a2f44;
	--ridgeline-primary: #5e7cff;
	--ridgeline-bg: #f6f7fb;
	--ridgeline-ink: #1a1d2b;
	--ridgeline-muted: #6b7088;
	--ridgeline-sidebar-width: 256px;
}

/* Workspace shell: sidebar fixed left, main content offset. */
body.wp-singular,
body.wp-site-blocks,
body {
	background: var(--ridgeline-bg);
	color: var(--ridgeline-ink);
	font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
	font-size: 14px;
}

.ridgeline-shell {
	display: flex;
	min-height: 100vh;
	align-items: stretch;
}

.ridgeline-shell > .wp-block-template-part:first-child,
.ridgeline-shell > .ridgeline-sidebar {
	flex: 0 0 var(--ridgeline-sidebar-width);
	max-width: var(--ridgeline-sidebar-width);
}

.ridgeline-shell__main {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

/* ============================================================
   Sidebar block
   ============================================================ */

.ridgeline-sidebar {
	position: sticky;
	top: 0;
	display: flex;
	flex-direction: column;
	width: var(--ridgeline-sidebar-width);
	height: 100vh;
	background: var(--ridgeline-panel);
	color: rgba(255, 255, 255, 0.72);
	border-right: 1px solid rgba(255, 255, 255, 0.05);
	user-select: none;
	overflow: hidden;
}

/* Profile */
.ridgeline-sidebar__profile {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
	color: inherit;
	text-decoration: none;
	transition: background-color 0.15s ease;
}
.ridgeline-sidebar__profile:hover,
.ridgeline-sidebar__profile:focus {
	background: rgba(255, 255, 255, 0.04);
	outline: none;
}
.ridgeline-sidebar__avatar {
	position: relative;
	width: 36px;
	height: 36px;
	flex: 0 0 36px;
}
.ridgeline-sidebar__avatar-img {
	width: 36px !important;
	height: 36px !important;
	border-radius: 999px;
	display: block;
	object-fit: cover;
	box-shadow: 0 0 0 2px transparent;
	transition: box-shadow 0.15s ease;
}
.ridgeline-sidebar__profile:hover .ridgeline-sidebar__avatar-img {
	box-shadow: 0 0 0 2px rgba(94, 124, 255, 0.6);
}
.ridgeline-sidebar__avatar-dot {
	position: absolute;
	right: -2px;
	bottom: -2px;
	width: 10px;
	height: 10px;
	border-radius: 999px;
	background: #34d399;
	border: 2px solid var(--ridgeline-panel);
}
.ridgeline-sidebar__profile-meta {
	min-width: 0;
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	line-height: 1.15;
}
.ridgeline-sidebar__profile-name {
	font-size: 12px;
	font-weight: 600;
	color: #fff;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.ridgeline-sidebar__profile-role {
	font-family: "JetBrains Mono", ui-monospace, monospace;
	font-size: 9px;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.4);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.ridgeline-sidebar__profile-chevron {
	color: rgba(255, 255, 255, 0.3);
	transition: transform 0.15s ease, color 0.15s ease;
	flex: 0 0 auto;
}
.ridgeline-sidebar__profile:hover .ridgeline-sidebar__profile-chevron {
	color: rgba(255, 255, 255, 0.7);
	transform: translateX(2px);
}

/* Brand */
.ridgeline-sidebar__brand {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px 16px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.ridgeline-sidebar__brand img {
	height: 64px;
	width: auto;
	max-width: 100%;
	object-fit: contain;
}

/* Search */
.ridgeline-sidebar__search {
	position: relative;
	padding: 12px 16px 8px;
}
.ridgeline-sidebar__search svg {
	position: absolute;
	left: 24px;
	top: 50%;
	transform: translateY(-50%);
	color: rgba(255, 255, 255, 0.4);
}
.ridgeline-sidebar__search input {
	width: 100%;
	padding: 6px 28px 6px 28px;
	font-size: 11px;
	color: #fff;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 4px;
	outline: none;
	transition: box-shadow 0.15s ease;
}
.ridgeline-sidebar__search input::placeholder {
	color: rgba(255, 255, 255, 0.4);
}
.ridgeline-sidebar__search input:focus {
	box-shadow: 0 0 0 1px rgba(94, 124, 255, 0.5);
}
.ridgeline-sidebar__search-key {
	position: absolute;
	right: 24px;
	top: 50%;
	transform: translateY(-50%);
	font-family: "JetBrains Mono", ui-monospace, monospace;
	font-size: 9px;
	color: rgba(255, 255, 255, 0.4);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 3px;
	padding: 0 4px;
	line-height: 14px;
}

/* Nav */
.ridgeline-sidebar__nav-wrap {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 8px;
}
.ridgeline-sidebar__section + .ridgeline-sidebar__section {
	margin-top: 20px;
}
.ridgeline-sidebar__section-label {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: 0 0 6px;
	padding: 0 8px;
	font-family: "JetBrains Mono", ui-monospace, monospace;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.4);
}
.ridgeline-sidebar__section-title {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.ridgeline-sidebar__section-hotkey {
	font-weight: 400;
	text-transform: lowercase;
}
.ridgeline-sidebar__nav {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.ridgeline-sidebar__nav-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 6px 8px;
	font-size: 12px;
	color: rgba(255, 255, 255, 0.7);
	text-decoration: none;
	border-radius: 4px;
	transition: background-color 0.15s ease, color 0.15s ease;
}
.ridgeline-sidebar__nav-item:hover {
	background: rgba(255, 255, 255, 0.05);
	color: #fff;
}
.ridgeline-sidebar__nav-item.is-active {
	background: rgba(94, 124, 255, 0.15);
	color: #fff;
	box-shadow: inset 0 0 0 1px rgba(94, 124, 255, 0.3);
	font-weight: 500;
}
.ridgeline-sidebar__nav-hotkey {
	font-family: "JetBrains Mono", ui-monospace, monospace;
	font-size: 9px;
	color: rgba(255, 255, 255, 0.3);
	opacity: 0;
	transition: opacity 0.15s ease;
}
.ridgeline-sidebar__nav-item:hover .ridgeline-sidebar__nav-hotkey {
	opacity: 1;
}
.ridgeline-sidebar__nav-dot {
	width: 6px;
	height: 6px;
	border-radius: 999px;
	background: var(--ridgeline-primary);
}
.ridgeline-sidebar__empty {
	margin: 0 8px;
	padding: 6px 0;
	font-size: 11px;
	color: rgba(255, 255, 255, 0.35);
	line-height: 1.4;
}

/* Mobile: collapse sidebar to a top bar */
@media (max-width: 782px) {
	.ridgeline-shell {
		flex-direction: column;
	}
	.ridgeline-shell > .wp-block-template-part:first-child,
	.ridgeline-shell > .ridgeline-sidebar {
		flex: 0 0 auto;
		max-width: 100%;
		width: 100%;
	}
	.ridgeline-sidebar {
		position: relative;
		height: auto;
		width: 100%;
	}
	.ridgeline-sidebar__nav-wrap {
		max-height: 50vh;
	}
}
