/* Remove min-height from menu elements that was causing them to render incorrectly */
.my-sites li {
    min-height: unset !important;
}

/* Overwrite a core style which breaks the overflow for .my-sites in Safari */
#wpadminbar li.menupop.my-sites {
	overflow: visible;
}

/* Add a focus style for menu items */
.accessible-focus #wpadminbar li.menupop a.ab-item:focus,
.accessible-focus #wpadminbar li#wp-admin-bar-notes.menupop .ab-item:focus,
.accessible-focus #wpadminbar ul li#wp-admin-bar-ab-new-post a:focus {
	-webkit-box-shadow: inset  2px  2px 0 #668eaa,
	                    inset -2px -2px 0 #668eaa;
	box-shadow: inset  2px  2px 0 #668eaa,
	            inset -2px -2px 0 #668eaa;
}

/* Menu items in panels are inside `ab-empty-item` */
.accessible-focus #wpadminbar li.menupop .ab-empty-item a.ab-item:focus,
.accessible-focus #wpadminbar li.menupop .ab-empty-item a.ab-secondary:focus,
.accessible-focus #wpadminbar li.menupop .ab-empty-item a.username:focus {
	-webkit-box-shadow: inset  2px  2px 0 #2e4354,
						inset -2px -2px 0 #2e4354;
	box-shadow: inset  2px  2px 0 #2e4354,
				inset -2px -2px 0 #2e4354;
}

.accessible-focus #wpadminbar .quicklinks li#wp-admin-bar-my-account #wp-admin-bar-user-info .ab-sign-out:focus {
	-webkit-box-shadow: inset  2px  2px 0 #2e4354,
						inset -2px -2px 0 #2e4354 !important;
	box-shadow: inset  2px  2px 0 #2e4354,
				inset -2px -2px 0 #2e4354 !important;
}

.accessible-focus #wpadminbar:not(.mobile) .ab-top-menu > li > .ab-item:focus {
	background: transparent;
}

/* Hide the panels initially */
#wpadminbar li#wp-admin-bar-blog.menupop > .ab-sub-wrapper, /* My Sites */
#wpadminbar li#wp-admin-bar-newdash.menupop > .ab-sub-wrapper, /* Reader */
#wpadminbar li#wp-admin-bar-my-account.menupop > .ab-sub-wrapper, /* Me */
#wpadminbar li#wp-admin-bar-notes.menupop > #wpnt-notes-panel2 { /* Notifications */
	display: block !important;
}

/* Change notification icon the match the one on WP.com */
#wp-admin-bar-notes .noticon-bell:before {
    content: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cmVjdCB4PSIwIiBmaWxsPSJub25lIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiLz48Zz48cGF0aCBmaWxsPSIjZmZmZmZmIiBkPSJNNi4xNCAxNC45N2wyLjgyOCAyLjgyN2MtLjM2Mi4zNjItLjg2Mi41ODYtMS40MTQuNTg2LTEuMTA1IDAtMi0uODk1LTItMiAwLS41NTIuMjI0LTEuMDUyLjU4Ni0xLjQxNHptOC44NjcgNS4zMjRMMTQuMyAyMSAzIDkuN2wuNzA2LS43MDcgMS4xMDIuMTU3Yy43NTQuMTA4IDEuNjktLjEyMiAyLjA3Ny0uNTFsMy44ODUtMy44ODRjMi4zNC0yLjM0IDYuMTM1LTIuMzQgOC40NzUgMHMyLjM0IDYuMTM1IDAgOC40NzVsLTMuODg1IDMuODg2Yy0uMzg4LjM4OC0uNjE4IDEuMzIzLS41MSAyLjA3N2wuMTU3IDEuMXoiLz48L2c+PC9zdmc+") !important;
}
#wp-admin-bar-notes.active .noticon-bell:before {
    content: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cmVjdCB4PSIwIiBmaWxsPSJub25lIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiLz48Zz48cGF0aCBmaWxsPSIjMjMyODJkIiBkPSJNNi4xNCAxNC45N2wyLjgyOCAyLjgyN2MtLjM2Mi4zNjItLjg2Mi41ODYtMS40MTQuNTg2LTEuMTA1IDAtMi0uODk1LTItMiAwLS41NTIuMjI0LTEuMDUyLjU4Ni0xLjQxNHptOC44NjcgNS4zMjRMMTQuMyAyMSAzIDkuN2wuNzA2LS43MDcgMS4xMDIuMTU3Yy43NTQuMTA4IDEuNjktLjEyMiAyLjA3Ny0uNTFsMy44ODUtMy44ODRjMi4zNC0yLjM0IDYuMTM1LTIuMzQgOC40NzUgMHMyLjM0IDYuMTM1IDAgOC40NzVsLTMuODg1IDMuODg2Yy0uMzg4LjM4OC0uNjE4IDEuMzIzLS41MSAyLjA3N2wuMTU3IDEuMXoiLz48L2c+PC9zdmc+") !important;
}

