/* Cart and checkout blocks in the store's look. */

.wc-block-cart, .wc-block-checkout { font-family: var(--mp-sans); color: var(--mp-ink); }
.wc-block-components-sidebar-layout, .wc-block-components-main, .wc-block-components-sidebar { min-width: 0; }

/* Headings */
.wc-block-components-checkout-step__title,
.wc-block-components-checkout-order-summary__title-text,
.wc-block-cart__totals-title,
.wc-block-components-title.wc-block-components-title {
	font-family: var(--mp-display);
	font-size: 1.3rem;
	font-weight: 600;
	color: var(--mp-ink);
	text-transform: none;
	letter-spacing: 0;
}
.wc-block-components-checkout-step__description { color: var(--mp-muted); }
.wc-block-cart-items__header { color: var(--mp-muted); font-size: .78rem; font-weight: 800; letter-spacing: .08em; }
.wc-block-cart__totals-title { padding-bottom: 12px; }

/* Inputs */
.wc-block-components-text-input input,
.wc-block-components-address-form input:not([type="checkbox"]),
.wc-blocks-components-select__select,
.wc-block-components-textarea {
	border: 1px solid #e2c6a8 !important;
	border-radius: .75rem !important;
	background-color: var(--mp-card) !important;
	color: var(--mp-ink) !important;
	font-family: var(--mp-sans) !important;
	transition: border-color .15s, box-shadow .15s;
}
.wc-blocks-components-select__container { border-radius: .75rem; }
.wc-block-components-text-input label,
.wc-blocks-components-select__label { color: var(--mp-muted); }
.wc-block-components-text-input input:focus,
.wc-block-components-address-form input:not([type="checkbox"]):focus,
.wc-blocks-components-select__select:focus,
.wc-block-components-textarea:focus {
	border-color: var(--mp-primary) !important;
	box-shadow: 0 0 0 2px rgba(201, 84, 10, .25) !important;
	outline: 0 !important;
}
.wc-block-components-text-input.has-error input,
.wc-block-components-address-form .has-error input { border-color: #b3261e !important; }
.wc-block-components-validation-error { color: #b3261e; font-size: .85rem; }

/* Checkboxes and radio buttons */
.wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"] {
	border: 1px solid #c9a886;
	border-radius: .35rem;
	background: var(--mp-card);
}
.wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"]:checked {
	border-color: var(--mp-primary);
	background: var(--mp-primary);
}
.wc-block-components-checkbox .wc-block-components-checkbox__mark { fill: #fff; }
.wc-block-components-checkbox__label, .wc-block-checkout__terms { color: var(--mp-ink); font-size: .92rem; line-height: 1.5; }
.wc-block-components-checkbox.has-error .wc-block-components-checkbox__input[type="checkbox"] { border-color: #b3261e; }
.wc-block-components-checkbox.has-error .wc-block-components-checkbox__label { color: #b3261e; }
.wc-block-components-radio-control__input { border-color: #c9a886 !important; }
.wc-block-components-radio-control__input:checked { border-color: var(--mp-primary) !important; }
.wc-block-components-radio-control__input:checked::before { background: var(--mp-primary) !important; }
.wc-block-components-radio-control--highlight-checked {
	overflow: hidden;
	border: 1px solid var(--mp-border);
	border-radius: var(--mp-radius);
	background: var(--mp-card);
}
.wc-block-components-radio-control--highlight-checked::after { display: none; }
.wc-block-components-radio-control--highlight-checked div.wc-block-components-radio-control-accordion-option::after { background: var(--mp-border); }
.wc-block-components-radio-control--highlight-checked .wc-block-components-radio-control-accordion-option--checked-option-highlighted {
	border-radius: 0;
	background: var(--mp-bg);
	box-shadow: none;
}

/* The consent and the Terms are the last things read before paying. */
.wc-block-checkout__terms.wc-block-checkout__terms--with-separator { margin-top: 20px; padding-top: 20px; border-top-color: var(--mp-border); }

/* Buttons */
.wc-block-components-button.wc-block-components-checkout-place-order-button:not(.is-link),
.wc-block-components-button.wc-block-cart__submit-button:not(.is-link) {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 54px;
	box-shadow: var(--mp-shadow);
	font-size: 1.05rem;
	transition: background-color .15s, transform .15s;
}
.wc-block-components-button.wc-block-components-checkout-place-order-button:not(.is-link):hover,
.wc-block-components-button.wc-block-cart__submit-button:not(.is-link):hover { transform: translateY(-1px); }
.wc-block-checkout__actions_row { display: block; }
.wc-block-components-totals-coupon__button,
.wc-block-components-button.outlined { padding: 8px 16px; font-size: .9rem; }
.wc-block-components-button:not(.is-link):disabled,
.wc-block-components-button:not(.is-link)[aria-disabled="true"] { opacity: .6; cursor: not-allowed; transform: none; }

/* Focus */
.wc-block-components-button:focus-visible,
.mp-upsell--cart .button:focus-visible {
	outline: 2px solid var(--mp-ink);
	outline-offset: 2px;
}
.wc-block-checkout a:focus-visible,
.wc-block-cart a:focus-visible,
.wc-block-components-panel__button:focus-visible,
.wc-block-cart-item__remove-link:focus-visible,
.wc-block-components-quantity-selector__button:focus-visible,
.wc-block-components-checkbox__input:focus-visible,
.wc-block-components-radio-control__input:focus-visible {
	outline: 2px solid var(--mp-primary) !important;
	outline-offset: 2px;
	box-shadow: none !important;
}

/* Summary cards */
.wc-block-checkout__sidebar .wp-block-woocommerce-checkout-order-summary-block,
.wc-block-cart__sidebar {
	overflow: hidden;
	border: 1px solid var(--mp-border);
	border-radius: var(--mp-radius);
	background: var(--mp-card);
	box-shadow: var(--mp-shadow);
}
.wc-block-cart__sidebar { padding: 20px 16px 16px; }
.wc-block-checkout__sidebar .wc-block-components-totals-wrapper,
.wc-block-cart__sidebar .wc-block-components-totals-wrapper { border-color: var(--mp-border); }
.wc-block-cart__totals-title { border-color: var(--mp-border); color: var(--mp-ink); }
.wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value { font: 600 1.25rem var(--mp-display); }
.wc-block-components-totals-footer-item-tax { color: var(--mp-muted); }
.wc-block-components-panel__button { font-weight: 700; color: var(--mp-ink); }
.wc-block-components-panel__button:hover { color: var(--mp-primary); }

/* Product lines */
.wc-block-components-order-summary-item__image img,
.wc-block-cart-item__image img {
	display: block;
	aspect-ratio: 1;
	border-radius: .75rem;
	object-fit: cover;
}
.wc-block-components-order-summary-item__quantity {
	border: 0;
	background: var(--mp-primary);
	box-shadow: 0 0 0 2px var(--mp-card);
	color: #fff;
	font-weight: 800;
}
.wc-block-components-order-summary-item__description .wc-block-components-product-metadata { display: none; }
.wc-block-components-product-name { color: var(--mp-ink); font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
a.wc-block-components-product-name:hover { color: var(--mp-primary); }
.wc-block-cart-items__row { border-color: var(--mp-border) !important; }
.wc-block-cart-items, .wc-block-cart-items__row td { border-color: var(--mp-border) !important; }
.wc-block-components-product-metadata__description { color: var(--mp-muted); }
.wc-block-cart-item__quantity .wc-block-components-quantity-selector { border-radius: 999px; }
.wc-block-components-quantity-selector::after { border-color: #e2c6a8 !important; border-radius: 999px !important; }
.wc-block-components-quantity-selector__button { color: var(--mp-ink); }

/* Notices */
.wc-block-components-notice-banner { border-radius: .75rem; font-size: .92rem; overflow-wrap: anywhere; }

/* Upsell panel in the cart: it can be hidden without a reload. */
.mp-upsell--cart[hidden] { display: none; }

@media (max-width: 620px) {
	.wc-block-cart__sidebar { padding: 16px 12px 12px; }
	.wc-block-cart__submit-container--sticky { background: var(--mp-bg); }
	.mp-upsell__action { justify-content: space-between; }
}

@media (prefers-reduced-motion: reduce) {
	.wc-block-components-button.wc-block-components-checkout-place-order-button:not(.is-link),
	.wc-block-components-button.wc-block-cart__submit-button:not(.is-link) { transition: none; }
	.wc-block-components-button.wc-block-components-checkout-place-order-button:not(.is-link):hover,
	.wc-block-components-button.wc-block-cart__submit-button:not(.is-link):hover { transform: none; }
}
