/* ───────────────────────────────────────────────── */
/** Hide Various Elements
──────────────────────────────────────────────────── */

body.hide-vault-switcher-and-settings:not(.is-mobile) .workspace-split.mod-left-split
	.workspace-sidedock-vault-profile,
body:not(.show-new-tab-button, .is-mobile) .workspace-tab-header-new-tab,
body:not(.show-close-buttons, .is-mobile)
	.workspace-tab-header:only-child
	.workspace-tab-header-inner-close-button,
body:not(.show-close-buttons, .is-mobile)
	.mod-stacked
	.workspace-tab-header
	.workspace-tab-header-inner-close-button,
body:not(.show-close-buttons, .is-mobile)
	.workspace-tabs:not(.mod-stacked)
	.workspace-tab-header:not(:hover)
	.workspace-tab-header-inner-close-button,
body:not(.show-tab-list-button) .workspace-tab-header-tab-list {
	display: none;
}

/* ───────────────────────────────────────────────── */
/** Hide Tab bar when only tab
──────────────────────────────────────────────────── */

body:not(.normal-tab-bar, .is-mobile) .mod-root
	.workspace-tab-header-container:not(:has(.workspace-tab-header + .workspace-tab-header)) {
	display: none;
}

/* MACOS: reduce height of RIGHT sidebar when tab bar hidden */
/* WINDOWS: reduce height of LEFT sidebar when tab bar hidden */
body.mod-macos:not(.normal-tab-bar, .show-sidebar-header-buttons) .mod-root:not(
		:has(.workspace-tab-header + .workspace-tab-header)
	)
	+ .mod-right-split
	.mod-top-right-space
	.workspace-tab-header-container:not(:hover),
body.mod-windows:not(.normal-tab-bar, .show-sidebar-header-buttons)
	.mod-root:not(:has(.workspace-tab-header + .workspace-tab-header))
	+ .mod-left-split
	.mod-top-left-space
	.workspace-tab-header-container:not(:hover) {
	height: var(--sidebar-tabs-unhovered-height);
}

/* hide inline title when *more* than one tab */
body:not(.is-mobile).hide-inline-title-when-more-than-one-tab .mod-root
	.workspace-tab-header-container:has(.workspace-tab-header + .workspace-tab-header)
	+ .workspace-tab-container
	.inline-title {
	display: none;
}

/* ───────────────────────────────────────────────── */
/** Stacked Tabs
──────────────────────────────────────────────────── */

.mod-stacked .workspace-tab-header-inner {
	background-color: var(--bg3);
	border-right: var(--thin-muted-border);
}

/* hide useless tab bar when stacked */
.mod-stacked .workspace-tab-header-container.workspace-tab-header-container {
	height: 0;
}

.workspace-tab-header-inner.workspace-tab-header-inner:hover.workspace-tab-header-inner:hover * {
	color: var(--hover-accent);
}

.workspace-tab-header-inner.workspace-tab-header-inner:hover.workspace-tab-header-inner:active * {
	color: var(--color-accent);
}

/* ───────────────────────────────────────────────── */
/** Styling of Tabs
──────────────────────────────────────────────────── */

.mod-root .workspace-tab-header-container-inner {
	margin-top: 4px;
	padding-left: 0;
}

.is-active .workspace-tab-header-inner-title {
	font-weight: 600;
	text-rendering: geometricprecision;
}

body .workspace-tab-header-container {
	padding-right: 0;
}

.mod-root .workspace-tab-header::after,
.mod-root .workspace-tab-header::before {
	display: none;
}

.mod-root .workspace-tab-header-inner-title {
	margin-bottom: -1px;
}

body .workspace .mod-root .workspace-tab-header {
	width: var(--tab-width);
	max-width: unset;
}

/* pin */
.workspace-tabs:not(.mod-stacked) .workspace-tab-header-status-container {
	padding-top: 2px;
}

.mod-stacked .workspace-tab-header-status-icon .lucide-pin {
	stroke: var(--icon-color);
}

.workspace-tab-header-status-icon:hover .lucide-pin.lucide-pin {
	stroke: var(--icon-color-hover);
}

/* change order for pin */
.workspace-tab-header-status-container {
	order: 1;
}

.workspace-tab-header-inner-title {
	order: 3;
}

.workspace-tab-header-inner-icon {
	order: 2;
}

.workspace-tab-header-inner-close-button {
	order: 4;
}

/* tab bar height: cannot modify ``--header-height``, since it would also affect the sidebar tabs that are not top */
.mod-macos {
	/* PENDING https://discord.com/channels/686053708261228577/716028884885307432/1375473088078282883 */
	/* :is(.mod-top, .mod-root) .workspace-tab-header-container { */
	/* 	height: 35px; */
	/* } */

	.workspace-ribbon.mod-left::before {
		height: 34px;
	}

	.workspace-ribbon.mod-left {
		margin-top: 34px;
	}
}

/* ───────────────────────────────────────────────── */
/** Release Notes Tab
──────────────────────────────────────────────────── */

/* add favicon */
.workspace-tab-header[data-type="release-notes"] .workspace-tab-header-inner-icon {
	display: none;
}

.workspace-tab-header[data-type="release-notes"] .workspace-tab-header-inner-title::before {
	position: relative;
	top: 2px;
	padding-right: 2px;
	font-family: var(--icon-font);
	content: "tips_and_updates ";
}
