.lelam-attribute-selector {
	--lelam-attribute-border: rgba(0, 0, 0, 0.14);
	color: currentColor;
	display: block;
}

/* Accordion section ------------------------------------------------------ */
.lelam-attribute-selector__group {
	border-top: 1px solid var(--lelam-attribute-border);
}
.lelam-attribute-selector__group:last-child {
	border-bottom: 1px solid var(--lelam-attribute-border);
}

.lelam-attribute-selector__head {
	appearance: none;
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 16px 0;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-align: left;
	cursor: pointer;
}

.lelam-attribute-selector__chevron {
	flex: 0 0 auto;
	width: 8px;
	height: 8px;
	border-right: 1px solid currentColor;
	border-bottom: 1px solid currentColor;
	transform: rotate(45deg);
	transition: transform 0.2s ease;
}
.lelam-attribute-selector__group.is-open .lelam-attribute-selector__chevron {
	transform: rotate(-135deg);
}

/* Body ------------------------------------------------------------------- */
.lelam-attribute-selector__body {
	overflow: hidden;
	padding-bottom: 18px;
}
.lelam-attribute-selector__group:not(.is-open) .lelam-attribute-selector__body {
	display: none;
}

.lelam-attribute-selector__choices {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

/* Choice / swatch -------------------------------------------------------- */
.lelam-attribute-selector__choice {
	appearance: none;
	position: relative;
	display: inline-flex;
	align-items: center;
	padding: 0;
	border: 1px solid var(--lelam-attribute-border);
	background: #fff;
	color: inherit;
	cursor: pointer;
}
.lelam-attribute-selector__choice.is-selected {
	border-color: #111;
}

.lelam-attribute-selector__swatch {
	display: block;
	width: 26px;
	height: 26px;
	background: var(--lelam-attribute-color, transparent);
}
.lelam-attribute-selector__swatch img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Checkmark on selected colour / image swatch */
.lelam-attribute-selector__choice:not(.lelam-attribute-selector__choice--text).is-selected::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 48%;
	width: 5px;
	height: 9px;
	border-right: 1.5px solid #fff;
	border-bottom: 1.5px solid #fff;
	transform: translate(-50%, -50%) rotate(45deg);
	filter: drop-shadow( 0 0 1px rgba(0, 0, 0, 0.4) );
}

/* Text label swatch */
.lelam-attribute-selector__swatch--text {
	width: auto;
	min-width: 44px;
	height: 36px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 14px;
	font-size: 12px;
	letter-spacing: 0.04em;
	line-height: 1;
}
.lelam-attribute-selector__choice--text.is-selected {
	background: #111;
	border-color: #111;
	color: #fff;
}

/* Visually-hidden accessible label */
.lelam-attribute-selector__choice-label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Hide the native WooCommerce variation rows we mirror */
.lelam-attribute-selector-hidden-field {
	display: none !important;
}

/* Editor preview */
.lelam-attribute-selector.is-editing {
	padding: 8px 12px;
	border: 1px dashed rgba(0, 0, 0, 0.2);
	border-radius: 6px;
}
