/**
 * Phänomen Variation UI — quick-add: card button + dialog
 *
 * Figma
 *   Card button   Productcard 2881:5247 → «Add-to-Cart Button» 2679:4583:
 *                 24px white circle, 18px «Warenkorb hinzufügen» icon,
 *                 15px from the right / 20px from the bottom of the image.
 *   Dialog        Desktop/New-Arrivals/Quick-Add-Overlay 2776:4484 / 2776:4840:
 *                 white, padding 48, gap 48, image 380 + info 420 (gap 20),
 *                 close icon 18px at 24/24.
 *
 * Tokens (palette, typography presets) are declared in variation-ui.css, which
 * this sheet depends on; the chips and swatches inside the dialog are the
 * product page's own. Icons are the Global Styles mask variables
 * (--ph-icon-*, stylesheet «Phänomen Icons (Masken)»). The focus outline comes
 * from Global Styles (`[class*="pvu-"]:focus-visible`).
 */

.pvu-qa,
.pvu-qa-modal {
	--pvu-h3-size:   var(--preset-id-5f51dce8-df8e-4857-b3d7-60d02407a72c-font-size, 30px);
	--pvu-h3-weight: var(--preset-id-5f51dce8-df8e-4857-b3d7-60d02407a72c-font-weight, 350);
	--pvu-h3-lh:     var(--preset-id-5f51dce8-df8e-4857-b3d7-60d02407a72c-line-height, 1.2);
	--pvu-h3-ls:     var(--preset-id-5f51dce8-df8e-4857-b3d7-60d02407a72c-letter-spacing, -0.0067em);
	--pvu-body-size:   var(--preset-id-781ac304-ba25-4354-9a36-e0647f74e153-font-size, 18px);
	--pvu-body-weight: var(--preset-id-781ac304-ba25-4354-9a36-e0647f74e153-font-weight, 400);
	--pvu-body-lh:     var(--preset-id-781ac304-ba25-4354-9a36-e0647f74e153-line-height, 1.7);
	--pvu-tag-size:   var(--preset-id-dc719374-95f1-41b7-ab8c-04affb322c49-font-size, 12px);
	--pvu-tag-weight: var(--preset-id-dc719374-95f1-41b7-ab8c-04affb322c49-font-weight, 500);
	--pvu-tag-lh:     var(--preset-id-dc719374-95f1-41b7-ab8c-04affb322c49-line-height, 1);
	--pvu-tag-ls:     var(--preset-id-dc719374-95f1-41b7-ab8c-04affb322c49-letter-spacing, 0.1em);
	--pvu-tag-tt:     var(--preset-id-dc719374-95f1-41b7-ab8c-04affb322c49-text-transform, uppercase);
}

/* --------------------------------------------------------------------------
 * Card button. The Shortcode element in GB 529 is an overlay the exact size of
 * the card image (pointer-events: none, so the image link stays clickable).
 * ----------------------------------------------------------------------- */

/* tl;dr: button size / shape live here (the «Shop-Listing» global copy is gone);
   live offsets 10 / 10 = Shortcode element CSS in GB 529 #12 / GB 1805 #13. */
.pvu-qa {
	--pvu-qa-right:  15px;
	--pvu-qa-bottom: 20px;
	--pvu-qa-size:   24px;

	position: absolute;
	inset: 0;
	pointer-events: none;
	text-align: left;
}

.pvu-qa .pvu-qa__toggle {
	position: absolute;
	right: var(--pvu-qa-right);
	bottom: var(--pvu-qa-bottom);
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: var(--pvu-qa-size);
	height: var(--pvu-qa-size);
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--pvu-surface);
	color: var(--pvu-ink);
	box-shadow: none;
	cursor: pointer;
	pointer-events: auto;
	appearance: none;
	-webkit-appearance: none;
	transition: background-color 150ms ease, color 150ms ease;
}

/* 44 × 44 hit area around the 24px circle. */
.pvu-qa .pvu-qa__toggle::before {
	content: "";
	position: absolute;
	inset: -10px;
}

