// stylelint-disable function-url-quotes
@height-adminbar: 32px;
@bg-adminbar: #1d2327;

// userAvatarOutline
.mw-adminbar-icon-user:before {
	background-image: url( "data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Ctitle%3E user avatar %3C/title%3E%3Cpath d='M10 8c1.7 0 3.06-1.35 3.06-3S11.7 2 10 2 6.94 3.35 6.94 5 8.3 8 10 8zm0 2c-2.8 0-5.06-2.24-5.06-5S7.2 0 10 0s5.06 2.24 5.06 5-2.26 5-5.06 5zm-7 8h14v-1.33c0-1.75-2.31-3.56-7-3.56s-7 1.81-7 3.56V18zm7-6.89c6.66 0 9 3.33 9 5.56V20H1v-3.33c0-2.23 2.34-5.56 9-5.56z'/%3E%3C/svg%3E%0A" );
}

#pt-notifications-notice,
#pt-talk-alert {
	display: none;
}

.mw-adminbar-notifications li {
	filter: invert( 1 );

	// Some Wordpress themes override pseudo elements.
	// e.g. twentytwenty
	//  Don't let them!
	a:before,
	a:after {
		word-break: normal;
		word-wrap: normal;
	}
}

#pt-notifications-alert {
	padding-top: 5px;
	width: 40px;
	display: block;
	height: 100%;
	box-sizing: border-box;
	margin: 0;
	line-height: normal;

	a {
		// stylelint-disable-next-line declaration-no-important
		height: 100% !important;
		margin: auto !important;
		opacity: 1 !important;
		background-repeat: no-repeat;
	}
}

#p-personal {
	position: relative;
	align-self: center;

	input {
		opacity: 0;
		position: absolute;
		width: 100%;
		height: @height-adminbar;
		z-index: 2;

		~ .mw-portlet-body {
			display: none;
		}

		&:checked ~ .mw-portlet-body {
			display: block;
		}
	}

	h3 {
		margin: 0;
		padding: 0;
		width: @height-adminbar;
		height: @height-adminbar;
		text-indent: 999px;
		overflow: hidden;
		float: right;
		cursor: pointer;

		&:before {
			content: '';
			width: 100%;
			height: @height-adminbar;
			display: block;
			background-repeat: no-repeat;
			background-position: center;
			filter: invert( 1 );
		}
	}

	@arrow-size: 10px;
	@arrow-size-2x: @arrow-size * 2;

	ul {
		position: absolute;
		right: 0;
		top: @arrow-size;
		margin: @height-adminbar 0 0;
		padding: 0 20px 20px;
		list-style: none;
		background: @bg-adminbar;
		min-width: 150px;

		&:before {
			content: '';
			display: block;
			position: absolute;
			top: -@arrow-size-2x;
			right: @arrow-size / 2;
			height: @arrow-size-2x;
			width: @arrow-size-2x;
			border-left: @arrow-size solid transparent;
			border-right: @arrow-size solid transparent;
			border-bottom: @arrow-size solid @bg-adminbar;
		}
	}

	a {
		color: #fff;
	}
}
