/* =====================================================================
   Quantity Discounts' product page (product-page-ecomdrama-quantity-discounts.js
   draws the tier cards and the cart).

   1. The plugin's tier cards and picker — a copy of Quantity Discounts
      0.15's assets/css/tiers.css (without the rule that hides the theme's
      quantity field, which the page has none of).
   2. The plugin's cart notes — from its assets/css/cart.css.
   Both so the page shows exactly what shoppers see; copy them again when
   the plugin's storefront changes.
   3. The page's own visuals (.edp-qd-*).
   ===================================================================== */

/* ----- 1. Tier cards (from the plugin) ----- */
.qd-offer {
	--qd-accent-color: var(--qd-accent, var(--wp--preset--color--primary, var(--ast-global-color-0, #2f62a8)));
	--qd-accent-ink-color: var(--qd-accent-ink, #fff);
	--qd-line: color-mix(in srgb, currentColor 18%, transparent);
	--qd-muted: color-mix(in srgb, currentColor 68%, transparent);
	--qd-surface: color-mix(in srgb, currentColor 5%, transparent);
	--qd-tint: color-mix(in srgb, var(--qd-accent-color) 11%, transparent);
	--qd-save: var(--qd-success, #1d6b3f);
	--qd-error: #b3261e;
	--qd-radius: 10px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 0 0 1.25em;
	width: 100%;
	min-width: 0;
}

.qd-offer__legend {
	font-size: 0.95em;
	font-weight: 700;
}

/* ---------- Cards ---------- */
.qd-cards {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.qd-card {
	position: relative;
	border: 1px solid var(--qd-line);
	border-radius: var(--qd-radius);
	background: transparent;
	line-height: 1.35;
	transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}

.qd-card__main {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 58px;
	padding: 14px 16px;
	border-radius: inherit;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.qd-card:hover {
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.qd-card__main:focus {
	outline: none;
}

.qd-card__main:focus-visible {
	outline: 3px solid var(--qd-accent-color);
	outline-offset: 2px;
}

.qd-card.is-selected {
	border-color: var(--qd-accent-color);
	box-shadow: inset 0 0 0 1px var(--qd-accent-color);
}

.qd-card.is-disabled {
	border-style: dashed;
	background: var(--qd-surface);
	box-shadow: none;
}

.qd-card.is-disabled .qd-card__main {
	cursor: not-allowed;
}

.qd-card__radio {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	border: 2px solid var(--qd-line);
	border-radius: 999px;
	box-sizing: border-box;
}

.qd-card.is-selected .qd-card__radio {
	border-color: var(--qd-accent-color);
}

.qd-card.is-selected .qd-card__radio::after {
	content: "";
	width: 10px;
	height: 10px;
	border-radius: 999px;
	background: var(--qd-accent-color);
}

.qd-card__body {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.qd-card__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 8px;
}

.qd-card__title {
	font-size: 16px;
	font-weight: 700;
}

.qd-card__badge {
	padding: 3px 9px;
	border-radius: 999px;
	background: var(--qd-badge, var(--qd-accent-color));
	color: var(--qd-badge-ink, var(--qd-accent-ink-color));
	font-size: 11.5px;
	font-weight: 700;
	line-height: 1.3;
}

/* Corner tag ("Free shipping"): on the card's top border. */
.qd-cards.has-corner {
	row-gap: 14px;
	padding-top: 8px;
}

.qd-card__corner {
	position: absolute;
	inset-block-start: -11px;
	inset-inline-end: 12px;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	max-width: calc(100% - 24px);
	height: 22px;
	padding: 0 9px;
	box-sizing: border-box;
	border-radius: 999px;
	background: var(--qd-corner, var(--qd-accent-color));
	color: var(--qd-corner-ink, var(--qd-accent-ink-color));
	font-size: 11.5px;
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
}

.qd-card__corner-text {
	overflow: hidden;
	text-overflow: ellipsis;
}

.qd-icon {
	flex: 0 0 auto;
	display: block;
}

.qd-card__sub {
	color: var(--qd-muted);
	font-size: 13.5px;
}

.qd-card__sub:empty {
	display: none;
}

.qd-card.is-disabled .qd-card__sub::before {
	content: "⊘ ";
}

.qd-card__prices {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 2px;
	text-align: end;
}

.qd-card__total {
	font-size: 16.5px;
	font-weight: 700;
	white-space: nowrap;
}

.qd-card__was {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	align-items: baseline;
	gap: 2px 7px;
	font-size: 12.5px;
	white-space: nowrap;
}

.qd-card__was s {
	color: var(--qd-muted);
}

.qd-card__was b {
	color: var(--qd-save);
	font-weight: 700;
}

.qd-card__was s:empty,
.qd-card__was b:empty {
	display: none;
}

/* Filled: tinted cards. */
.qd-offer--filled .qd-card {
	border-color: transparent;
	background: var(--qd-tint);
}

.qd-offer--filled .qd-card.is-selected {
	border-color: var(--qd-accent-color);
}

/* Compact list: one container with dividers; the corner tag sits in line. */
.qd-offer--list .qd-cards {
	gap: 0;
	padding-top: 0;
	border: 1px solid var(--qd-line);
	border-radius: var(--qd-radius);
	overflow: hidden;
}

.qd-offer--list .qd-card {
	border: 0;
	border-radius: 0;
	box-shadow: inset 0 -1px 0 var(--qd-line);
}

.qd-offer--list .qd-card__main {
	min-height: 52px;
	padding-block: 10px;
}

.qd-offer--list .qd-card__corner {
	position: static;
	max-width: 100%;
}

.qd-offer--list .qd-card:last-child {
	box-shadow: none;
}

.qd-offer--list .qd-card.is-selected {
	background: var(--qd-tint);
	box-shadow: inset 3px 0 0 var(--qd-accent-color);
}

.qd-offer--list .qd-card__main:focus-visible {
	outline-offset: -3px;
}

/* Tiles: a grid. */
.qd-offer--tiles .qd-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.qd-offer--tiles .qd-card__main {
	flex-direction: column;
	align-items: flex-start;
	height: 100%;
	box-sizing: border-box;
	text-align: start;
}

.qd-offer--tiles .qd-card__radio {
	position: absolute;
	inset-block-start: 12px;
	inset-inline-end: 12px;
}

/* Keep the title and badge clear of the radio in the corner. */
.qd-offer--tiles .qd-card__head {
	padding-inline-end: 22px;
}

.qd-offer--images .qd-card__head {
	padding-inline-end: 0;
}

.qd-offer--tiles .qd-card__prices {
	align-items: flex-start;
	text-align: start;
}

.qd-offer--tiles .qd-card__was {
	justify-content: flex-start;
}

/* Tiles with pictures. */
.qd-card__image {
	display: block;
	width: 100%;
	overflow: hidden;
	border-radius: max(0px, calc(var(--qd-radius) - 4px));
	aspect-ratio: 1 / 1;
	background: var(--qd-surface);
}

.qd-card__image img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
}

.qd-offer--images .qd-card__radio {
	z-index: 1;
	background: #fff;
}

.qd-offer__note {
	margin: 0;
	color: var(--qd-muted);
	font-size: 13.5px;
}

/* ---------- Variation picker ---------- */
.qd-picker {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 12px 14px 14px;
	border: 1px solid var(--qd-line);
	border-radius: min(var(--qd-radius), 12px);
	cursor: default;
}

/* Inside the selected card: a section under the radio. */
.qd-picker.is-inline {
	padding: 12px 16px 14px;
	border: 0;
	border-top: 1px solid var(--qd-line);
	border-radius: 0;
}

.qd-card:not(.is-selected) > .qd-picker {
	display: none;
}

.qd-picker[hidden],
.qd-picker__mix[hidden] {
	display: none;
}

.qd-picker__title {
	font-size: 0.95em;
	font-weight: 700;
}

.qd-picker.is-inline .qd-picker__title {
	display: none;
}

.qd-picker__rows {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.qd-picker.is-mix .qd-picker__rows {
	gap: 4px;
}

.qd-attr {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.qd-attr__label {
	font-size: 13px;
	font-weight: 700;
}

.qd-attr__options {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.qd-offer .qd-option,
.qd-offer .qd-picker__mix,
.qd-offer .qd-item__toggle {
	margin: 0;
	font: inherit;
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: normal;
	text-transform: none;
	box-shadow: none;
	cursor: pointer;
}

.qd-offer .qd-option {
	min-width: 46px;
	min-height: 38px;
	padding: 0 12px;
	border: 1px solid var(--qd-line);
	border-radius: min(var(--qd-radius), 8px);
	background: transparent;
	color: inherit;
}

.qd-offer .qd-option.is-on {
	border-color: var(--qd-accent-color);
	background: var(--qd-accent-color);
	color: var(--qd-accent-ink-color);
}

.qd-offer .qd-option.is-unavailable {
	border-style: dashed;
	text-decoration: line-through;
	opacity: 0.55;
	cursor: not-allowed;
}

/*
 * Swatches (QD_Swatches): a colour dot (round) or a picture (the cards'
 * shape, at most 8px), chosen = an accent ring. The dot keeps a faint
 * edge so white and pale colours stay visible.
 */
.qd-offer .qd-option--color,
.qd-offer .qd-option--image {
	position: relative;
	min-width: 0;
	width: 40px;
	height: 40px;
	min-height: 0;
	padding: 3px;
	border-color: transparent;
}

.qd-offer .qd-option--color {
	border-radius: 50%;
}

.qd-offer .qd-option--image {
	width: 46px;
	height: 46px;
	border-radius: min(var(--qd-radius), 8px);
}

.qd-offer .qd-option--color:hover,
.qd-offer .qd-option--image:hover {
	border-color: var(--qd-line);
}

.qd-offer .qd-option--color.is-on,
.qd-offer .qd-option--image.is-on {
	border-color: var(--qd-accent-color);
	background: transparent;
	box-shadow: inset 0 0 0 1px var(--qd-accent-color);
}

.qd-swatch {
	display: block;
	width: 100%;
	height: 100%;
	overflow: hidden;
	border-radius: inherit;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.qd-option--image .qd-swatch {
	border-radius: max(0px, calc(min(var(--qd-radius), 8px) - 3px));
}

.qd-swatch img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
}

/* Unavailable: faded with a diagonal stroke (no text to strike through). */
.qd-offer .qd-option--color.is-unavailable,
.qd-offer .qd-option--image.is-unavailable {
	border-style: solid;
	border-color: transparent;
	opacity: 0.45;
}

.qd-offer .qd-option--color.is-unavailable::after,
.qd-offer .qd-option--image.is-unavailable::after {
	display: block; /* Storefront hides every button::after. */
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: linear-gradient(to top right, transparent calc(50% - 1px), currentColor calc(50% - 1px), currentColor calc(50% + 1px), transparent calc(50% + 1px));
	content: "";
}

/* In a collapsed Mix row: "● Black · M". */
.qd-swatch--mini {
	display: inline-block;
	width: 14px;
	height: 14px;
	margin-inline-end: 5px;
	border-radius: 50%;
	vertical-align: -2px;
}

/* "Mix options" / "Same for all", "Change" / "Done": text links. */
.qd-offer .qd-picker__mix,
.qd-offer .qd-item__toggle {
	min-height: 32px;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	font-size: 13px;
	text-decoration: underline;
}

.qd-offer .qd-picker__mix {
	align-self: flex-start;
}

.qd-item {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 6px 10px;
	border-radius: min(var(--qd-radius), 10px);
}

.qd-item.is-open {
	padding-bottom: 12px;
	background: var(--qd-surface);
}

.qd-item.has-error {
	box-shadow: inset 0 0 0 2px var(--qd-error);
}

.qd-item__head {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 34px;
}

.qd-item__title {
	flex: 0 0 auto;
	min-width: 52px;
	color: var(--qd-muted);
	font-size: 13px;
	font-weight: 700;
}

.qd-item__summary {
	flex: 1 1 auto;
	min-width: 0;
	color: var(--qd-muted);
	font-size: 13.5px;
	font-weight: 600;
}

.qd-item__summary.is-done {
	color: inherit;
}

.qd-offer .qd-item__toggle {
	flex: 0 0 auto;
	margin-inline-start: auto;
}

.qd-attr.has-error .qd-attr__label {
	color: var(--qd-error);
}

/* Themes outline every focused button (Storefront: also after a click) — ours shows only for the keyboard. */
.qd-offer .qd-option:focus,
.qd-offer .qd-picker__mix:focus,
.qd-offer .qd-item__toggle:focus {
	outline: none;
}

.qd-offer .qd-option:focus-visible,
.qd-offer .qd-picker__mix:focus-visible,
.qd-offer .qd-item__toggle:focus-visible {
	outline: 3px solid var(--qd-accent-color);
	outline-offset: 2px;
}

.qd-picker__error {
	display: flex;
	align-items: center;
	gap: 6px;
	color: var(--qd-error);
	font-size: 13px;
	font-weight: 700;
}

.qd-picker__error::before {
	content: "!";
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	border-radius: 999px;
	background: var(--qd-error);
	color: #fff;
	font-size: 11px;
}

/* ---------- Add to cart ---------- */
.qd-offer__actions[hidden] {
	display: none;
}

.qd-offer .qd-add {
	width: 100%;
	margin: 0;
}

.qd-offer .qd-add.loading {
	opacity: 0.75;
	cursor: progress;
}

.qd-offer__notice {
	padding: 10px 14px;
	border-radius: min(var(--qd-radius), 10px);
	background: color-mix(in srgb, var(--qd-save) 10%, transparent);
	font-size: 14px;
}

.qd-offer__notice.is-error {
	background: color-mix(in srgb, var(--qd-error) 10%, transparent);
	color: var(--qd-error);
}

.qd-offer__notice[hidden] {
	display: none;
}

.qd-offer__live {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (max-width: 480px) {
	.qd-card__main {
		min-height: 64px;
	}

	.qd-offer .qd-option {
		min-height: 44px;
	}

	.qd-offer .qd-option--color,
	.qd-offer .qd-option--image {
		width: 44px;
		height: 44px;
		min-height: 0;
	}

	.qd-picker.is-inline {
		padding-inline: 12px;
	}
}

/* ----- 2. Cart notes (from the plugin) ----- */
.qd-line {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	margin-top: 4px;
}

.qd-line-note {
	color: var(--qd-success, #1d6b3f);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.4;
}

.qd-line-coupon {
	font-size: 12.5px;
	line-height: 1.4;
	opacity: 0.8;
}

.qd-change {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 999px;
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.5;
	background: rgba(0, 0, 0, 0.05);
}

.qd-change--up {
	color: var(--qd-success, #1d6b3f);
	background: rgba(29, 107, 63, 0.1);
}

.qd-line .qd-nudge {
	display: inline-block;
	margin: 0;
	padding: 2px 10px;
	border: 1px dashed currentColor;
	border-radius: 999px;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.5;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	cursor: pointer;
}

.qd-line .qd-nudge:hover,
.qd-line .qd-nudge:focus-visible {
	background: rgba(0, 0, 0, 0.05);
}

.qd-line .qd-nudge[disabled] {
	cursor: progress;
	opacity: 0.6;
}

.qd-saving-row th,
.qd-saving-row td,
.qd-saving-row > span {
	color: var(--qd-success, #1d6b3f);
	font-weight: 600;
}


/* ----- 3. The page's visuals ----- */

/* The cards take the site's azure as the accent, like a store's theme colour. */
.edp-qd-frame,
.edp-qd-example,
.edp-qd-types,
.edp-qd-styles,
.edp-qd-demo {
	--qd-accent: var( --edp-azure );
	color: var( --edp-ink );
}

.edp-qd-frame .qd-offer,
.edp-qd-panel .qd-offer,
.edp-qd-type .qd-offer {
	margin: 0;
}

/* The plugin's own button takes the theme's button styles in a store
   (and WooCommerce's .button.alt here, which this overrides). */
body .edp-qd-frame .qd-offer button.qd-add {
	min-height: 48px;
	padding: 0 18px;
	border: 0;
	border-radius: 10px;
	background: var( --edp-ink );
	color: #fff;
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
}

body .edp-qd-frame .qd-offer button.qd-add:hover {
	background: #000;
}

body .edp-qd-frame .qd-offer button.qd-add:focus-visible {
	outline: 3px solid var( --edp-azure );
	outline-offset: 2px;
}

/* A product page's buy box, in the dashed frame of the plugin's part. */
.edp-qd-frame {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 22px 18px 18px;
	background: #fff;
	border: 2px dashed var( --edp-azure );
	border-radius: 16px;
}

.edp-qd-frame__tag {
	position: absolute;
	left: 14px;
	top: -12px;
	z-index: 1;
	height: 22px;
	display: flex;
	align-items: center;
	padding: 0 10px;
	background: var( --edp-azure );
	color: #fff;
	border-radius: 999px;
	font-size: 11.5px;
	font-weight: 700;
	white-space: nowrap;
}

.edp-qd-hero {
	max-width: 460px;
	justify-self: center;
	width: 100%;
	box-shadow: 0 30px 70px rgba( 28, 40, 60, 0.12 );
}

.edp-qd-buybox {
	display: flex;
	align-items: center;
	gap: 14px;
}

.edp-qd-buybox__photo {
	flex: 0 0 64px;
	height: 64px;
	border-radius: 12px;
	background: #f4ede4 url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M20 18 L44 18 L47 54 L17 54 Z' fill='%237a4e2d'/%3E%3Crect x='21' y='13' width='22' height='7' rx='2' fill='%235c3a21'/%3E%3Crect x='25' y='30' width='14' height='12' rx='2' fill='%23f3e3cf'/%3E%3C/svg%3E" ) center / cover;
}

.edp-qd-buybox__photo.is-tee {
	background: #eef1f4 url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M22 12 L28 15 Q32 18 36 15 L42 12 L54 20 L49 29 L44 26 L44 54 L20 54 L20 26 L15 29 L10 20 Z' fill='%231f2329'/%3E%3C/svg%3E" ) center / cover;
}

.edp-qd-buybox__info {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.edp-qd-buybox__name {
	font-size: 17px;
	font-weight: 800;
	letter-spacing: -0.2px;
}

.edp-qd-buybox__meta {
	font-size: 13px;
	color: var( --edp-ink-3 );
}

/* Panels with a small label: example, styles. */
.edp-qd-panel {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
	padding: 18px;
	background: #fff;
	border: 1px solid var( --edp-line );
	border-radius: 16px;
}

.edp-qd-panel__label {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.4px;
	text-transform: uppercase;
	color: var( --edp-ink-3 );
}

/* Example: cards → cart line. */
.edp-qd-example {
	display: grid;
	grid-template-columns: minmax( 0, 1fr ) auto minmax( 0, 1fr );
	align-items: center;
	gap: 18px;
}

.edp-qd-example__arrow {
	font-size: 26px;
	color: var( --edp-ink-4 );
}

/* Three kinds of tiers. */
.edp-qd-types {
	display: grid;
	grid-template-columns: repeat( 3, minmax( 0, 1fr ) );
	gap: 18px;
}

.edp-qd-type {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 20px;
	background: #fff;
	border: 1px solid var( --edp-line );
	border-radius: 16px;
}

.edp-qd-type__title {
	font-size: 18px;
	font-weight: 800;
}

.edp-qd-type__example {
	align-self: flex-start;
	padding: 3px 10px;
	background: #eef3fa;
	color: var( --edp-azure-press );
	border-radius: 999px;
	font-size: 13px;
	font-weight: 700;
}

.edp-qd-type__text {
	margin: 4px 0 8px;
	font-size: 14px;
	line-height: 1.55;
	color: var( --edp-ink-2 );
}

.edp-qd-type__cards {
	margin-top: auto;
}

/* The four styles. */
.edp-qd-styles {
	display: grid;
	grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
	gap: 18px;
	align-items: start;
}

.edp-qd-styles .qd-offer--tiles .qd-cards {
	grid-template-columns: repeat( 3, minmax( 0, 1fr ) );
}

.edp-qd-styles .qd-offer--tiles .qd-card__was {
	flex-direction: column;
	align-items: flex-start;
}

/* Live preview: the style switch over the widget. */
.edp-qd-demo {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 22px;
}

.edp-qd-demo__stage {
	width: 100%;
	max-width: 560px;
	box-shadow: 0 30px 70px rgba( 20, 40, 80, 0.18 );
}

.edp-qd-seg {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 2px;
	padding: 3px;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 1px 3px rgba( 28, 40, 60, 0.12 );
}

.edp-qd-seg__btn {
	padding: 7px 14px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var( --edp-ink-3 );
	font: inherit;
	font-size: 13.5px;
	font-weight: 700;
	white-space: nowrap;
	cursor: pointer;
}

.edp-qd-seg__btn[aria-pressed="true"] {
	background: var( --edp-azure );
	color: #fff;
}

.edp-qd-seg__btn:focus-visible {
	outline: 3px solid var( --edp-azure );
	outline-offset: 2px;
}

/* Cart (callout) and the example's cart line. */
.edp-qd-cart {
	width: 100%;
	max-width: 460px;
	justify-self: center;
	overflow: hidden;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 14px 36px rgba( 90, 70, 40, 0.12 );
}

.edp-qd-cart.is-static {
	max-width: none;
	border: 1px solid var( --edp-line );
	box-shadow: none;
}

.edp-qd-cart__head {
	display: flex;
	align-items: baseline;
	gap: 10px;
	padding: 14px 18px;
	border-bottom: 1px solid #f1eadf;
	font-size: 15px;
	font-weight: 700;
}

.edp-qd-cart__hint {
	margin-left: auto;
	font-size: 12.5px;
	font-weight: 400;
	color: var( --edp-ink-3 );
}

.edp-qd-cart__line {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 14px 18px;
	border-bottom: 1px solid #f4f0e9;
}

.edp-qd-cart.is-static .edp-qd-cart__line {
	border-bottom: 0;
}

.edp-qd-cart__thumb {
	flex: 0 0 52px;
	height: 52px;
	border: 1px solid #f1eadf;
	border-radius: 8px;
	background: #f4ede4 url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M20 18 L44 18 L47 54 L17 54 Z' fill='%237a4e2d'/%3E%3Crect x='21' y='13' width='22' height='7' rx='2' fill='%235c3a21'/%3E%3Crect x='25' y='30' width='14' height='12' rx='2' fill='%23f3e3cf'/%3E%3C/svg%3E" ) center / cover;
}

.edp-qd-cart__thumb[style] {
	background: #eef1f4 url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M22 12 L28 15 Q32 18 36 15 L42 12 L54 20 L49 29 L44 26 L44 54 L20 54 L20 26 L15 29 L10 20 Z' fill='%231f2329'/%3E%3C/svg%3E" ) center / cover;
}

.edp-qd-cart__info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
}

.edp-qd-cart__name {
	font-size: 14px;
	font-weight: 700;
	line-height: 1.35;
}

.edp-qd-cart__qty {
	display: inline-flex;
	align-items: center;
	border: 1px solid var( --edp-line-2 );
	border-radius: 8px;
	font-size: 13.5px;
	font-weight: 700;
}

.edp-qd-cart__qty.is-static {
	border: 0;
	font-weight: 400;
	color: var( --edp-ink-2 );
}

.edp-qd-cart__qty > span {
	min-width: 26px;
	text-align: center;
}

.edp-qd-cart__qty button {
	width: 30px;
	height: 30px;
	padding: 0;
	border: 0;
	background: none;
	color: var( --edp-ink );
	font: inherit;
	font-size: 16px;
	cursor: pointer;
}

.edp-qd-cart__qty button:focus-visible {
	outline: 3px solid var( --edp-azure );
	outline-offset: -3px;
	border-radius: 8px;
}

.edp-qd-cart__price {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 2px;
	font-size: 14px;
}

.edp-qd-cart__price s {
	font-size: 12.5px;
	color: var( --edp-ink-3 );
}

.edp-qd-cart__totals {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 14px 18px 18px;
	font-size: 14px;
}

.edp-qd-cart__totals > div {
	display: flex;
	justify-content: space-between;
	gap: 12px;
}

/* Which tiers a product gets. */
.edp-qd-ladder {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.edp-qd-ladder__step {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 14px 16px;
	background: #fff;
	border: 1px solid var( --edp-line );
	border-radius: 14px;
	font-size: 14px;
	line-height: 1.55;
	color: var( --edp-ink-2 );
}

.edp-qd-ladder__step strong {
	display: block;
	margin-bottom: 2px;
	font-size: 16px;
	color: var( --edp-ink );
}

.edp-qd-ladder__n {
	flex: 0 0 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f2f5fa;
	color: var( --edp-ink-2 );
	border-radius: 999px;
	font-size: 14px;
	font-weight: 800;
}

@media ( max-width: 900px ) {
	.edp-qd-types {
		grid-template-columns: minmax( 0, 1fr );
	}

	.edp-qd-example {
		grid-template-columns: minmax( 0, 1fr );
	}

	.edp-qd-example__arrow {
		justify-self: center;
		transform: rotate( 90deg );
	}
}

@media ( max-width: 600px ) {
	.edp-qd-styles {
		grid-template-columns: minmax( 0, 1fr );
	}

	.edp-qd-frame {
		padding: 20px 12px 12px;
	}
}

/* Live preview: "With pictures", shown with Tiles. */
.edp-qd-toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: -10px;
	padding: 6px 12px;
	border: 1px solid var( --edp-line-2 );
	border-radius: 999px;
	background: #fff;
	color: var( --edp-ink-2 );
	font: inherit;
	font-size: 13.5px;
	font-weight: 700;
	cursor: pointer;
}

.edp-qd-toggle[hidden] {
	display: none;
}

.edp-qd-toggle::before {
	content: "";
	width: 28px;
	height: 16px;
	border-radius: 999px;
	background: var( --edp-line-2 ) radial-gradient( circle at 8px 50%, #fff 5px, transparent 6px );
	transition: background-color 0.15s;
}

.edp-qd-toggle[aria-pressed="true"] {
	color: var( --edp-ink );
}

.edp-qd-toggle[aria-pressed="true"]::before {
	background: var( --edp-azure ) radial-gradient( circle at 20px 50%, #fff 5px, transparent 6px );
}

.edp-qd-toggle:focus-visible {
	outline: 3px solid var( --edp-azure );
	outline-offset: 2px;
}
