.edu-po {
	text-align: start;
	justify-content: flex-start;
	align-items: stretch;
	--edu-primary: rgb(11, 46, 91);
	--edu-border: #dfe3ea;
	--edu-muted: #6b7380;
	--edu-error: #c62828;
	width: 100%;
	flex: 0 0 100%;
	margin: 4px 0 20px;
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.edu-po__group {
	margin: 0;
	padding: 0;
	min-width: 0;
	text-align: start;
}

.edu-po .edu-po__head {
	display: flex;
	align-items: baseline;
	justify-content: flex-start;
	gap: 6px;
	margin: 0 0 10px;
	font-size: 15px;
	line-height: 1.4;
	text-align: start;
}

.edu-po .edu-po__label {
	font-weight: 600;
	color: #242424;
}

.edu-po__current {
	font-weight: 400;
	color: var(--edu-muted);
}

.edu-po__list {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0;
	padding: 0;
}

.edu-po input[type="radio"] {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
	pointer-events: none;
}

/* Colors */
.edu-po__color {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	margin: 0;
	border-radius: 50%;
	border: 2px solid transparent;
	cursor: pointer;
	transition: border-color .15s ease, transform .15s ease;
}

.edu-po__dot {
	display: block;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--edu-dot);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12);
}

.edu-po__color.is-light .edu-po__dot {
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25);
}

.edu-po__color:hover {
	transform: scale(1.06);
}

.edu-po__color:has(input:checked) {
	border-color: var(--edu-primary);
}

.edu-po__color:has(input:checked)::after {
	content: "";
	position: absolute;
	width: 9px;
	height: 15px;
	border: solid #fff;
	border-width: 0 2.5px 2.5px 0;
	transform: translateY(-2px) rotate(45deg);
	filter: drop-shadow(0 0 1px rgba(0, 0, 0, .5));
}

.edu-po__color.is-light:has(input:checked)::after {
	border-color: #222;
	filter: none;
}

/* Sizes */
.edu-po__size {
	position: relative;
	margin: 0;
	cursor: pointer;
}

.edu-po__size span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 54px;
	height: 42px;
	padding: 0 14px;
	border: 1.5px solid var(--edu-border);
	border-radius: 10px;
	background: #fff;
	color: #242424;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .3px;
	transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}

.edu-po__size:hover span {
	border-color: var(--edu-primary);
}

.edu-po__size input:checked + span {
	background: var(--edu-primary);
	border-color: var(--edu-primary);
	color: #fff;
}

/* Focus (keyboard) */
.edu-po__color:has(input:focus-visible),
.edu-po__size input:focus-visible + span {
	outline: 2px solid var(--edu-primary);
	outline-offset: 3px;
}

/* Error */
.edu-po__error {
	display: none;
	margin: 8px 0 0;
	font-size: 13px;
	color: var(--edu-error);
}

.edu-po__group.has-error .edu-po__error {
	display: block;
}

.edu-po__group.has-error .edu-po__size span {
	border-color: rgba(198, 40, 40, .55);
}

.edu-po__group.is-shaking {
	animation: edu-po-shake .35s ease;
}

@keyframes edu-po-shake {
	0%, 100% { transform: translateX(0); }
	25% { transform: translateX(-5px); }
	75% { transform: translateX(5px); }
}

/* Make the WoodMart cart form wrap so the picker sits on its own row above qty + buttons */
form.cart:has(.edu-po) {
	flex-wrap: wrap;
}

@media (max-width: 768px) {
	.edu-po {
		gap: 16px;
		margin-bottom: 16px;
	}

	.edu-po__list--sizes {
		display: grid;
		grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
		gap: 8px;
	}

	.edu-po__size span {
		width: 100%;
		min-width: 0;
		padding: 0 6px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.edu-po__color,
	.edu-po__size span {
		transition: none;
	}

	.edu-po__group.is-shaking {
		animation: none;
	}
}
