/* ==========================================================================
   WPLoyalty: the cart and checkout "earn points" message
   (.wlr-message-info:is(.wlr_points_rewards_earn_points, .wlr_thankyou_message))

   In the site's look instead of WPLoyalty's green box: square corners, a
   white box with a 1px light rule and a 4px pink left edge, the site's ink
   text with the points in pink, and links in ink turning pink on hover. Colors are the same as --bacm-*
   in auth-pages.css.

   WPLoyalty writes its colors as inline styles (from WPLoyalty > Settings),
   so these use !important to win. Display is left alone so the plugin can
   still hide the box when there are no points to show.

   Loaded on every front-end page (functions.php), since the message can be
   refreshed into the cart by AJAX and placed anywhere by shortcode.
   ========================================================================== */

.wlr-message-info:is(.wlr_points_rewards_earn_points, .wlr_thankyou_message) {
	--bacmart-loyalty-shade: #f7f7f8;
	--bacmart-loyalty-rule: #e4e4e6;
	--bacmart-loyalty-ink: #101012;
	--bacmart-loyalty-accent: #d32b93;

	box-sizing: border-box;
	margin: 0 0 25px !important;
	padding: 14px 18px !important;
	border: 1px solid var(--bacmart-loyalty-rule) !important;
	border-left: 4px solid var(--bacmart-loyalty-accent) !important;
	border-radius: 0 !important;
	background: #ffffff !important;
	box-shadow: none !important;
	color: var(--bacmart-loyalty-ink) !important;
	font-family: inherit !important;
	font-size: 14px !important;
	font-weight: 400 !important;
	line-height: 1.5 !important;
	text-align: left;
	-webkit-font-smoothing: antialiased;
}

/* Everything inside takes the ink color and no boxes of its own. */
.wlr-message-info:is(.wlr_points_rewards_earn_points, .wlr_thankyou_message) * {
	border-color: transparent !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	color: var(--bacmart-loyalty-ink) !important;
	font-family: inherit !important;
}

/* No icon: WPLoyalty's star doesn't recolor cleanly, and the site's other
   notices and panels carry none. The text runs from the box's left edge. */
.wlr-message-info:is(.wlr_points_rewards_earn_points, .wlr_thankyou_message) :is(svg, img, i, .wlr-message-icon, [class*="icon"]) {
	display: none !important;
}

.wlr-message-info:is(.wlr_points_rewards_earn_points, .wlr_thankyou_message) > * {
	margin-left: 0 !important;
	padding-left: 0 !important;
}

.wlr-message-info:is(.wlr_points_rewards_earn_points, .wlr_thankyou_message) p {
	margin: 0 !important;
}

/* The points ("215 points"), bolded in the message text under
   WPLoyalty > Settings, in the site's pink. */
.wlr-message-info:is(.wlr_points_rewards_earn_points, .wlr_thankyou_message) :is(strong, b) {
	color: var(--bacmart-loyalty-accent) !important;
	font-weight: 600 !important;
}

.wlr-message-info:is(.wlr_points_rewards_earn_points, .wlr_thankyou_message) a {
	text-decoration: underline !important;
	text-underline-offset: 2px;
	transition: color 0.14s ease;
}

.wlr-message-info:is(.wlr_points_rewards_earn_points, .wlr_thankyou_message) a:is(:hover, :focus-visible) {
	color: var(--bacmart-loyalty-accent) !important;
}

.wlr-message-info:is(.wlr_points_rewards_earn_points, .wlr_thankyou_message) :focus-visible {
	outline: 2px solid var(--bacmart-loyalty-ink);
	outline-offset: 2px;
}
