/**
 * menu.scss
 * Styles applied to dashboard menu items added via UserRegistration.
 * Adds icons to top level menu items, etc.
 */

/**
 * Imports
 */
@import "variables/variables";
@import "mixins/mixins";

/**
  * Styling begins
  */
.ur_plugin_upgrade_notice {
	display: flex;
	font-weight: normal;
	color: #000000;
	padding: 1em 0em;
	margin: 9px 0;
	border-top: 2px solid #dba617;

	&::before {
		color: #d54d21;
		content: "\f348";
		display: inline-block;
		font: 400 18px/1 dashicons;
		speak: none;
		margin: 0 8px 0 -2px;
		-webkit-font-smoothing: antialiased;
		-moz-osx-font-smoothing: grayscale;
		vertical-align: top;
		margin-top: 10px;
	}

	p::before {
		content: none;
	}
}

.ur_plugin_upgrade_notice + p {
	display: none;
}

/**
  * Plugin Updater.
  */
.user-registration-updater-licensed {
	th,
	td {
		box-shadow: none !important;
	}
}

.user-registration-deactivation-notice {
	th,
	td {
		box-shadow: none !important;
	}
}

.user-registration-updater-license-key {
	border: 0;
	font-size: 13px;
	font-weight: 400;
	padding: 6px 12px;
	margin: 5px 20px 15px 40px;
	background-color: rgba(0, 0, 0, 0.03);
	line-height: 27px;

	input {
		margin: 0 4px;
		vertical-align: middle;
	}

	&::before {
		color: #32373c;
		content: "\f160";
		margin: 0 8px 0 -2px;
		display: inline-block;
		font: 400 20px/27px dashicons;
		-webkit-font-smoothing: antialiased;
		-moz-osx-font-smoothing: grayscale;
		vertical-align: middle;
	}
}

.wp-list-table {
	&.users {
		.ur-user-notification {
			td {
				padding: 0;
				text-align: center;

				a {
					display: none;
					padding: 10px;
					box-shadow: none;
					background: lighten(#475bb2, 45%);
					border: 1px solid lighten(#475bb2, 25%);
				}
			}
		}
	}
}

/**
  * Progressbar styles
  **/
.user-registration-progress {
	display: flex;
	height: 1rem;
	overflow: hidden;
	font-size: 0.75rem;
	margin: 1rem 0;
	background-color: $color_gray_five;
	border-radius: 0.25rem;

	.user-registration-progress-bar {
		display: flex;
		flex-direction: column;
		justify-content: center;
		color: $white;
		text-align: center;
		white-space: nowrap;
		background-color: $primary_color;
		transition: width 0.6s ease;
	}
}

#toplevel_page_user-registration ul li a[href*="user-registration-addons"] {
	color: #9ef01a !important;
}
#toplevel_page_user-registration ul li a[href*="ur-upgrade-to-pro"] {
	color: #ff8c39 !important;
}

#toplevel_page_user-registration ul li {
	&.is-sub-menu {
		a {
			font-size: 13px;
		}
	}
}

#toplevel_page_user-registration ul li {
	&:not(.is-sub-menu) {
		a[href="admin.php?page=user-registration"] {
			// Show border when dashboard is visible (body has dashboard-visible class)
			body.dashboard-visible & {
				border-top: 1px solid hsla(0, 0%, 100%, 0.2) !important;
				margin-top: 5px !important;
				padding-top: 8px !important;
			}
		}
		a[href="admin.php?page=user-registration-membership"],
		a[href="admin.php?page=user-registration-settings"] {
			border-top: 1px solid hsla(0, 0%, 100%, 0.2);
			margin-top: 5px;
			padding-top: 8px;
		}
	}

	.ur-site-config-count {
		display: inline-block;
		vertical-align: top;
		box-sizing: border-box;
		margin: 1px 0 -1px 2px;
		padding: 0 5px;
		min-width: 18px;
		height: 18px;
		border-radius: 9px;
		background-color: #d63638;
		color: #fff;
		font-size: 11px;
		line-height: 1.6;
		text-align: center;
	}
}

#adminmenu .wp-not-current-submenu .wp-submenu {
	border-left-width: 0px;
}

#adminmenumain {
	#adminmenuback {
		@media screen and (min-width: 783px) {
			z-index: 999;
		}
	}
}
