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

/**
 * Imports
 */
@import 'mixins';
@import 'variables';
@import 'fonts';

/**
 * Styling begins
 */
#adminmenu #toplevel_page_kkart .menu-icon-generic div.wp-menu-image::before {
	font-family: 'Kkart' !important;
	content: '\e03d';
}

#adminmenu #menu-posts-product .menu-icon-post div.wp-menu-image::before,
#adminmenu #menu-posts-product .menu-icon-product div.wp-menu-image::before {
	font-family: 'Kkart' !important;
	content: '\e006';
}

#adminmenu #toplevel_page_wc-reports .menu-icon-generic div.wp-menu-image::before {
	font-family: 'Kkart' !important;
	content: '\e023';
	font-size: 1.3em !important;
}

span.mce_kkart_shortcodes_button {
	background-image: none !important;
	@include ir();

	&::before {
		@include icon( '\e01d' );
		font-size: 0.9em;
		line-height: 1.2;
	}
}

#kkart-update {
	.updating-message {
		.kkart_plugin_upgrade_notice {
			display: none;
		}
	}
	.dummy {
		display: none;
	}
	.kkart_plugin_upgrade_notice {
		font-weight: normal;
		background: #FFF8E5 !important;
		border-left: 4px solid #FFB900;
		border-top: 1px solid #FFB900;
		padding: 9px 0 9px 12px !important;
		margin: 0 -12px 0 -16px !important;

		&::before {
			content: '\f348';
			display: inline-block;
			font: 400 18px/1 dashicons;
			speak: none;
			margin: 0 8px 0 -2px;
			vertical-align: top;
		}

		&.minor,
		&.major {
			padding: 20px 0 !important;
			&::before {
				display: none;
			}
			p {
				padding: 0 20px;
				margin: 0;
				max-width: 700px;
				line-height: 1.5em;

				&::before {
					content: '';
					display: none;
				}
			}
			table.plugin-details-table {
				margin: .75em 0 0;
				tr {
					background: transparent none !important;
					border: 0 !important;
				}
				th, td {
					background: transparent none !important;
					margin: 0;
					padding: .75em 20px 0;
					border: 0 !important;
					font-size: 1em;
					box-shadow: none;
				}
				th {
					font-weight: bold;
				}
			}
		}
	}
}

#kkart_untested_extensions_modal {
	display: none;
}

.kkart_untested_extensions_modal_container {
	border-radius: 4px;
	padding: 0;

	#TB_closeAjaxWindow {
		display: none;
	}

	#TB_title {
		display: none;
	}

	#TB_ajaxContent {
		height: 100% !important;
		padding: 0;
		margin: 0;
		width: 100% !important;

		p {
			margin: 0 0 1em;
		}
	}
}

.kkart_untested_extensions_modal--content {
	h1 {
		margin: 2px 2px 0.5em;
		padding: .75em 1em;
		line-height: 1.5em;
		font-size: 2em;
		border-bottom: 1px solid #eee;
		color: #fff;
		background: #96578A;
		border-top-left-radius: 4px;
		border-top-right-radius: 4px;
		text-shadow: none;
	}

	.extensions_warning {
		padding: 0 2em;
	}

	.plugin-details-table-container {
		max-height: 40vh;
		overflow-y: auto;
	}

	table.plugin-details-table {
		margin: 20px 0;
		th, td {
			background: transparent none !important;
			margin: 0;
			padding: .75em 20px 0;
			border: 0 !important;
			font-size: 1em;
			box-shadow: none;
		}
		th {
			font-weight: bold;
			margin-top: 0;
		}
	}

	.actions {
		border-top: 1px solid #eee;
		margin: 0;
		padding: 1em 0 2em 0;
		overflow: hidden;

		.kkart-actions {
			display: inline-block;
		}

		a.button-primary {
			float: right;
			background: #bb77ae;
			border-color: #a36597;
			box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 0 #a36597;
			color: #fff;
			text-shadow: 0 -1px 1px #a36597, 1px 0 1px #a36597, 0 1px 1px #a36597, -1px 0 1px #a36597;

			&:hover, &:focus, &:active {
				background: #a36597;
				border-color: #a36597;
				box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 0 #a36597;
			}
		}
	}
}
