/*
 * A sovlix.com campaign on the Upgrade page (assets/js/sale-pricing.js,
 * includes/Admin/Mhub_Sale_Pricing.php): the sale header above the page, and
 * in Freemius' pricing table the standard price struck through and the percent
 * off, above the sale price.
 *
 * The header's rules are scoped under .mhub-sale-header and the table's under
 * #fs_pricing, the page's own wrapper, so nothing here can reach another
 * screen. The file is loaded on this page only.
 */

/*
 * The sale header: the Upgrade page's own heading during a campaign, in the
 * place the sale bar has on other screens. Its colours are the campaign tone's
 * variables from campaign-bar.css (.mhub-cbar--<tone>), with the ember values as
 * the fallback, so it always matches the bar and sovlix.com. Only the clock's
 * digits change; nothing animates.
 */
.mhub-sale-header {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	margin: 0 0 0 -20px;
	padding: 28px 16px;
	background: linear-gradient(90deg, var(--cbar-edge, #120c12) 0%, var(--cbar-shoulder, #24101c) 26%, var(--cbar-mid, #46122a) 50%, var(--cbar-shoulder, #24101c) 74%, var(--cbar-edge, #120c12) 100%);
	color: var(--cbar-text, #f5f5f7);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	text-align: center;
}

.mhub-sale-header *,
.mhub-sale-header *::before,
.mhub-sale-header *::after {
	box-sizing: border-box;
}

.mhub-sale-header .mhub-sale-header__name {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	color: #ffffff;
	font-size: 26px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.02em;
}

.mhub-sale-header .mhub-sale-header__name svg {
	display: block;
	flex: none;
	color: var(--cbar-accent, #ffb224);
}

.mhub-sale-header .mhub-sale-header__name em {
	color: var(--cbar-accent, #ffb224);
	font-style: normal;
}

.mhub-sale-header .mhub-sale-header__deal {
	margin: 0;
	padding: 0;
	color: var(--cbar-text, #f5f5f7);
	font-size: 15px;
	line-height: 1.4;
}

.mhub-sale-header .mhub-sale-header__deal b {
	color: #ffffff;
	font-weight: 700;
}

.mhub-sale-header .mhub-sale-header__clock {
	display: inline-flex;
	gap: 8px;
	min-height: 60px;
	font-variant-numeric: tabular-nums;
}

.mhub-sale-header .mhub-sale-header__unit {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	width: 60px;
	height: 60px;
	border-radius: 12px;
	background: rgba(20, 10, 4, 0.5);
	box-shadow: inset 0 1px 0 rgba(255, 230, 200, 0.14);
}

.mhub-sale-header .mhub-sale-header__unit b {
	color: var(--cbar-text, #f5f5f7);
	font-size: 22px;
	font-weight: 700;
	line-height: 1;
}

.mhub-sale-header .mhub-sale-header__unit i {
	color: var(--cbar-unit, #d9c2cc);
	font-size: 11px;
	font-style: normal;
	line-height: 1;
}

.mhub-sale-header .mhub-sale-header__unit.is-s {
	box-shadow: inset 0 0 0 1px rgba(255, 159, 10, 0.45);
}

.mhub-sale-header .mhub-sale-header__unit.is-s b {
	color: var(--cbar-accent, #ffb224);
}

.mhub-sale-header .mhub-sale-header__unit.is-s i {
	color: var(--cbar-tick-unit, #ffc870);
}

@media screen and (max-width: 782px) {
	.mhub-sale-header {
		margin-left: -10px;
	}
}

/*
 * A phone: WordPress lays its toolbar (46px) over the top of the page there,
 * so the header keeps its first line clear of it. WordPress also pads the page
 * body by those 46px to clear the toolbar; the header has already done that,
 * so the body's padding is dropped while the header is on the page. Whatever
 * sits between the two (a help strip) keeps its place.
 */
@media screen and (max-width: 600px) {
	.mhub-sale-header {
		padding: 66px 12px 22px;
	}

	.mhub-sale-header ~ #wpbody {
		padding-top: 0;
	}

	.mhub-sale-header .mhub-sale-header__name {
		font-size: 22px;
	}
}

.rtl .mhub-sale-header {
	margin: 0 -20px 0 0;
}

@media screen and (max-width: 782px) {
	.rtl .mhub-sale-header {
		margin: 0 -10px 0 0;
	}
}

#fs_pricing .mhub-sale {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 4px 8px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	line-height: 1.3;
	visibility: visible;
}

/* #50575e on white, 7.33:1. */
#fs_pricing .mhub-sale .mhub-sale__was {
	color: #50575e;
	font-size: 16px;
	font-weight: 400;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

#fs_pricing .mhub-sale .mhub-sale__was s {
	text-decoration: line-through;
}

/* The `warn` pair from DESIGN.md: #92400e on #fef3c7, measured 6.37:1. */
#fs_pricing .mhub-sale .mhub-sale__off {
	padding: 3px 9px;
	border-radius: 999px;
	background: #fef3c7;
	color: #92400e;
	font-size: 12.5px;
	font-weight: 700;
	white-space: nowrap;
}