/* Hover: not designed — inverted (Text circle, white icon). */
.pvu-qa .pvu-qa__toggle:hover {
	background: var(--pvu-ink);
	color: var(--pvu-surface);
}

/* The white spread keeps the global focus ring readable on dark photos. */
.pvu-qa .pvu-qa__toggle:focus-visible {
	box-shadow: 0 0 0 5px var(--pvu-surface);
}

.pvu-qa__icon {
	display: block;
	width: 18px;
	height: 18px;
	background-color: currentColor;
	-webkit-mask: var(--ph-icon-warenkorb-hinzufuegen) center / contain no-repeat;
	mask: var(--ph-icon-warenkorb-hinzufuegen) center / contain no-repeat;
}

.pvu-qa .pvu-qa__toggle[aria-busy="true"] {
	cursor: progress;
}

.pvu-qa .pvu-qa__toggle[aria-busy="true"] .pvu-qa__icon {
	animation: pvu-qa-pulse 700ms ease-in-out infinite alternate;
}

@keyframes pvu-qa-pulse {
	to {
		opacity: 0.3;
	}
}

/* Sold out — replaces the button when nothing is buyable. Not designed: the
   Sale-Tag M shape (Tag preset) inverted to white, so it reads as a state. */
.pvu-qa__soldout {
	position: absolute;
	right: var(--pvu-qa-right);
	bottom: var(--pvu-qa-bottom);
	padding: 7px 14px;
	background: var(--pvu-surface);
	color: var(--pvu-ink);
	font-size: var(--pvu-tag-size);
	font-weight: var(--pvu-tag-weight);
	line-height: var(--pvu-tag-lh);
	letter-spacing: var(--pvu-tag-ls);
	text-transform: var(--pvu-tag-tt);
	white-space: nowrap;
	pointer-events: auto;
}

/* --------------------------------------------------------------------------
 * Link trigger — „In den Warenkorb" in list rows (wishlist), rendered by
 * phaenomen_variation_ui_quick_add_link(). Its own root class, so none of
 * the card overlay rules above apply; the look is the global „Link" button
 * preset on the <a>. Not designed: busy = dimmed; unavailable = Kicker /
 * Accent note (like the account rows' „Nicht vorrätig").
 * ----------------------------------------------------------------------- */

.pvu-qa-link {
	display: inline-flex;
	align-items: center;
}

.pvu-qa-link .pvu-qa__toggle[aria-busy="true"] {
	opacity: 0.6;
	cursor: progress;
}

.pvu-qa-link__note {
	margin: 0;
	color: var(--pvu-accent);
	font-size: var(--pvu-kicker-size);
	font-weight: var(--pvu-kicker-weight);
	line-height: var(--pvu-kicker-lh);
	letter-spacing: var(--pvu-kicker-ls);
	text-transform: var(--pvu-kicker-tt);
	white-space: nowrap;
}

/* --------------------------------------------------------------------------
 * Dialog
 * ----------------------------------------------------------------------- */

html.pvu-qa-locked {
	overflow: hidden;
}

.pvu-qa-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	padding: 40px;
}

.pvu-qa-modal[hidden] {
	display: none;
}

/* Figma «Backdrop»: Text colour — at 50 %, like the side cart and the popups. */
.pvu-qa-modal__backdrop {
	position: absolute;
	inset: 0;
	background: var(--ph-dim-search);
	background: color-mix(in srgb, var(--pvu-ink) 50%, transparent);
}

.pvu-qa-modal__dialog {
	position: relative;
	box-sizing: border-box;
	width: min(944px, 100%);
	max-height: 100%;
	overflow-y: auto;
	overscroll-behavior: contain;
	background: var(--pvu-surface);
	color: var(--pvu-ink);
	outline: 0;
	animation: pvu-qa-in 160ms ease-out;
}

@keyframes pvu-qa-in {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
}

.pvu-qa-modal__body {
	display: flex;
	align-items: stretch;
	gap: 48px;
	padding: 48px;
}

