/**
 * Perfamix product variation choices.
 *
 * Scope: button-type Goldsmith swatches in the main single-product summary.
 * Color and image swatches, loops, quick view, and the sticky cart are left
 * under Goldsmith's native presentation contract.
 */

.single-product .goldsmith-product-summary:not(.goldsmith-product-bottom-popup-cart) .variations_form .goldsmith-variations {
	--perfamix-choice-primary: #264e36;
	--perfamix-choice-secondary: #78947c;
	--perfamix-choice-gold-rgb: 200, 160, 90;
	--perfamix-choice-sand-rgb: 225, 210, 181;
}

.single-product .goldsmith-product-summary:not(.goldsmith-product-bottom-popup-cart) .variations_form .goldsmith-variations .goldsmith-terms.goldsmith-type-button {
	gap: 8px;
}

.single-product .goldsmith-product-summary:not(.goldsmith-product-bottom-popup-cart) .variations_form .goldsmith-variations .goldsmith-terms.goldsmith-type-button > .goldsmith-term {
	box-sizing: border-box;
	min-inline-size: 64px;
	min-block-size: 42px;
	padding: 10px 14px !important;
	border: 1px solid var(--perfamix-choice-secondary) !important;
	border-radius: 6px;
	background: #fff !important;
	box-shadow: 0 1px 2px rgba(38, 78, 54, 0.06);
	color: var(--perfamix-choice-primary) !important;
	cursor: pointer;
	font-size: 13px !important;
	font-weight: 600;
	letter-spacing: 0.02em;
	line-height: 1.2 !important;
	touch-action: manipulation;
	transition:
		background-color 160ms ease,
		border-color 160ms ease,
		box-shadow 160ms ease,
		color 160ms ease,
		transform 160ms ease;
	user-select: none;
}

/* Goldsmith nests an extra span only when its outline option is enabled. */
.single-product .goldsmith-product-summary:not(.goldsmith-product-bottom-popup-cart) .variations_form .goldsmith-variations .goldsmith-terms.goldsmith-type-button > .goldsmith-term > .type-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-inline-size: 100%;
	min-block-size: 100%;
	padding: 0 !important;
	background: transparent !important;
	color: inherit !important;
	font: inherit;
	letter-spacing: inherit;
	line-height: inherit;
}

.single-product .goldsmith-product-summary:not(.goldsmith-product-bottom-popup-cart) .variations_form .goldsmith-variations .goldsmith-terms.goldsmith-type-button > .goldsmith-term.goldsmith-selected {
	border-color: var(--perfamix-choice-primary) !important;
	background: var(--perfamix-choice-primary) !important;
	box-shadow:
		0 0 0 2px rgba(var(--perfamix-choice-gold-rgb), 0.22),
		0 4px 12px rgba(38, 78, 54, 0.15);
	color: #fff !important;
}

/* The filled state is the indicator; suppress Goldsmith's floating tick. */
.single-product .goldsmith-product-summary:not(.goldsmith-product-bottom-popup-cart) .variations_form .goldsmith-variations .goldsmith-terms.goldsmith-type-button > .goldsmith-term.goldsmith-selected::before {
	content: none !important;
	display: none !important;
}

.single-product .goldsmith-product-summary:not(.goldsmith-product-bottom-popup-cart) .variations_form .goldsmith-variations .goldsmith-terms.goldsmith-type-button > .goldsmith-term.goldsmith-disabled {
	border-color: rgba(38, 78, 54, 0.22) !important;
	border-style: dashed !important;
	background: #f4f4f1 !important;
	box-shadow: none;
	color: #6d746f !important;
	cursor: not-allowed;
	opacity: 0.54 !important;
	text-decoration: line-through;
	transform: none;
}

.single-product .goldsmith-product-summary:not(.goldsmith-product-bottom-popup-cart) .variations_form .goldsmith-variations .goldsmith-terms.goldsmith-type-button > .goldsmith-term[role="radio"]:focus-visible {
	outline: 2px solid var(--perfamix-choice-primary);
	outline-offset: 3px;
	box-shadow: 0 0 0 5px rgba(var(--perfamix-choice-gold-rgb), 0.22);
}

@media (hover: hover) and (pointer: fine) {
	.single-product .goldsmith-product-summary:not(.goldsmith-product-bottom-popup-cart) .variations_form .goldsmith-variations .goldsmith-terms.goldsmith-type-button > .goldsmith-term:not(.goldsmith-selected):not(.goldsmith-disabled):hover {
		border-color: var(--perfamix-choice-primary) !important;
		background: rgba(var(--perfamix-choice-sand-rgb), 0.24) !important;
		box-shadow: 0 4px 10px rgba(38, 78, 54, 0.10);
		transform: translateY(-1px);
	}
}

@media (max-width: 767px) {
	.single-product .goldsmith-product-summary:not(.goldsmith-product-bottom-popup-cart) .variations_form .goldsmith-variations .goldsmith-terms.goldsmith-type-button {
		gap: 10px;
	}

	.single-product .goldsmith-product-summary:not(.goldsmith-product-bottom-popup-cart) .variations_form .goldsmith-variations .goldsmith-terms.goldsmith-type-button > .goldsmith-term {
		min-inline-size: 70px;
		min-block-size: 44px;
		padding: 11px 15px !important;
		font-size: 13px !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.single-product .goldsmith-product-summary:not(.goldsmith-product-bottom-popup-cart) .variations_form .goldsmith-variations .goldsmith-terms.goldsmith-type-button > .goldsmith-term {
		transition: none;
	}
}
