.tvp-box {
	--tvp-accent: #111;
	margin: 0 0 22px;
	font-family: inherit;
}
.tvp-box .tvp-group { margin-bottom: 18px; }
.tvp-title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 10px;
	font-size: 15px;
	font-weight: 700;
	color: #222;
}
.tvp-title .tvp-chosen { font-weight: 500; color: #777; }
.tvp-options { display: flex; flex-wrap: wrap; gap: 10px; }

.tvp-swatch, .tvp-size { position: relative; margin: 0; cursor: pointer; }
.tvp-swatch input, .tvp-size input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}
.tvp-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Colors */
.tvp-dot {
	position: relative;
	display: block;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--c);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18);
	transition: transform .15s ease, box-shadow .15s ease;
}
.tvp-swatch:hover .tvp-dot { transform: scale(1.08); }
.tvp-swatch input:checked + .tvp-dot {
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18), 0 0 0 2px #fff, 0 0 0 4px var(--tvp-accent);
}
.tvp-swatch input:checked + .tvp-dot::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 11px;
	height: 6px;
	border-left: 2px solid var(--k);
	border-bottom: 2px solid var(--k);
	transform: translate(-50%, -65%) rotate(-45deg);
}
.tvp-swatch input:focus-visible + .tvp-dot,
.tvp-size input:focus-visible + span {
	outline: 2px solid var(--tvp-accent);
	outline-offset: 3px;
}

/* Sizes */
.tvp-size span {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 48px;
	height: 44px;
	padding: 0 14px;
	border: 1px solid #d6d6d6;
	border-radius: 10px;
	background: #fff;
	color: #222;
	font-weight: 600;
	transition: all .15s ease;
}
.tvp-size:hover span { border-color: var(--tvp-accent); }
.tvp-size input:checked + span {
	background: var(--tvp-accent);
	border-color: var(--tvp-accent);
	color: #fff;
}

/* Unavailable */
.is-disabled { cursor: not-allowed; }
.tvp-size.is-disabled span {
	border-color: #e5e5e5;
	color: #aaa;
	background:
		linear-gradient(to top right, transparent calc(50% - 1px), #c7c7c7, transparent calc(50% + 1px)),
		#fafafa;
}
.tvp-size.is-disabled:hover span { border-color: #e5e5e5; }
.tvp-swatch.is-disabled { opacity: .5; }
.tvp-swatch.is-disabled:hover .tvp-dot { transform: none; }
.tvp-swatch.is-disabled .tvp-dot::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: linear-gradient(to top right, transparent calc(50% - 1px), #e53935, transparent calc(50% + 1px));
}

.tvp-note { min-height: 0; font-size: 13px; color: #c0392b; }
.tvp-note:not(:empty) { margin-top: 4px; }
.tvp-error {
	display: none;
	margin-top: 8px;
	padding: 10px 14px;
	border-radius: 8px;
	background: #fdecea;
	color: #b3261e;
	font-size: 14px;
}
.tvp-error.is-visible { display: block; animation: tvp-shake .3s; }
@keyframes tvp-shake {
	0%, 100% { transform: translateX(0); }
	25% { transform: translateX(-4px); }
	75% { transform: translateX(4px); }
}

@media (max-width: 480px) {
	.tvp-size span { min-width: 44px; height: 42px; padding: 0 12px; }
}

/* Square swatches */
.tvp-square .tvp-dot,
.tvp-square .tvp-swatch.is-disabled .tvp-dot::before { border-radius: 4px; }
.tvp-square .tvp-dot { width: 34px; height: 34px; }

/* Dropdown sizes */
.tvp-select {
	display: block;
	width: 100%;
	max-width: 100%;
	height: 46px;
	padding: 0 12px;
	border: 1px solid #d6d6d6;
	border-radius: 6px;
	background-color: #fff;
	color: #222;
	font-family: inherit;
	font-size: 14px;
}
.tvp-select:focus { outline: 2px solid var(--tvp-accent); outline-offset: 1px; }
