/**
 * Tip Top Yards Product Experience — variation card selector.
 * Loaded only on variable product pages. Depends on tokens in single-product.css.
 */
.tty-pxe-options {
	margin: 18px 0 22px;
}

.tty-pxe-step {
	margin-bottom: 22px;
}

.tty-pxe-step-header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 10px;
}

.tty-pxe-step-title {
	color: var(--tty-pxe-heading);
	font-size: 15px;
	font-weight: 800;
	line-height: 1.25;
	margin: 0;
}

.tty-pxe-step-title span {
	color: var(--tty-pxe-green);
	margin-right: 6px;
}

.tty-pxe-step-selected {
	color: var(--tty-pxe-body);
	font-size: 12px;
	font-weight: 700;
	text-align: right;
}

.tty-pxe-grid {
	display: grid;
	gap: 10px;
}

.tty-pxe-grid--color {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tty-pxe-grid--size,
.tty-pxe-grid--type {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tty-pxe-card {
	position: relative;
	width: 100%;
	min-height: 74px;
	padding: 13px;
	border: 1px solid var(--tty-pxe-border);
	border-radius: var(--tty-pxe-radius-md);
	background: #fff;
	box-shadow: none;
	text-align: left;
	cursor: pointer;
	transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.tty-pxe-card:hover {
	border-color: rgba(111, 173, 47, .65);
	box-shadow: var(--tty-pxe-shadow-card);
	transform: translateY(-1px);
}

.tty-pxe-card.is-active {
	border-color: var(--tty-pxe-green);
	box-shadow: 0 0 0 2px rgba(111, 173, 47, .16);
}

.tty-pxe-card.is-unavailable {
	opacity: .48;
	cursor: not-allowed;
	background: #f5f6f3;
}

.tty-pxe-card.is-unavailable:hover {
	transform: none;
	box-shadow: none;
	border-color: var(--tty-pxe-border);
}

/* Size / type cards are the hero: larger, centred, generous tap target. */
.tty-pxe-grid--size .tty-pxe-card,
.tty-pxe-grid--type .tty-pxe-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	min-height: 104px;
	padding: 18px 14px;
	text-align: center;
}

.tty-pxe-grid--size .tty-pxe-card.is-active,
.tty-pxe-grid--type .tty-pxe-card.is-active {
	background: #f3f8ec;
}

.tty-pxe-grid--size .tty-pxe-card-title,
.tty-pxe-grid--type .tty-pxe-card-title {
	font-size: 17px;
	font-weight: 900;
	letter-spacing: -.01em;
	margin-bottom: 0;
}

.tty-pxe-card-title {
	display: block;
	color: var(--tty-pxe-heading);
	font-size: 14px;
	font-weight: 800;
	line-height: 1.25;
	margin-bottom: 5px;
}

/* Short descriptor under a size/type title, e.g. "Perfect for small spaces". */
.tty-pxe-card-sub {
	display: block;
	color: var(--tty-pxe-body);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.3;
}

/* Price is secondary information — small and quiet.
   Selectors are aggressive (and use !important) on purpose: Flatsome/WooCommerce
   set an explicit large font-size on the inner amount span, which otherwise wins. */
.tty-pxe-card-price {
	display: block;
	margin: 6px 0 0;
	line-height: 1.2;
}

.tty-pxe-card-price,
.tty-pxe-card-price .price,
.tty-pxe-card-price .amount,
.tty-pxe-card-price .woocommerce-Price-amount,
.tty-pxe-card-price .woocommerce-Price-currencySymbol,
.tty-pxe-card-price bdi,
.tty-pxe-card-price ins,
.tty-pxe-card-price ins .amount {
	font-size: 13px !important;
	font-weight: 700 !important;
	line-height: 1.2 !important;
	color: var(--tty-pxe-green-dark) !important;
	text-decoration: none !important;
	background: none !important;
}

/* Hide the struck-through regular price inside a card to keep it to one line. */
.tty-pxe-card-price del {
	display: none !important;
}

/* Compact, single-line unavailable note. */
.tty-pxe-card-note {
	display: block;
	color: var(--tty-pxe-danger);
	font-size: 11px;
	font-weight: 700;
	line-height: 1.2;
	margin-top: 5px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.tty-pxe-popular {
	position: absolute;
	right: 9px;
	top: 9px;
	display: inline-flex;
	min-height: 20px;
	align-items: center;
	padding: 0 8px;
	border-radius: 999px;
	background: var(--tty-pxe-green);
	color: #fff;
	font-size: 10px;
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: .03em;
	box-shadow: 0 1px 2px rgba(7, 56, 47, .18);
}

/* Colour card internals -------------------------------------------------- */
.tty-pxe-colour-layout {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 10px;
	align-items: start;
}

.tty-pxe-swatches {
	display: flex;
	gap: 4px;
	padding-top: 2px;
}

.tty-pxe-swatch {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--swatch, #ccc);
	border: 1px solid rgba(0, 0, 0, .18);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
}

.tty-pxe-swatch.is-clear {
	background: linear-gradient(135deg, rgba(255, 255, 255, .88) 0%, rgba(255, 255, 255, .88) 48%, rgba(190, 210, 220, .8) 49%, rgba(190, 210, 220, .8) 52%, rgba(255, 255, 255, .88) 53%);
}

.tty-pxe-colour-detail {
	display: block;
	color: var(--tty-pxe-body);
	font-size: 11.5px;
	font-weight: 700;
	line-height: 1.35;
	margin-top: 3px;
}

.tty-pxe-reset {
	display: inline-flex;
	align-items: center;
	color: var(--tty-pxe-body);
	font-size: 12px;
	font-weight: 800;
	text-decoration: underline;
	cursor: pointer;
	margin-top: 4px;
	background: transparent;
	border: 0;
	padding: 0;
}

@media (max-width: 849px) {
	/* Two options per row on mobile (was one — too much scrolling). */
	.tty-pxe-grid--color,
	.tty-pxe-grid--size,
	.tty-pxe-grid--type {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
	}

	.tty-pxe-card {
		min-height: 64px;
		padding: 11px;
	}

	/* Compact colour cards so two fit comfortably side by side. */
	.tty-pxe-grid--color .tty-pxe-card {
		padding: 10px;
	}

	.tty-pxe-colour-layout {
		gap: 7px;
	}

	.tty-pxe-swatch {
		width: 16px;
		height: 16px;
	}

	.tty-pxe-card-title {
		font-size: 13px;
	}

	.tty-pxe-colour-detail {
		font-size: 10.5px;
	}

	.tty-pxe-grid--size .tty-pxe-card,
	.tty-pxe-grid--type .tty-pxe-card {
		min-height: 86px;
		padding: 14px 10px;
	}

	.tty-pxe-grid--size .tty-pxe-card-title,
	.tty-pxe-grid--type .tty-pxe-card-title {
		font-size: 15px;
	}
}

@media (max-width: 360px) {
	/* Very small phones: colour cards get their own row for legibility. */
	.tty-pxe-grid--color {
		grid-template-columns: 1fr;
	}
}