/* Fit width of sign out button to content */
#wpadminbar .quicklinks li#wp-admin-bar-my-account #wp-admin-bar-user-info .ab-sign-out {
	display: inline-block;
}

/* Move the admin menu toggle in Gutenberg - https://github.com/Automattic/jetpack/issues/12320 */
.jetpack-masterbar.post-new-php.block-editor-page #wpadminbar #wp-admin-bar-ab-new-post {
	display: none;
}

.jetpack-masterbar.post-new-php.block-editor-page #wpadminbar #wp-admin-bar-menu-toggle {
	top: -4px;
	position: relative;
}

.jetpack-masterbar.post-new-php.block-editor-page #wpadminbar #wp-admin-bar-menu-toggle .ab-icon:before {
	color: #fff !important;
	font-size: 28px;
}

.jetpack-masterbar #wpadminbar #wp-admin-bar-recovery-mode {
	background-color: #d63638;
	color: #fff;
	margin-right: 1em;
}
#wpadminbar #wp-admin-bar-jetpack-scan-notice {
	margin-right: 1em;
}
@media screen and (max-width: 959px ) {
	#wpadminbar #wp-admin-bar-jetpack-scan-notice {
		width:32px;
	}
	#wpadminbar #wp-admin-bar-jetpack-scan-notice a { color: transparent!important;}
}

@media screen and (max-width: 480px) {
	.jetpack-masterbar.post-new-php.block-editor-page #wp-toolbar ul li {
		flex: 1;
		width: auto !important;
	}

	.jetpack-masterbar.post-new-php.block-editor-page #wpadminbar ul#wp-admin-bar-root-default {
		width: 60%;
	}

	.jetpack-masterbar.post-new-php.block-editor-page #wpadminbar ul#wp-admin-bar-top-secondary {
		width: 40%;
	}

	.wp-admin.jetpack-masterbar.post-new-php.block-editor-page .wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle {
		left: 0;
	}
}

@media screen and (max-width: 782px) {
	.wp-admin.jetpack-masterbar.post-new-php.block-editor-page .wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle {
		left: 0 !important;
	}

	.jetpack-masterbar.post-new-php.block-editor-page #wp-toolbar,
	.jetpack-masterbar.post-new-php.block-editor-page #wp-toolbar ul {
		display: flex;
	}

	.jetpack-masterbar.post-new-php.block-editor-page #wpadminbar ul#wp-admin-bar-root-default {
		flex-grow: 1;
	}

	.jetpack-masterbar.post-new-php.block-editor-page #wpadminbar li#wp-admin-bar-menu-toggle {
		order: 1;
	}

	.jetpack-masterbar.post-new-php.block-editor-page #wpadminbar li#wp-admin-bar-blog {
		order: 2;
	}

	.jetpack-masterbar.post-new-php.block-editor-page #wpadminbar li#wp-admin-bar-newdash {
		order: 3;
	}

	#wpadminbar #wp-admin-bar-jetpack-scan-notice,
	.jetpack-masterbar #wpadminbar #wp-admin-bar-recovery-mode {
		display: none;
	}
}