.pvu-qa-modal__body.is-busy .pvu-row,
.pvu-qa-modal__body.is-busy .pvu-qa-modal__buy {
	opacity: 0.6;
	pointer-events: none;
}

/* Close (Figma Filter Icon Cross, 18px icon at top 24 / right 24): a 40×40
 * button like the site's other dialog close buttons, icon centred in it —
 * so the icon stays exactly where Figma has it (24 + 9 = 33px to its centre). */
.pvu-qa-modal__close {
	position: absolute;
	top: 13px;
	right: 13px;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 40px;
	height: 40px;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--pvu-ink);
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
}

.pvu-qa-modal__close:hover {
	color: var(--pvu-accent-hover);
}

.pvu-qa-modal__x {
	display: block;
	width: 18px;
	height: 18px;
	background-color: currentColor;
	-webkit-mask: var(--ph-icon-schliessen) center / contain no-repeat;
	mask: var(--ph-icon-schliessen) center / contain no-repeat;
}

/* Image: 380 wide, as tall as the info column (the row stretches it), cover.
 * Two classes on the <img>: the global `.breakdance img { height: auto }`
 * (0,1,1) would otherwise give it its natural 3:4 height, overflowing the
 * column (inner scrollbar on desktop, image over the info on phones). */
/* Background: the photo's edge colour for contain images (--ph-img-bg, set by
 * quick-add.js from the payload), Accent BG otherwise. */
.pvu-qa-modal__media {
	position: relative;
	flex: 0 0 380px;
	min-height: 380px;
	overflow: hidden;
	background: var(--ph-img-bg, var(--pvu-accent-bg));
}

.pvu-qa-modal .pvu-qa-modal__img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	max-width: none;
	height: 100%;
	object-fit: cover;
}

.pvu-qa-modal__info {
	flex: 1 1 420px;
	min-width: 0;
}

/* Brand + heart (Figma «Brand + Favorit»). */
.pvu-qa-modal__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 24px;
}

.pvu-qa-modal__brand {
	margin: 0;
	color: var(--pvu-accent);
	font-size: var(--pvu-kicker-size);
	font-weight: var(--pvu-kicker-weight);
	line-height: var(--pvu-kicker-lh);
	letter-spacing: var(--pvu-kicker-ls);
	text-transform: var(--pvu-kicker-tt);
}

/* Name and price: H3. The name is an <h2> (dialog outline), so the selector
 * outranks the global `.breakdance h2` rule (H2: 40px, uppercase on desktop). */
.pvu-qa-modal .pvu-qa-modal__title,
.pvu-qa-modal .pvu-qa-modal__price {
	margin: 0;
	color: var(--pvu-ink);
	font-size: var(--pvu-h3-size);
	font-weight: var(--pvu-h3-weight);
	line-height: var(--pvu-h3-lh);
	letter-spacing: var(--pvu-h3-ls);
	text-transform: none;
	font-variant-caps: normal;
}

/* Current price first, old price after it in Accent with a 1px strike. */
.pvu-qa-modal__price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	column-gap: 16px;
	row-gap: 4px;
}

.pvu-qa-modal__price ins {
	order: -1;
	color: var(--pvu-ink);
	text-decoration: none;
}

.pvu-qa-modal__price del {
	color: var(--pvu-accent);
	text-decoration-line: line-through;
	text-decoration-thickness: 1px;
}

.pvu-qa-modal__price .woocommerce-Price-amount,
.pvu-qa-modal__price bdi {
	font: inherit;
	color: inherit;
}

.pvu-qa-modal .screen-reader-text,
.pvu-qa-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* Status line: low stock = Kicker / Accent (as on the product page); hints
   and errors = Body Small, errors in Fehler. Empty: cancels the column gap but
   stays in the DOM, so the live region keeps announcing. */
.pvu-qa-modal__msg {
	margin: 0;
	color: var(--pvu-ink);
	font-size: var(--pvu-small-size);
	line-height: var(--pvu-small-lh);
}

.pvu-qa-modal__msg:empty {
	margin-top: -20px;
}

