/* Site-owned contract v1. This CSS is never shipped by Core or AWS Theme. */
.wp-block-image img,
.wp-block-post-featured-image img {
	border-radius: var(--wp--custom--aws--radius--image);
	box-shadow: var(--wp--custom--aws--shadow, none);
}

.wp-block-button .wp-block-button__link {
	border-radius: var(--wp--custom--aws--radius--button);
	box-shadow: var(--wp--custom--aws--shadow, none);
}

:is(.aws-section, .aws-section-inverse, .wp-block-group.is-style-aws-section) {
	border-radius: var(--wp--custom--aws--radius--section);
	box-shadow: var(--wp--custom--aws--shadow, none);
}

:where(a, button, input, textarea, select, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--custom--aws--color--focus);
	outline-offset: 3px;
}

:where(.wp-block-navigation) .wp-block-navigation-item__content:hover,
:where(.wp-block-navigation) .wp-block-navigation-item__content:focus-visible {
	color: var(--wp--custom--aws--color--menu-hover);
}

:where(.wp-block-navigation) .current-menu-item > .wp-block-navigation-item__content,
:where(.wp-block-navigation) .current-menu-ancestor > .wp-block-navigation-item__content,
:where(.wp-block-navigation) [aria-current="page"] {
	color: var(--wp--custom--aws--color--menu-active);
	text-decoration: underline;
	text-underline-offset: 0.25em;
}

:where(.wp-block-navigation) .wp-block-navigation__submenu-container,
:where(.wp-block-navigation) .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--custom--aws--color--submenu-background);
	color: var(--wp--custom--aws--color--submenu-text);
}

:where(input:not([type="submit"], [type="button"], [type="checkbox"], [type="radio"]), textarea, select) {
	background: var(--wp--custom--aws--color--field-background);
	border: 1px solid var(--wp--custom--aws--color--field-border);
	color: var(--wp--custom--aws--color--field-text);
	font: inherit;
}

.aws-section {
	background: var(--wp--custom--aws--color--section-background);
	color: var(--wp--custom--aws--color--section-text);
}

.aws-section-inverse {
	background: var(--wp--custom--aws--color--inverse-background);
	color: var(--wp--custom--aws--color--inverse-text);
}

.aws-site-footer {
	background: var(--wp--custom--aws--color--footer-background);
	color: var(--wp--custom--aws--color--footer-text);
}

:is(.aws-section, .aws-section-inverse, .aws-site-footer) .wp-block-heading:not(.has-text-color) {
	color: inherit;
}

/* Used only when the site explicitly enables the Commerce style contract. */
.aws-commerce .wc-block-components-product-price,
.aws-commerce .price {
	color: var(--wp--custom--aws--color--shop-price);
}

.aws-commerce .wc-block-components-product-sale-badge,
.aws-commerce .onsale {
	background: var(--wp--custom--aws--color--shop-sale-background);
	color: var(--wp--custom--aws--color--shop-sale-text);
}

.aws-commerce .wc-block-components-notice-banner,
.aws-commerce .woocommerce-message {
	background: var(--wp--custom--aws--color--shop-notice-background);
	color: var(--wp--custom--aws--color--shop-notice-text);
}

.aws-commerce :is(.products .add_to_cart_button, .wp-block-woocommerce-product-button .wp-block-button__link) {
	background: var(--wp--custom--aws--color--shop-catalogue-cart-background);
	border-color: var(--wp--custom--aws--color--shop-catalogue-cart-border);
	color: var(--wp--custom--aws--color--shop-catalogue-cart-text);
}

.aws-commerce :is(.products .add_to_cart_button, .wp-block-woocommerce-product-button .wp-block-button__link):is(:hover, :focus-visible) {
	background: var(--wp--custom--aws--color--shop-catalogue-cart-hover-background);
	border-color: var(--wp--custom--aws--color--shop-catalogue-cart-hover-border);
	color: var(--wp--custom--aws--color--shop-catalogue-cart-hover-text);
}

.aws-commerce :is(.single_add_to_cart_button, .wp-block-woocommerce-add-to-cart-form .wp-element-button) {
	background: var(--wp--custom--aws--color--shop-cart-background);
	border-color: var(--wp--custom--aws--color--shop-cart-border);
	color: var(--wp--custom--aws--color--shop-cart-text);
}

.aws-commerce :is(.single_add_to_cart_button, .wp-block-woocommerce-add-to-cart-form .wp-element-button):is(:hover, :focus-visible) {
	background: var(--wp--custom--aws--color--shop-cart-hover-background);
	border-color: var(--wp--custom--aws--color--shop-cart-hover-border);
	color: var(--wp--custom--aws--color--shop-cart-hover-text);
}

.aws-commerce :is(.single_add_to_cart_button, .wp-block-woocommerce-add-to-cart-form .wp-element-button):is(:disabled, [aria-disabled="true"], .disabled) {
	background: var(--wp--custom--aws--color--shop-cart-disabled-background);
	border-color: var(--wp--custom--aws--color--shop-cart-disabled-border);
	color: var(--wp--custom--aws--color--shop-cart-disabled-text);
}

.aws-commerce :is(.checkout-button, #place_order, .wc-block-cart__submit-button, .wc-block-components-checkout-place-order-button) {
	background: var(--wp--custom--aws--color--shop-checkout-background);
	border-color: var(--wp--custom--aws--color--shop-checkout-border);
	color: var(--wp--custom--aws--color--shop-checkout-text);
}

.aws-commerce :is(.checkout-button, #place_order, .wc-block-cart__submit-button, .wc-block-components-checkout-place-order-button):is(:hover, :focus-visible) {
	background: var(--wp--custom--aws--color--shop-checkout-hover-background);
	border-color: var(--wp--custom--aws--color--shop-checkout-hover-border);
	color: var(--wp--custom--aws--color--shop-checkout-hover-text);
}
