/* Free gift cart line, see inc/woocommerce/free-gift.php */

/* Inline (not flex) so the name shares the text baseline of whatever
   precedes it, e.g. "1x" in the checkout order summary. */
.orthexa-free-gift-name {
	display: inline;
	font-weight: 700;
	color: #5e8a1c;
}

.orthexa-free-gift-name .orthexa-free-gift-icon {
	display: inline-block !important;
	width: 18px;
	height: 18px;
	margin: 0 6px 0 0 !important;
	vertical-align: -3px;
}

.orthexa-free-gift-price del {
	opacity: 0.6;
}

.orthexa-free-gift-price ins,
.orthexa-free-gift-price ins .amount {
	text-decoration: none;
	color: #5e8a1c !important;
	font-weight: 700;
}

/* Side cart: the gift row becomes a soft green card. */
.fkcart--item:has(.orthexa-free-gift-name) {
	position: relative;
	margin: 6px 16px 12px;
	padding: 12px !important;
	background: linear-gradient(135deg, #f1f9e4 0%, #fbfef6 100%);
	border: 1.5px dashed #8cb83b;
	border-radius: 12px;
}

.fkcart--item:has(.orthexa-free-gift-name) .fkcart-image-wrapper {
	background: #fff;
	border-color: #d5e8b4;
}

.orthexa-free-gift-note {
	margin-top: 3px;
	color: #6b7280;
	font-size: 13px;
	line-height: 1.35;
}

/* Black Friday: the gift card follows the Black Friday notice style
   (body.black-friday is set while Black Friday runs). */
body.black-friday .fkcart--item:has(.orthexa-free-gift-name) {
	margin-top: 16px;
	background:
		radial-gradient(120% 140% at 100% 0%, rgba(255, 106, 0, .28) 0%, rgba(255, 106, 0, 0) 55%),
		radial-gradient(120% 140% at 0% 100%, rgba(216, 31, 38, .32) 0%, rgba(216, 31, 38, 0) 60%),
		#0b0b0d;
	border: 0;
	box-shadow: 0 8px 22px rgba(11, 11, 13, .22);
}

body.black-friday .fkcart--item:has(.orthexa-free-gift-name)::before {
	content: var(--bf-tag, 'Black Friday');
	position: absolute;
	top: -9px;
	left: 12px;
	padding: 4px 9px;
	background: linear-gradient(90deg, #d81f26, #ff6a00);
	color: #fff;
	border-radius: 999px;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: .14em;
	line-height: 1;
	text-transform: uppercase;
}

body.black-friday .fkcart--item:has(.orthexa-free-gift-name) .fkcart-image-wrapper {
	border-color: rgba(255, 255, 255, .15);
}

body.black-friday .fkcart--item .orthexa-free-gift-name {
	color: #fff;
}

body.black-friday .fkcart--item .orthexa-free-gift-name .orthexa-free-gift-icon {
	filter: brightness(0) invert(1);
}

body.black-friday .fkcart--item .orthexa-free-gift-note {
	color: rgba(255, 255, 255, .7);
}

body.black-friday .fkcart--item .orthexa-free-gift-price del,
body.black-friday .fkcart--item .orthexa-free-gift-price del .amount {
	color: rgba(255, 255, 255, .85) !important;
}

body.black-friday .fkcart--item .orthexa-free-gift-price ins,
body.black-friday .fkcart--item .orthexa-free-gift-price ins .amount {
	color: #ff8a3d !important;
}

/* Black Friday gift thumbnail: white gift on the Black Friday gradient. */
body.black-friday .fkcart--item:has(.orthexa-free-gift-name) .fkcart-image-wrapper {
	background: url('../../../images/free-gift-black-friday.png') center / 62% no-repeat, linear-gradient(135deg, #d81f26, #ff6a00);
	border: 0;
}

body.black-friday .fkcart--item:has(.orthexa-free-gift-name) .fkcart-image-wrapper img {
	opacity: 0;
}