.pvu-qa-modal__msg.is-low {
	color: var(--pvu-accent);
	font-size: var(--pvu-kicker-size);
	font-weight: var(--pvu-kicker-weight);
	line-height: var(--pvu-kicker-lh);
	letter-spacing: var(--pvu-kicker-ls);
	text-transform: var(--pvu-kicker-tt);
}

.pvu-qa-modal__msg.is-error {
	color: var(--pvu-error);
}

/* Buy row (Figma CtaRow): stepper + full-width add-to-cart, gap 16, one line.
 * The button never wraps its label: it takes the rest of the row but at least
 * its single-line width; where even that does not fit (very narrow phones) it
 * moves below the stepper as a whole. Stepper and button share the button's
 * single-line height. */
.pvu-qa-modal__buy {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 12px 16px;
}

.pvu-qty {
	display: flex;
	align-items: stretch;
	flex: 0 0 auto;
	box-sizing: border-box;
	width: 112px;
	min-height: 48px;
	border: 1px solid var(--pvu-ink);
}

.pvu-qty__btn {
	display: flex;
	flex: 0 0 40px;
	align-items: center;
	justify-content: center;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--pvu-ink);
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
}

.pvu-qty__btn::before {
	content: "";
	display: block;
	width: 16px;
	height: 16px;
	background-color: currentColor;
	-webkit-mask: var(--ph-icon-minus) center / contain no-repeat;
	mask: var(--ph-icon-minus) center / contain no-repeat;
}

.pvu-qty__btn--inc::before {
	-webkit-mask-image: var(--ph-icon-plus);
	mask-image: var(--ph-icon-plus);
}

.pvu-qty__btn:hover:not(:disabled) {
	color: var(--pvu-accent-hover);
}

/* At the limit: not designed — Linie. */
.pvu-qty__btn:disabled {
	color: var(--pvu-line);
	cursor: not-allowed;
}

.pvu-qty__input {
	flex: 1 1 auto;
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
	height: auto;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: var(--pvu-ink);
	font-family: inherit;
	font-size: var(--pvu-body-size);
	font-weight: var(--pvu-body-weight);
	line-height: var(--pvu-body-lh);
	text-align: center;
	appearance: textfield;
	-moz-appearance: textfield;
}

.pvu-qty__input::-webkit-outer-spin-button,
.pvu-qty__input::-webkit-inner-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

.pvu-qty__input:focus-visible {
	outline: 3px solid var(--pvu-accent);
	outline-offset: 2px;
}

/* Add to cart: the global Primary button + the 28px cart icon. */
.pvu-qa-modal .pvu-qa-modal__add {
	flex: 1 1 0;
	min-width: max-content;
	gap: 10px;
	white-space: nowrap;
}

.pvu-qa-modal .pvu-qa-modal__add::before {
	content: "";
	flex: 0 0 auto;
	width: 28px;
	height: 28px;
	margin: -3px 0;
	background-color: currentColor;
	-webkit-mask: var(--ph-icon-warenkorb) center / contain no-repeat;
	mask: var(--ph-icon-warenkorb) center / contain no-repeat;
}

.pvu-qa-modal .pvu-qa-modal__add[aria-busy="true"] {
	cursor: progress;
}

/* „Alle Produktdetails ansehen" (Figma Link-Text, Kicker, underlined).
 * Two classes so the rules outrank the global `.breakdance a` (0,1,1:
 * no underline) and `.breakdance a:hover` (0,2,1). */
