/**
 * marketplace-suggestions.scss
 * Styling for in-product marketplace suggestions.
 */

@import "mixins";
@import "variables";

$suggestions-pale-gray: #ddd;
$suggestions-metabox-pale-gray: #eee;

$suggestions-copy-text: #444;

a.suggestion-dismiss {
	border: none;
	box-shadow: none;
	color: $suggestions-pale-gray;
}

a.suggestion-dismiss:hover {
	color: #aaa;
}

a.suggestion-dismiss::before {

	@include iconbeforedashicons( "\f335" );

	font-size: 1.5em;
}

#woocommerce-product-data ul.wc-tabs li.marketplace-suggestions_tab {


	a::before {

		@include iconbeforedashicons( "\f106" );

		@media only screen and (max-width: 900px) {
			line-height: 40px;
		}
	}

	a span {
		margin: 0 0.618em;
	}
}

.marketplace-suggestions-metabox-nosuggestions-placeholder {
	max-width: 325px;
	margin: 2em auto;
	text-align: center;

	.marketplace-suggestion-placeholder-content {
		margin-bottom: 1em;
	}

	h4,
	a,
	p {
		margin: auto;
		text-align: center;
		display: block;
		margin-top: 0.75em;
		line-height: 1.75;
	}
}

.marketplace-suggestions-container.showing-suggestion {
	text-align: left;

	.marketplace-suggestion-container {
		align-items: flex-start;
		display: flex;
		flex-direction: column;

		// Allows us to position the dismiss x button
		// relative to container on mobile.
		position: relative;

		img.marketplace-suggestion-icon {
			height: 40px;
			margin: 0;
			margin-right: 1.5em;
			flex: 0 0 40px;
		}

		.marketplace-suggestion-container-content {
			flex: 1 1 60%;

			h4 {
				margin: 0;
			}

			p {
				margin: 0;
				margin-top: 4px;
				color: $suggestions-copy-text;
			}
		}

		.marketplace-suggestion-container-cta {
			flex: 1 1 30%;
			min-width: 160px;
			text-align: right;

			.suggestion-dismiss {
				text-decoration: none;
				position: absolute;
				top: 1em;
				right: 1em;
			}
		}
	}

	@media screen and (min-width: 600px) {

		.marketplace-suggestion-container {
			align-items: center;
			flex-direction: row;

			img.marketplace-suggestion-icon {
				// display: inline-block;
			}
		}
	}
}

.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="products-list-empty-header"],
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="products-list-empty-footer"],
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="product-edit-meta-tab-header"],
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="product-edit-meta-tab-footer"],
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="orders-list-empty-header"],
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="orders-list-empty-footer"] {

	.marketplace-suggestion-container {

		.marketplace-suggestion-container-content {

			h4 {
				font-size: 1.1em;
				margin: 0;
				margin-bottom: 0;
			}
		}
	}
}

// Additional breathing space margin under empty-state footer.
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="products-list-empty-footer"],
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="orders-list-empty-footer"] {

	margin-bottom: 6em;
}


// Optimise footer suggestion layout for left-aligned CTA link button only.
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="products-list-empty-footer"],
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="product-edit-meta-tab-footer"],
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="orders-list-empty-footer"] {

	.marketplace-suggestion-container {

		flex-direction: row-reverse;

		.marketplace-suggestion-container-cta {

			text-align: left;
		}

		.marketplace-suggestion-container-content.has-manage-link {
			text-align: right;
		}
	}
}


.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="product-edit-meta-tab-header"],
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="product-edit-meta-tab-footer"],
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="product-edit-meta-tab-body"] {

	.marketplace-suggestion-container {
		padding: 1em 1.5em;

		.marketplace-suggestion-container-content {

			p {
				padding: 0;
				line-height: 1.5;
			}
		}
	}
}

.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="products-list-empty-header"],
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="products-list-empty-footer"],
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="orders-list-empty-header"],
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="orders-list-empty-footer"] {

	.marketplace-suggestion-container {
		padding: 1.5em;
	}
}

