/**
 * EDD Admin Menu CSS
 *
 * @package     EDD
 * @subpackage  Admin CSS
 * @copyright   Copyright (c) 2015, Pippin Williamson
 * @license     http://opensource.org/licenses/gpl-2.0.php GNU Public License
*/

@import "~@wordpress/base-styles/breakpoints";
@import "../variables/colors";

/* Submenu Styles
-------------------------------------------------------------- */

#menu-posts-download a[href^="edit.php?post_type=download"] {
	&:hover,
	&:focus {
		box-shadow: inset 4px 0 0 0 currentColor;
		transition: box-shadow .1s linear;
	}
}

/* Secondary Separators */
#menu-posts-download li:not(:last-child) a[href^="post-new.php?post_type=download"]:after,
#menu-posts-download li:not(:last-child) a[href^="edit.php?post_type=download&page=edd-discount"]:after,
#menu-posts-download li:not(:last-child) a[href^="edit.php?post_type=download&page=edd-reports"]:after,
#menu-posts-download li:nth-last-child(2) a:after {
	border-bottom: 1px solid rgba(255, 255, 255, 0.2);
	display: block;
	float: left;
	margin: 13px -15px 8px;
	content: '';
	width: calc(100% + 26px);

	@media screen and (max-width: $break-medium) {
		margin: 20px -20px 8px -20px;
		width: calc(100% + 30px);
	}
}

#adminmenu #menu-posts-download {
	/* WordPress 5.7 fix for left-shadow on hover */
	ul.wp-submenu-wrap li {
		clear: both;
	}

	a.wp-has-current-submenu:after {
		display: none;
	}
}

/* Show Submenu Arrow */
ul#adminmenu #menu-posts-download ul.wp-submenu li.current a:before {
	right: 0;
	border: solid 8px transparent;
	content: " ";
	height: 0;
	width: 0;
	position: absolute;
	pointer-events: none;
	border-right-color: $wp-gray-0;
	margin-top: 2px;
}

#wpadminbar .edd-menu-notification-counter {
	display: inline-block !important;
	min-width: 18px !important;
	height: 18px !important;
	border-radius: 9px !important;
	margin: 7px 0 0 2px !important;
	vertical-align: top !important;
	font-size: 11px !important;
	line-height: 1.6 !important;
	text-align: center !important;
}

#wpadminbar .edd-menu-notification-indicator {
	float: right !important;
	margin: 10px 0 0 !important;
	width: 8px !important;
	height: 8px !important;
	border-radius: 4px !important;
}

#wpadminbar .edd-menu-notification-indicator:after {
	display: block !important;
	content: "";
	position: absolute !important;
	width: inherit !important;
	height: inherit !important;
	border-radius: inherit !important;
	background-color: inherit !important;
	animation: edd-menu-notification-indicator-pulse 1.5s infinite !important;
}

@keyframes edd-menu-notification-indicator-pulse {
	0% {
		transform: scale(1);
		opacity: 1;
	}
	100% {
		transform: scale(3);
		opacity: 0;
	}
}

#wpadminbar #wp-admin-bar-edd-upgrade a {
	background-color: #00a32a;
	color: #fff;
	margin-top: 5px;
}

#wpadminbar #wp-admin-bar-edd-upgrade a:hover {
	background-color: #008a20;
}

#wpadminbar .edd-menu-form-last {
	border-bottom: 1px solid #3c4146 !important;
	margin-bottom: 6px !important;
	padding-bottom: 6px !important;
}