.pvu-qa-modal .pvu-qa-modal__more {
	align-self: flex-start;
	color: var(--pvu-accent);
	font-size: var(--pvu-kicker-size);
	font-weight: var(--pvu-kicker-weight);
	line-height: var(--pvu-kicker-lh);
	letter-spacing: var(--pvu-kicker-ls);
	text-transform: var(--pvu-kicker-tt);
	text-decoration: underline;
	text-decoration-color: currentColor;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.pvu-qa-modal .pvu-qa-modal__more:hover {
	color: var(--pvu-accent-hover);
}

/* Wishlist heart (TI Wishlist) → Phänomen ph-favorit, filled when listed.
   Selectors outrank TI's own (0,4,1) icon-font rules. */
.pvu-qa-modal__wish {
	flex: 0 0 auto;
	line-height: 0;
}

.pvu-qa-modal__wish .tinv-wraper {
	margin: 0;
	line-height: 0;
}

.pvu-qa-modal__wish .tinvwl-tooltip,
.pvu-qa-modal__wish .tinv-wishlist-clear {
	display: none;
}

.pvu-qa-modal__wish .tinv-wishlist a.tinvwl_add_to_wishlist_button.tinvwl-icon-heart {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--pvu-ink);
	font-size: 0;
	vertical-align: middle;
	text-decoration: none;
	transition: color 150ms ease;
}

.pvu-qa-modal__wish .tinv-wishlist a.tinvwl_add_to_wishlist_button.tinvwl-icon-heart::before {
	content: "";
	position: static;
	display: block;
	width: 18px;
	height: 18px;
	margin: 0;
	background-color: currentColor;
	-webkit-mask: var(--ph-icon-favorit) center / contain no-repeat;
	mask: var(--ph-icon-favorit) center / contain no-repeat;
}

.pvu-qa-modal__wish .tinv-wishlist a.tinvwl_add_to_wishlist_button.tinvwl-icon-heart.tinvwl-product-in-list::before {
	content: "";
	-webkit-mask-image: var(--ph-icon-favorit-gefuellt);
	mask-image: var(--ph-icon-favorit-gefuellt);
}

.pvu-qa-modal__wish .tinv-wishlist a.tinvwl_add_to_wishlist_button.tinvwl-icon-heart:hover {
	color: var(--pvu-accent-hover);
}

/* --------------------------------------------------------------------------
 * Tablet (≤1023): narrower image column.
 * Phones (≤767, derived — no mobile frame): full-width sheet, image on top.
 * ----------------------------------------------------------------------- */

@media (max-width: 1023px) {
	.pvu-qa-modal__body {
		gap: 32px;
		padding: 40px;
	}

	.pvu-qa-modal__media {
		flex-basis: 38%;
	}
}

@media (max-width: 767px) {
	.pvu-qa-modal {
		align-items: flex-end;
		padding: 20px 0 0;
	}

	/* The sheet fits the screen without scrolling: dialog and body are flex
	 * columns, so when the content is taller than the sheet the image (4:5,
	 * at most 45vh) gives up height first, down to 200px; only below that
	 * does the sheet scroll. */
	.pvu-qa-modal__dialog {
		display: flex;
		flex-direction: column;
		width: 100%;
	}

	.pvu-qa-modal__body {
		flex: 0 1 auto;
		flex-direction: column;
		min-height: 0;
		gap: 24px;
		padding: 56px 20px 32px;
	}

	.pvu-qa-modal__media {
		flex: 0 1 auto;
		min-height: 200px;
		aspect-ratio: 4 / 5;
		max-height: 45vh;
	}

	/* 40×40, icon centre unchanged (19 + 9 / 20 + 9 from the corner). */
	.pvu-qa-modal__close {
		top: 8px;
		right: 9px;
	}

	.pvu-qa-modal__info {
		flex: 0 0 auto;
	}
}

/* Phones: no cart icon and 14px side padding, so „In den Warenkorb" (159px)
 * still fits beside the 112px stepper at 360px. Three classes: outranks the
 * global `.breakdance .button-atom--primary` padding (0,2,0, loaded later). */
@media (max-width: 479px) {
	.pvu-qa-modal .pvu-qa-modal__buy .pvu-qa-modal__add {
		padding-left: 14px;
		padding-right: 14px;
	}

	.pvu-qa-modal .pvu-qa-modal__add::before {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pvu-qa .pvu-qa__toggle {
		transition: none;
	}

	.pvu-qa .pvu-qa__toggle[aria-busy="true"] .pvu-qa__icon {
		animation: none;
		opacity: 0.4;
	}

	.pvu-qa-modal__dialog {
		animation: none;
	}
}