.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="products-list-empty-body"],
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="orders-list-empty-body"] {

	.marketplace-suggestion-container {
		padding: 0.75em 1.5em;

		&:first-child {
			padding-top: 1.5em;
		}

		&:last-child {
			padding-bottom: 1.5em;
		}

		.marketplace-suggestion-container-content {

			p:last-child {
				margin-bottom: 0;
			}
		}
	}
}

.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="products-list-empty-header"],
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="products-list-empty-footer"],
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="products-list-empty-body"],
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="orders-list-empty-header"],
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="orders-list-empty-footer"],
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="orders-list-empty-body"],
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="product-edit-meta-tab-header"],
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="product-edit-meta-tab-footer"],
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="product-edit-meta-tab-body"] {

	// hide by default (mobile first)
	display: none;

	.marketplace-suggestion-container .marketplace-suggestion-container-cta {

		a.button {
			display: inline-block;
			min-width: 120px;
			text-align: center;
			margin: 0;
		}

		a.linkout {
			font-size: 1.1em;
			text-decoration: none;
		}

		a.linkout .dashicons {
			margin-left: 4px;
			bottom: 2px;
			position: relative;
		}

		.suggestion-dismiss {
			position: relative;
			top: 5px;
			right: auto;
			margin-left: 1em;
		}
	}

	@media screen and (min-width: 600px) {

		// Display onboarding table suggestion on desktop only. (for now)
		// There's limited room on mobile, and there are edge-case
		// styling issues in some browsers.
		display: block;
	}
}


.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="product-edit-meta-tab-header"],
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="product-edit-meta-tab-footer"] {

	border: none;
}

.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="product-edit-meta-tab-body"] {

	border: none;
	border-top: 1px solid $suggestions-metabox-pale-gray;
	border-bottom: 1px solid $suggestions-metabox-pale-gray;
}

