/* AI Product Portal - product page: color swatches. */

.aipp-swatch-wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
	margin: 4px 0 6px;
}

.aipp-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

/* The theme styles all buttons: these rules keep the swatches round and plain. */
.aipp-swatches .aipp-swatch {
	position: relative;
	box-sizing: border-box !important;
	display: inline-block !important;
	width: 34px !important;
	height: 34px !important;
	min-width: 0 !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 1px solid rgba(0, 0, 0, 0.2) !important;
	border-radius: 50% !important;
	box-shadow: none !important;
	background-image: none !important;
	font-size: 0 !important;
	line-height: 0 !important;
	text-indent: 0 !important;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: box-shadow 0.12s ease;
}

/* Light colors get a thin dark outline, like the card. */
.aipp-swatches .aipp-swatch.is-light {
	border: 1.5px solid #000 !important;
}

.aipp-swatches .aipp-swatch[aria-checked="true"] {
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px #000 !important;
}

.aipp-swatches .aipp-swatch:focus-visible {
	outline: 2px solid #000 !important;
	outline-offset: 4px !important;
}

.aipp-swatches .aipp-swatch:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.aipp-swatches .aipp-swatch:disabled::after {
	content: "";
	position: absolute;
	top: -1px;
	right: -1px;
	bottom: -1px;
	left: -1px;
	border-radius: 50%;
	background: linear-gradient(to top right, transparent calc(50% - 1px), #000 calc(50% - 1px), #000 calc(50% + 1px), transparent calc(50% + 1px));
}

.aipp-swatch-name {
	font-size: 0.95em;
}

/* The dropdown stays in the page (WooCommerce works with it) but is not shown. */
.aipp-native {
	display: none !important;
}

.aipp-swatch-host .nice-select,
.aipp-swatch-host .select2-container,
.aipp-swatch-host .chosen-container {
	display: none !important;
}

@media (prefers-reduced-motion: reduce) {
	.aipp-swatches .aipp-swatch {
		transition: none;
	}
}
