/*
 * Default styling for products outside the current user's plan
 * (BD_Cat_Shortcodes_Plan_Status). Overridable from a child theme or Divi's own
 * Theme Options > Custom CSS via normal CSS specificity/cascade.
 */

/* Grey for out-of-plan card text: 4.74:1 on white (AA). No bd-core-shared token
   holds this neutral grey; the token greys are blue-tinted. */
:root {
	--bd-cs-out-of-plan-text: #737373;
}

/* Anything that is not the shared book card (WooCommerce/Divi loop
   li.product, reached through post_class): the whole element is faded. */
.bd-cs-out-of-plan:not(.bd-book-card) {
	opacity: 0.45;
	filter: grayscale(1);
	transition: opacity 0.2s ease, filter 0.2s ease;
}

.bd-cs-out-of-plan:not(.bd-book-card):hover {
	opacity: 0.7;
}

/* The shared book card: only the cover fades, the text stays solid grey so it
   keeps AA contrast. */
.bd-book-card.bd-cs-out-of-plan .bd-book-card__cover img {
	opacity: 0.45;
	filter: grayscale(1);
	transition: opacity 0.2s ease, filter 0.2s ease;
}

.bd-book-card.bd-cs-out-of-plan:hover .bd-book-card__cover img {
	opacity: 0.7;
}

.bd-book-card.bd-cs-out-of-plan .bd-book-card__isbn,
.bd-book-card.bd-cs-out-of-plan .bd-book-card__title,
.bd-book-card.bd-cs-out-of-plan .bd-book-card__title a,
.bd-book-card.bd-cs-out-of-plan .bd-book-card__title a:hover,
.bd-book-card.bd-cs-out-of-plan .bd-book-card__title a:focus-visible,
.bd-book-card.bd-cs-out-of-plan .bd-book-card__authors,
.bd-book-card.bd-cs-out-of-plan .bd-book-card__authors a,
.bd-book-card.bd-cs-out-of-plan .bd-book-card__editors,
.bd-book-card.bd-cs-out-of-plan .bd-book-card__editors a,
.bd-book-card.bd-cs-out-of-plan .bd-book-card__editors-label,
.bd-book-card.bd-cs-out-of-plan .bd-book-card__meta,
.bd-book-card.bd-cs-out-of-plan .bd-book-card__meta a,
.bd-book-card.bd-cs-out-of-plan .bd-book-card__meta--subtle {
	color: var(--bd-cs-out-of-plan-text);
}

.bd-book-card.bd-cs-out-of-plan .bd-book-card__title {
	font-weight: var(--bd-fw-heading, 700);
}

/* The "..." actions button. */
.bd-book-card.bd-cs-out-of-plan .bd-btn--icon {
	border-color: var(--bd-cs-out-of-plan-text);
	color: var(--bd-cs-out-of-plan-text);
}

/* Any chip tone becomes a grey outline; white rather than transparent so a
   chip laid over the cover stays readable. The border sits inside the chip's
   fixed height. */
.bd-book-card.bd-cs-out-of-plan .bd-book-card__chip {
	box-sizing: border-box;
	border: 1px solid var(--bd-cs-out-of-plan-text);
	line-height: calc(var(--bd-card-chip-h, 21px) - 2px);
	background-color: var(--bd-white, #FFFFFF);
	color: var(--bd-cs-out-of-plan-text);
}
