/* Elush Collections — storefront attribute selector */

.elush-collection {
	margin: 0 0 1.5em;
}

.elush-collection-axis {
	margin: 0 0 1em;
}

.elush-collection-label {
	display: block;
	font-weight: 600;
	margin: 0 0 0.4em;
}

.elush-collection-chosen {
	font-weight: 400;
	color: #6d6d6d;
}
.elush-collection-chosen:not(:empty)::before {
	content: ": ";
}

/* ---- Dropdown ---- */
.elush-collection-select {
	width: 100%;
	max-width: 100%;
}
.elush-collection-select option:disabled {
	color: #a9a9a9;
}

/* ---- Buttons / swatches ---- */
.elush-collection-options {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.elush-collection-option {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 3em;
	padding: 0.5em 0.9em;
	border: 1px solid #cfcfcf;
	border-radius: 4px;
	background: #fff;
	color: inherit;
	font-size: 0.95em;
	line-height: 1.2;
	cursor: pointer;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.elush-collection-option:hover:not(.is-unavailable) {
	border-color: #6d6d6d;
}

.elush-collection-option.is-selected {
	border-color: currentColor;
	box-shadow: inset 0 0 0 1px currentColor;
	font-weight: 600;
}

/* Unavailable options stay visible and struck through rather than being
   removed — a shopper should be able to see that the variant exists. */
.elush-collection-option.is-unavailable {
	color: #a9a9a9;
	border-color: #e6e6e6;
	cursor: not-allowed;
	text-decoration: line-through;
}

/* ---- Swatches ---- */
.elush-collection-option--swatch {
	width: 2.4em;
	height: 2.4em;
	min-width: 0;
	padding: 0;
	border-radius: 50%;
	background: var(--elush-swatch, #fff);
	overflow: hidden;
}

.elush-collection-option--swatch .elush-collection-option-label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.elush-collection-option--swatch.is-selected {
	box-shadow: 0 0 0 2px #fff inset, 0 0 0 2px currentColor;
}

.elush-collection-option--swatch.is-unavailable {
	opacity: 0.35;
	text-decoration: none;
}
.elush-collection-option--swatch.is-unavailable::after {
	content: "";
	position: absolute;
	left: 50%;
	top: -10%;
	width: 1px;
	height: 120%;
	background: #6d6d6d;
	transform: rotate(45deg);
}

/* ---- Back to the combination on screen ---- */
.elush-collection-reset {
	display: inline-block;
	margin: 0.5em 0 0;
	font-size: 0.85em;
	text-decoration: underline;
	opacity: 0.8;
}
/* Beats the display rule above — themes often reset [hidden] away. */
.elush-collection-reset[hidden] {
	display: none;
}
.elush-collection-reset:hover,
.elush-collection-reset:focus {
	opacity: 1;
}

/* ---- Notice ---- */
.elush-collection-notice {
	margin: 0.5em 0 0;
	color: #b26a00;
	font-size: 0.9em;
}

/* ---- Loading state during a swap ---- */
.summary.elush-collection-loading {
	position: relative;
}
.summary.elush-collection-loading::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba( 255, 255, 255, 0.45 );
	pointer-events: none;
}
.summary.elush-collection-loading .product_title,
.summary.elush-collection-loading p.price {
	opacity: 0.6;
}

@media ( prefers-reduced-motion: reduce ) {
	.elush-collection-option {
		transition: none;
	}
}
