/**
 * NC Pre-Orders front end styles.
 *
 * Colours are taken from CSS variables where the theme defines them, with
 * literal fallbacks so the plugin still looks right on any other theme.
 */

.nc-preorder-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 9;
	display: inline-block;
	padding: 4px 10px;
	border-radius: 3px;
	background: var(--mn-orange, #e8842a);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	line-height: 1.4;
	text-transform: uppercase;
	white-space: nowrap;
}

.nc-preorder-badge--inline {
	position: static;
	top: auto;
	left: auto;
}

.nc-preorder-notice {
	margin: 0 0 1.5em;
	padding: 16px 18px;
	border: 1px solid var(--mn-orange-muted, rgba(232, 132, 42, 0.5));
	border-radius: 6px;
	background: var(--mn-bg-card, rgba(232, 132, 42, 0.06));
}

.nc-preorder-notice--checkout {
	margin-top: 1.5em;
}

.nc-preorder-notice__tag {
	display: inline-block;
	margin-bottom: 8px;
	color: var(--mn-orange, #e8842a);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.nc-preorder-notice__text {
	margin: 0;
	font-size: 0.95em;
	line-height: 1.6;
}

.nc-preorder-availability {
	color: var(--mn-orange, #e8842a);
	font-weight: 600;
}

/* Countdown */

.nc-preorder-countdown {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 14px;
}

.nc-preorder-countdown__unit {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 58px;
	padding: 8px 6px;
	border: 1px solid var(--mn-orange-muted, rgba(232, 132, 42, 0.35));
	border-radius: 4px;
}

.nc-preorder-countdown__value {
	font-size: 1.4em;
	font-weight: 700;
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
}

.nc-preorder-countdown__label {
	margin-top: 2px;
	font-size: 10px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	opacity: 0.7;
}

/* In the homepage hero the countdown sits under the buttons, so it needs a
   little more breathing room than it does on a product page. */
.nc-preorder-countdown--hero {
	margin-top: 22px;
}

.nc-preorder-countdown.is-released {
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
}

/* Product cards need a positioning context for the badge to sit on the image. */

.woocommerce ul.products li.product,
.nc-preorder-product .woocommerce-product-gallery {
	position: relative;
}

@media (max-width: 480px) {
	.nc-preorder-countdown__unit {
		min-width: 48px;
	}

	.nc-preorder-countdown__value {
		font-size: 1.15em;
	}
}
