/* Jemark Swatches - front end */

.jmk-field { margin: 0; }

.jmk-swatches {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}
.jmk-swatches .jmk-item {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* ---- base swatch ---- */
.jmk-swatch {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	position: relative;
	cursor: pointer;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
	transition: box-shadow .15s ease, border-color .15s ease, opacity .15s ease;
}
.jmk-swatch:focus-visible {
	outline: 2px solid #1b1b1b;
	outline-offset: 3px;
}

/* colour / two-tone / image swatches: round chips, label hidden */
.jmk-swatches .jmk-swatch.jmk-type-single,
.jmk-swatches .jmk-swatch.jmk-type-dual,
.jmk-swatches .jmk-swatch.jmk-type-image {
	width: 34px;
	height: 34px;
	border-radius: var(--jmk-radius, 50%);
	border: 1px solid rgba(0, 0, 0, .25);
	background-clip: border-box;
}
.jmk-swatch.jmk-type-single .jmk-label,
.jmk-swatch.jmk-type-dual .jmk-label,
.jmk-swatch.jmk-type-image .jmk-label {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* selected ring */
.jmk-swatches .jmk-swatch.jmk-selected.jmk-type-single,
.jmk-swatches .jmk-swatch.jmk-selected.jmk-type-dual,
.jmk-swatches .jmk-swatch.jmk-selected.jmk-type-image {
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px #1b1b1b;
}

/* text buttons (sizes, or terms without a swatch) */
.jmk-swatches .jmk-swatch.jmk-type-text {
	min-width: 46px;
	padding: 8px 14px;
	border: 1px solid #cfcfcf;
	border-radius: 3px;
	background: #fff;
	color: #1b1b1b;
	font-size: 15px;
	line-height: 1.2;
}
.jmk-swatches .jmk-swatch.jmk-type-text:hover { border-color: #1b1b1b; }
.jmk-swatches .jmk-swatch.jmk-type-text.jmk-selected {
	border-color: #1b1b1b;
	box-shadow: inset 0 0 0 1px #1b1b1b;
	font-weight: 600;
}

/* not available for the current selection */
.jmk-swatches .jmk-swatch.jmk-disabled {
	opacity: .35;
	cursor: not-allowed;
	pointer-events: none;
}
.jmk-swatches .jmk-swatch.jmk-type-text.jmk-disabled { text-decoration: line-through; }
.jmk-swatches .jmk-swatch.jmk-type-single.jmk-disabled::after,
.jmk-swatches .jmk-swatch.jmk-type-dual.jmk-disabled::after,
.jmk-swatches .jmk-swatch.jmk-type-image.jmk-disabled::after {
	content: "";
	position: absolute;
	left: 10%; right: 10%; top: 50%;
	height: 1px;
	background: #1b1b1b;
	transform: rotate(-45deg);
}

.jmk-current {
	display: inline-block;
	margin-left: 8px;
	font-size: .95em;
	opacity: .75;
}

/* ---- shop cards ---- */
.jmk-card-swatches {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin: 10px 0 6px;
	line-height: 1;
	position: relative;
	z-index: 3;
}
.jmk-card-swatches .jmk-swatch.jmk-type-single,
.jmk-card-swatches .jmk-swatch.jmk-type-dual,
.jmk-card-swatches .jmk-swatch.jmk-type-image {
	width: var(--jmk-card-size, 22px);
	height: var(--jmk-card-size, 22px);
	border-radius: var(--jmk-radius, 50%);
	border: 1px solid rgba(0, 0, 0, .25);
}
.jmk-card-swatches .jmk-swatch.jmk-active {
	box-shadow: 0 0 0 2px #fff, 0 0 0 3px #1b1b1b;
}
.jmk-card-swatches .jmk-swatch.jmk-oos { opacity: .4; }
.jmk-card-swatches .jmk-swatch.jmk-type-text {
	padding: 3px 8px;
	border: 1px solid #cfcfcf;
	border-radius: 3px;
	background: #fff;
	color: #1b1b1b;
	font-size: 12px;
}
.jmk-card-swatches .jmk-more {
	font-size: 12px;
	color: #666;
	text-decoration: none;
}
