/*
 * Farm Late Order Grace — presentation only (1.3.1).
 * Every selector is scoped to FLOG's own grace-period markup; nothing here
 * applies outside the late-order grace state, and no theme element is
 * targeted on its own.
 */

/* ---------------------------------------------------------------------
 * 1. Shopping banner during the grace period.
 *    FFL's banner (assets/css/ffl-banner.css) indents its content by the
 *    Store sidebar width (285px) inside a 1366px box, which leaves the long
 *    grace message about 1,080px or less. While the grace message is
 *    showing, use a 1,200px content box without that indent, put the
 *    message on its own line and the countdown on the next one.
 *    Browsers without :has() keep FFL's box but still give the message
 *    its own full-width line.
 * ------------------------------------------------------------------- */
.ffl-banner__inner:has(> .flog-banner__grace) {
	--ffl-sidebar-offset: 0px;
	max-width: 1200px;
	row-gap: 0.5rem;
}

.ffl-banner .ffl-banner__deadline.flog-banner__grace {
	flex: 1 1 100%;
	max-width: 1200px;
	line-height: 1.55;
	text-align: left;
	overflow-wrap: break-word;
}

/* The separator dots FLOG adds would otherwise start a line. */
.ffl-banner .ffl-banner__sep.flog-banner__sep {
	display: none;
}

@media (max-width: 640px) {
	.ffl-banner .ffl-banner__deadline.flog-banner__grace {
		line-height: 1.5;
	}
}

/* ---------------------------------------------------------------------
 * 2. Checkout → Your order → grace-period row beneath Total.
 *    The ID keeps this above typical theme rules that center order-review
 *    cells, without !important; only FLOG's own row is affected.
 * ------------------------------------------------------------------- */
#order_review table tr.flog-grace-row > td,
.woocommerce-checkout-review-order-table tr.flog-grace-row > td {
	text-align: left;
	padding: 14px 18px;
	vertical-align: top;
}

#order_review table tr.flog-grace-row .flog-grace-row__text,
.woocommerce-checkout-review-order-table tr.flog-grace-row .flog-grace-row__text {
	display: block;
	text-align: left;
	line-height: 1.55;
	white-space: normal;
	overflow-wrap: break-word;
}

@media (max-width: 640px) {
	#order_review table tr.flog-grace-row > td,
	.woocommerce-checkout-review-order-table tr.flog-grace-row > td {
		padding: 12px 12px;
	}
}
