@use '../assets';

// Windows Titlebar
.oldTitleBarEnabled-D8ppJQ {
	--titlebar-height: 0px;
}
#app-mount .typeWindows-2-g3UY {
	height: calc(var(--titlebar-height) - 2px);
	margin-top: 2px;
	position: relative;
	width: 100vw;
	z-index: 10;
	box-sizing: border-box;
	.wordmarkWindows-2dq6rw {
		padding: 0 var(--spacing-half);
		display: flex;
		align-items: center;
		justify-content: center;
		height: var(--titlebar-height);
		margin-top: -3px;
		svg {
			display: none;
		}
		&::before {
			content: '';
			width: var(--titlebar-height);
			height: var(--titlebar-height);
			position: relative;
			mask: url(assets.$icon_discord) center/18px no-repeat;
			top: 0;
			background: var(--toolbar-text-muted);
			-webkit-app-region: drag;
		}
		&::after {
			content: '';
			position: fixed;
			top: 0;
			left: 0;
			width: 100vw;
			height: var(--titlebar-height);
			background: var(--toolbar-background-alt);
			border-bottom: 1px solid var(--toolbar-border);
			box-sizing: border-box;
			z-index: -1;
		}
	}
	.winButton-3UMjdg {
		height: calc(var(--titlebar-height) - 1px);
		width: 45px;
		color: var(--toolbar-text-muted);
		top: -2px;
		cursor: var(--cursor);
		&:hover {
			background: var(--toolbar-background-hover);
			color: var(--white);
		}
		&:active {
			background: var(--toolbar-background-active);
			color: var(--white);
		}
	}
	.winButtonMinMax-3RsPUg:nth-child(3) {
		svg {
			display: none;
		}
		&::after {
			content: '';
			width: 10px;
			height: 10px;
			box-sizing: border-box;
			box-shadow: inset 0 0 0 1px var(--toolbar-text-muted);
			pointer-events: none;
		}
		&:active::after,
		&:hover::after {
			box-shadow: inset 0 0 0 1px var(--toolbar-text-normal);
		}
	}
	.winButtonClose-3Q8ZH5 {
		path {
			d: path(
				'M 0,0 0,0.7 4.3,5 0,9.3 0,10 0.7,10 5,5.7 9.3,10 10,10 10,9.3 5.7,5 10,0.7 10,0 9.3,0 5,4.3 0.7,0 Z'
			);
		}
		&:hover {
			background: var(--win32-close-background-hover);
		}
		&:active {
			background: var(--win32-close-background-active);
		}
	}
}

// Mac Titlebar

.typeMacOS-3V4xXE {
	position: relative;
	z-index: 3001;
	width: 100%;
	height: var(--titlebar-height);
	padding: 0 var(--spacing-half);
	background: var(--toolbar-background-alt);
	border-bottom: 1px solid var(--toolbar-border);
	display: flex;
	justify-content: center;
	.macButtons-eIdy0e {
		padding: 0 var(--spacing-half);
		height: 100%;
		position: absolute;
		left: var(--spacing-half);
	}
	&::after {
		content: '';
		width: var(--titlebar-height);
		height: var(--titlebar-height);
		position: relative;
		display: block;
		mask: url(assets.$icon_discord) center/18px no-repeat;
		background: var(--text-muted);
	}
	&.unfocused-1U-yOa .macButtonClose-MwZ2nf,
	&.unfocused-1U-yOa .macButtonMaximize-2FMHAO,
	&.unfocused-1U-yOa .macButtonMinimize-3EJ6wo {
		background: var(--text-muted);
		opacity: 0.6;
	}
}

// Unfocused App

html:not(.app-focused) body:not(.oldTitleBarEnabled-D8ppJQ) {
	.wordmarkWindows-2dq6rw::before,
	.typeMacOS-3V4xXE::after,
	.winButton-3UMjdg {
		opacity: 0.6;
	}
}