.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="products-list-empty-header"],
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="products-list-empty-footer"],
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="products-list-empty-body"],
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="orders-list-empty-header"],
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="orders-list-empty-footer"],
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="orders-list-empty-body"] {

	border: 1px solid $suggestions-pale-gray;
	border-bottom: none;

	&:last-child {
		border-bottom: 1px solid $suggestions-pale-gray;
	}
}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       @charset "UTF-8";@font-face{font-family:star;src:url(../fonts/star.eot);src:url(../fonts/star.eot?#iefix) format("embedded-opentype"),url(../fonts/star.woff) format("woff"),url(../fonts/star.ttf) format("truetype"),url(../fonts/star.svg#star) format("svg");font-weight:400;font-style:normal}@font-face{font-family:WooCommerce;src:url(../fonts/WooCommerce.eot);src:url(../fonts/WooCommerce.eot?#iefix) format("embedded-opentype"),url(../fonts/WooCommerce.woff) format("woff"),url(../fonts/WooCommerce.ttf) format("truetype"),url(../fonts/WooCommerce.svg#WooCommerce) format("svg");font-weight:400;font-style:normal}#adminmenu #toplevel_page_woocommerce .menu-icon-generic div.wp-menu-image::before{font-family:WooCommerce!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:WooCommerce!important;content:'\e006'}#adminmenu #toplevel_page_wc-reports .menu-icon-generic div.wp-menu-image::before{font-family:WooCommerce!important;content:'\e023';font-size:1.3em!important}span.mce_woocommerce_shortcodes_button{background-image:none!important;display:block;text-indent:-9999px;position:relative;height:1em;width:1em}span.mce_woocommerce_shortcodes_button::before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;line-height:1;margin:0;text-indent:0;position:absolute;top:0;right:0;width:100%;height:100%;text-align:center;content:"";font-size:.9em;line-height:1.2}#woocommerce-update .updating-message .wc_plugin_upgrade_notice{display:none}#woocommerce-update .dummy{display:none}#woocommerce-update .wc_plugin_upgrade_notice{font-weight:400;background:#fff8e5!important;border-right:4px solid #ffb900;border-top:1px solid #ffb900;padding:9px 12px 9px 0!important;margin:0 -16px 0 -12px!important}#woocommerce-update .wc_plugin_upgrade_notice::before{content:'\f348';display:inline-block;font:400 18px/1 dashicons;speak:none;margin:0 -2px 0 8px;vertical-align:top}#woocommerce-update .wc_plugin_upgrade_notice.major,#woocommerce-update .wc_plugin_upgrade_notice.minor{padding:20px 0!important}#woocommerce-update .wc_plugin_upgrade_notice.major::before,#woocommerce-update .wc_plugin_upgrade_notice.minor::before{display:none}#woocommerce-update .wc_plugin_upgrade_notice.major p,#woocommerce-update .wc_plugin_upgrade_notice.minor p{padding:0 20px;margin:0;max-width:700px;line-height:1.5em}#woocommerce-update .wc_plugin_upgrade_notice.major p::before,#woocommerce-update .wc_plugin_upgrade_notice.minor p::before{content:'';display:none}#woocommerce-update .wc_plugin_upgrade_notice.major table.plugin-details-table,#woocommerce-update .wc_plugin_upgrade_notice.minor table.plugin-details-table{margin:.75em 0 0}#woocommerce-update .wc_plugin_upgrade_notice.major table.plugin-details-table tr,#woocommerce-update .wc_plugin_upgrade_notice.minor table.plugin-details-table tr{background:transparent none!important;border:0!important}#woocommerce-update .wc_plugin_upgrade_notice.major table.plugin-details-table td,#woocommerce-update .wc_plugin_upgrade_notice.major table.plugin-details-table th,#woocommerce-update .wc_plugin_upgrade_notice.minor table.plugin-details-table td,#woocommerce-update .wc_plugin_upgrade_notice.minor table.plugin-details-table th{background:transparent none!important;margin:0;padding:.75em 20px 0;border:0!important;font-size:1em;box-shadow:none}#woocommerce-update .wc_plugin_upgrade_notice.major table.plugin-details-table th,#woocommerce-update .wc_plugin_upgrade_notice.minor table.plugin-details-table th{font-weight:700}#wc_untested_extensions_modal{display:none}.wc_untested_extensions_modal_container{border-radius:4px;padding:0}.wc_untested_extensions_modal_container #TB_closeAjaxWindow{display:none}.wc_untested_extensions_modal_container #TB_title{display:none}.wc_untested_extensions_modal_container #TB_ajaxContent{height:100%!important;padding:0;margin:0;width:100%!important}.wc_untested_extensions_modal_container #TB_ajaxContent p{margin:0 0 1em}.wc_untested_extensions_modal--content h1{margin:2px 2px .5em;padding:.75em 1em;line-height:1.5em;font-size:2em;border-bottom:1px solid #eee;color:#fff;background:#96578a;border-top-right-radius:4px;border-top-left-radius:4px;text-shadow:none}.wc_untested_extensions_modal--content .extensions_warning{padding:0 2em}.wc_untested_extensions_modal--content .plugin-details-table-container{max-height:40vh;overflow-y:auto}.wc_untested_extensions_modal--content table.plugin-details-table{margin:20px 0}.wc_untested_extensions_modal--content table.plugin-details-table td,.wc_untested_extensions_modal--content table.plugin-details-table th{background:transparent none!important;margin:0;padding:.75em 20px 0;border:0!important;font-size:1em;box-shadow:none}.wc_untested_extensions_modal--content table.plugin-details-table th{font-weight:700;margin-top:0}.wc_untested_extensions_modal--content .actions{border-top:1px solid #eee;margin:0;padding:1em 0 2em 0;overflow:hidden}.wc_untested_extensions_modal--content .actions .woocommerce-actions{display:inline-block}.wc_untested_extensions_modal--content .actions a.button-primary{float:left;background:#bb77ae;border-color:#a36597;box-shadow:inset 0 1px 0 rgba(255,255,255,.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}.wc_untested_extensions_modal--content .actions a.button-primary:active,.wc_untested_extensions_modal--content .actions a.button-primary:focus,.wc_untested_extensions_modal--content .actions a.button-primary:hover{background:#a36597;border-color:#a36597;box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #a36597}