/*
 * Explicitly opt-in contrast layer. Every selector is limited to a
 * BulgaReady-owned component or its temporarily body-ported result list.
 */
.bgcs-delivery[data-bgcs-readable-contrast] {
	--bgcs-surface: var(--bgcs-readable-surface) !important;
	--bgcs-border: var(--bgcs-readable-border) !important;
	--bgcs-muted: var(--bgcs-readable-muted) !important;
	--bgcs-accent: var(--bgcs-readable-accent) !important;
	--bgcs-accent-soft: var(--bgcs-readable-soft) !important;
	--bgcs-native-ui-color: var(--bgcs-readable-text) !important;
	--bgcs-native-heading-color: var(--bgcs-readable-text) !important;
	--bgcs-native-label-color: var(--bgcs-readable-text) !important;
	--bgcs-native-input-color: var(--bgcs-readable-text) !important;
	--bgcs-native-rate-color: var(--bgcs-readable-text) !important;
	background: var(--bgcs-readable-surface) !important;
	border-color: var(--bgcs-readable-border) !important;
	color: var(--bgcs-readable-text) !important;
}

.bgcs-delivery[data-bgcs-readable-contrast] :where(
	.bgcs-methods-intro,
	.bgcs-delivery__heading,
	.bgcs-delivery__field > label,
	.bgcs-delivery__address-street,
	.bgcs-delivery__address-number,
	.bgcs-rate-option--proxy,
	.bgcs-combobox__option,
	.bgcs-locator__toggle,
	.bgcs-delivery__back
) {
	color: var(--bgcs-readable-text) !important;
}

.bgcs-delivery[data-bgcs-readable-contrast] :where(
	.bgcs-delivery__method,
	.bgcs-methods-intro__step,
	.bgcs-delivery__step,
	.bgcs-combobox__option span,
	.bgcs-combobox__empty,
	.bgcs-locator__count,
	.bgcs-locator__privacy,
	.bgcs-locator__status
) {
	color: var(--bgcs-readable-muted) !important;
}

.bgcs-delivery[data-bgcs-readable-contrast] :where(
	.bgcs-combobox > input[role="combobox"],
	.bgcs-delivery__address-input,
	.bgcs-delivery__address-number-input
) {
	background: var(--bgcs-readable-raised) !important;
	border-color: var(--bgcs-readable-border) !important;
	color: var(--bgcs-readable-text) !important;
	caret-color: var(--bgcs-readable-text);
}

.bgcs-delivery[data-bgcs-readable-contrast] :where(
	.bgcs-combobox > input[role="combobox"],
	.bgcs-delivery__address-input,
	.bgcs-delivery__address-number-input
)::placeholder {
	color: var(--bgcs-readable-placeholder) !important;
	opacity: 1 !important;
}

.bgcs-delivery[data-bgcs-readable-contrast] :where(
	.bgcs-combobox > input[role="combobox"],
	.bgcs-delivery__address-input,
	.bgcs-delivery__address-number-input,
	.bgcs-locator__toggle,
	.bgcs-delivery__back
):focus-visible {
	border-color: var(--bgcs-readable-accent) !important;
	box-shadow: 0 0 0 3px var(--bgcs-readable-soft) !important;
	outline: 2px solid var(--bgcs-readable-accent) !important;
	outline-offset: 1px;
}

.bgcs-delivery[data-bgcs-readable-contrast] :where(
	.bgcs-rate-option--proxy.is-selected,
	.bgcs-combobox__option:hover,
	.bgcs-combobox__option.is-active,
	.bgcs-combobox__option[aria-selected="true"]
) {
	background: var(--bgcs-readable-soft) !important;
}

.bgcs-delivery[data-bgcs-readable-contrast] .bgcs-delivery__error {
	color: var(--bgcs-readable-error) !important;
}

.bgcs-combobox__results[data-bgcs-readable-contrast] {
	--bgcs-surface: var(--bgcs-readable-surface) !important;
	--bgcs-border: var(--bgcs-readable-border) !important;
	--bgcs-muted: var(--bgcs-readable-muted) !important;
	--bgcs-accent: var(--bgcs-readable-accent) !important;
	--bgcs-accent-soft: var(--bgcs-readable-soft) !important;
	background: var(--bgcs-readable-surface) !important;
	border-color: var(--bgcs-readable-border) !important;
	color: var(--bgcs-readable-text) !important;
}

.bgcs-combobox__results[data-bgcs-readable-contrast] :where(
	.bgcs-combobox__option span,
	.bgcs-combobox__empty
) {
	color: var(--bgcs-readable-muted) !important;
}

.bgcs-quick-order__dialog[data-bgcs-readable-contrast] {
	--bgcs-qo-text: var(--bgcs-readable-text) !important;
	--bgcs-qo-muted: var(--bgcs-readable-muted) !important;
	--bgcs-qo-border: var(--bgcs-readable-border) !important;
	--bgcs-qo-surface: var(--bgcs-readable-surface) !important;
	--bgcs-qo-soft: var(--bgcs-readable-soft) !important;
	--bgcs-qo-accent: var(--bgcs-readable-accent) !important;
	--bgcs-qo-accent-text: var(--bgcs-readable-surface) !important;
	background: var(--bgcs-readable-surface) !important;
	border-color: var(--bgcs-readable-border) !important;
	color: var(--bgcs-readable-text) !important;
}

.bgcs-quick-order__dialog[data-bgcs-readable-contrast] :where(
	input[type="text"],
	input[type="search"],
	input[type="email"],
	input[type="tel"],
	textarea
) {
	background: var(--bgcs-readable-raised) !important;
	border-color: var(--bgcs-readable-border) !important;
	color: var(--bgcs-readable-text) !important;
	caret-color: var(--bgcs-readable-text);
}

.bgcs-quick-order__dialog[data-bgcs-readable-contrast] :where(
	input[type="text"],
	input[type="search"],
	input[type="email"],
	input[type="tel"],
	textarea
)::placeholder {
	color: var(--bgcs-readable-placeholder) !important;
	opacity: 1 !important;
}

.bgcs-quick-order__dialog[data-bgcs-readable-contrast] :where(
	.bgcs-quick-order__delivery-option,
	.bgcs-quick-order__payment-option,
	.bgcs-quick-order__delivery-details,
	.bgcs-quick-order__review,
	.bgcs-quick-order__product
) {
	background: var(--bgcs-readable-raised) !important;
	border-color: var(--bgcs-readable-border) !important;
	color: var(--bgcs-readable-text) !important;
}

.bgcs-quick-order__dialog[data-bgcs-readable-contrast] .bgcs-quick-order__status.is-error {
	color: var(--bgcs-readable-error) !important;
}

.bgcs-quick-order__dialog[data-bgcs-readable-contrast] .bgcs-quick-order__status.is-success {
	color: var(--bgcs-readable-success) !important;
}

.bgcs-quick-order__results[data-bgcs-readable-contrast] {
	--bgcs-qo-text: var(--bgcs-readable-text) !important;
	--bgcs-qo-muted: var(--bgcs-readable-muted) !important;
	--bgcs-qo-border: var(--bgcs-readable-border) !important;
	--bgcs-qo-surface: var(--bgcs-readable-surface) !important;
	--bgcs-qo-soft: var(--bgcs-readable-soft) !important;
	background: var(--bgcs-readable-surface) !important;
	border-color: var(--bgcs-readable-border) !important;
	color: var(--bgcs-readable-text) !important;
}
