/*
 * CREDA Events Mods: member price callout and [cem_account_link].
 *
 * Every visual value is a custom property declared on the component, so a theme
 * restyles it by setting the variable, for example:
 *   .single-product .cem-mp-callout { --cem-mp-accent: #00704a; --cem-mp-radius: 6px; }
 * Font family is inherited. Defaults meet WCAG 2.2 AA (text 4.5:1, UI 3:1).
 */

:where(.cem-mp-callout, .cem-account-link) {
	--cem-mp-bg: #f4f7f4;
	--cem-mp-border: #c3cec6;
	--cem-mp-accent: #2a6b3c;
	--cem-mp-text: #1d2733;
	--cem-mp-muted: #4a5560;
	--cem-mp-radius: 0px;
	--cem-mp-padding: 14px 16px;
	--cem-mp-gap: 8px;
	--cem-mp-font-size: 1rem;
	--cem-mp-small-size: 0.875rem;
	--cem-mp-btn-bg: #1f5c34;
	--cem-mp-btn-text: #ffffff;
	--cem-mp-btn-border: #1f5c34;
	--cem-mp-btn-hover-bg: #15422a;
	--cem-mp-btn-hover-text: #ffffff;
	--cem-mp-btn-height: 44px;
	--cem-mp-focus: #1a4fb4;
	--cem-mp-account-color: inherit;
	--cem-mp-account-border: currentColor;
}

/* ---- Price callout -------------------------------------------------------- */

.cem-mp-callout {
	display: block;
	box-sizing: border-box;
	margin-top: var(--cem-mp-gap);
	color: var(--cem-mp-text);
	font-size: var(--cem-mp-font-size);
	font-weight: 400;
	line-height: 1.45;
	text-align: start;
}

.cem-mp-callout--guest,
.cem-mp-callout--nonmember,
.cem-mp-callout--expired {
	padding: var(--cem-mp-padding);
	background: var(--cem-mp-bg);
	border: 1px solid var(--cem-mp-border);
	border-inline-start: 4px solid var(--cem-mp-accent);
	border-radius: var(--cem-mp-radius) !important;
}

.cem-mp-callout__heading {
	display: block;
	font-weight: 600;
}

.cem-mp-callout__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: var(--cem-mp-btn-height);
	margin-top: var(--cem-mp-gap);
	padding: 0.5em 1.25em;
	background: var(--cem-mp-btn-bg);
	color: var(--cem-mp-btn-text);
	border: 2px solid var(--cem-mp-btn-border);
	border-radius: var(--cem-mp-radius) !important;
	font-size: var(--cem-mp-font-size);
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
}

.cem-mp-callout__button:hover {
	background: var(--cem-mp-btn-hover-bg);
	color: var(--cem-mp-btn-hover-text);
	text-decoration: none;
}

.cem-mp-callout__button:focus-visible,
.cem-mp-callout__link:focus-visible,
.cem-account-link a:focus-visible,
a.cem-account-link:focus-visible {
	outline: 3px solid var(--cem-mp-focus);
	outline-offset: 2px;
}

.cem-mp-callout__helper,
.cem-mp-callout__trouble {
	display: block;
	margin-top: var(--cem-mp-gap);
	color: var(--cem-mp-muted);
	font-size: var(--cem-mp-small-size);
}

.cem-mp-callout__trouble {
	margin-top: 2px;
}

.cem-mp-callout__link {
	color: inherit;
	text-decoration: underline;
}

/* Member line: compact, no panel. */
.cem-mp-callout--member {
	display: flex;
	align-items: center;
	gap: 6px;
	color: var(--cem-mp-accent);
	font-size: var(--cem-mp-small-size);
	font-weight: 600;
}

.cem-mp-callout__icon {
	flex: none;
	width: 1em;
	height: 1em;
}

/* Product lists: one quiet line. */
.cem-mp-callout--compact {
	font-size: var(--cem-mp-small-size);
}

/* ---- [cem_account_link] --------------------------------------------------- */

a.cem-account-link--guest,
.cem-account-link--signed-in a {
	display: inline-flex;
	align-items: center;
	box-sizing: border-box;
	min-height: var(--cem-mp-btn-height);
	padding: 0.4em 0.9em;
	color: var(--cem-mp-account-color);
	font-size: var(--cem-mp-font-size);
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
}

a.cem-account-link--guest {
	border: 1px solid var(--cem-mp-account-border);
	border-radius: var(--cem-mp-radius) !important;
}

a.cem-account-link--guest:hover,
.cem-account-link--signed-in a:hover {
	text-decoration: underline;
}

.cem-account-link--signed-in {
	display: inline-flex;
	align-items: center;
	gap: var(--cem-mp-gap);
}

/* ---- Variation dropdown: the theme clipped "Choose an option" ------------- */

.single-product .variations_form select {
	height: auto;
	line-height: 1.4;
	padding-block: 0.6em;
}
