/* ───────────────────────────────────────────────── */
/** Sidebar content
──────────────────────────────────────────────────── */

/* do not trim filenames while renaming */
.tree-item-self.is-being-renamed .tree-item-inner {
	white-space: normal;
}

/* Overlaying right sidebar */
/* not possible for left sidebar https://github.com/chrisgrieser/shimmering-focus/issues/327#issuecomment-2691181434 */
.overlaying-right-sidebar .mod-right-split {
	position: absolute;
	right: 0;
}

.nav-file-title,
.nav-folder-title {
	margin-top: 0;
	margin-bottom: 0;
	border-radius: 0;
}

/* ───────────────────────────────────────────────── */
/** Sidebar Headers Hidden (Tab Headers)
──────────────────────────────────────────────────── */

body:not(.show-sidebar-header-buttons) :is(.mod-left-split, .mod-right-split) {
	:is(.workspace-tab-header-container, .workspace-tab-header-container-inner) {
		transition: var(--anim-duration-moderate);
		transition-delay: var(--transition-delay-passing-over-protection);
	}

	.workspace-tabs {
		&:not(.mod-top) .workspace-tab-header-container:not(:hover) {
			--sidebar-tabs-unhovered-height: 10px;
			height: var(--sidebar-tabs-unhovered-height);
		}

		&.mod-top .workspace-tab-header-container:not(:hover) .workspace-tab-header-container-inner {
			opacity: 0;
		}

		&.mod-top .workspace-tab-header-container-inner {
			&:hover {
				padding-bottom: 4px;
				margin-top: 4px;
			}
			padding-bottom: 0;
			margin-top: 0;
		}
	}
}

/* WINDOWS / LINUX */
/* fix sidebar header buttons not being clickable see #247 */
body:is(.mod-windows, .mod-linux) {
	&:not(.show-sidebar-header-buttons) .titlebar {
		height: 35px;
	}

	&.is-hidden-frameless:not(.is-grabbing, .is-fullscreen, .show-sidebar-header-buttons)
		.mod-top
		.workspace-tab-header-container {
		-webkit-app-region: no-drag;
	}
}

/* sync background of windows buttons with sidebar color #329 */
body:is(.mod-windows, .mod-linux).is-hidden-frameless:not(.is-fullscreen)
.titlebar-button-container.mod-right {
	background-color: transparent;
}

/* ───────────────────────────────────────────────── */
/** Sidebar Styling
──────────────────────────────────────────────────── */
:is(.mod-right-split, .mod-left-split) .workspace-leaf-content .view-content {
	padding: 0;
}

body:not(.show-sidebar-toggle-buttons) .sidebar-toggle-button {
	display: none;
}

:is(.mod-right-split, .mod-left-split)
	.workspace-tabs:not(.mod-top)
	.workspace-tab-header-container {
	background-color: var(--bg2);
}

.sidebar-toggle-button {
	height: 35px;
}

/* move the tab-list button to the space now free from the "right sidebar toggle" */
body.mod-macos.is-hidden-frameless:not(.is-popout-window) .workspace
	.workspace-tabs.mod-top-right-space
	.workspace-tab-header-container {
	padding-right: 0;
}
