/* ===== MINIMAL HEMA-STYLE VARIATION SELECTOR ===== */

.dt-attribute-dropdowns {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin: 1rem 0;
}

.dt-attribute-dropdowns__field {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.dt-attribute-dropdowns__label {
	font-size: 0.8rem;
	font-weight: 600;
	color: #111827;
}

.dt-attribute-dropdowns__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

/* ===== BASE CHIP STYLES ===== */
.dt-attribute-chip {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
	border: 1px solid #e5e7eb;
	border-radius: 4px;
	background-color: #ffffff;
	font-size: 0.85rem;
	font-weight: 500;
	color: #111827;
	cursor: pointer;
	transition: border-color 0.15s ease;
	text-decoration: none;
	box-sizing: border-box;
}

/* ===== COLOR CHIPS (with images) ===== */
.dt-attribute-chip--with-image {
	flex-direction: column;
	align-items: center;
	gap: 0.25rem;
	flex: 0 0 auto;
	width: 70px;
	padding: 4px;
}

/* ===== SIZE/PERSON CHIPS (text-only buttons) ===== */
.dt-attribute-chip--text-only {
	flex-direction: row;
	justify-content: center;
	flex: 0 0 auto;
	padding: 0.5rem 0.875rem;
	min-height: 36px;
}

/* Hide check indicator completely - not used in minimal design */
.dt-attribute-chip__check {
	display: none;
}

/* Product image - small square */
.dt-attribute-chip__image {
	width: 100%;
	aspect-ratio: 1 / 1;
	border-radius: 2px;
	background-color: #f9fafb;
	overflow: hidden;
}

.dt-attribute-chip__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Color name label - minimal styling */
.dt-attribute-chip__color {
	display: block;
	font-size: 0.65rem;
	font-weight: 500;
	color: #6b7280;
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
	padding: 0;
	background: none;
	border: none;
	text-transform: none;
	letter-spacing: normal;
}

/* Value text */
.dt-attribute-chip__value {
	font-size: 0.85rem;
	font-weight: 500;
	color: #111827;
	line-height: 1.3;
	white-space: nowrap;
}

/* Hide value for image chips (color name is shown instead) */
.dt-attribute-chip--with-image .dt-attribute-chip__value {
	display: none;
}

/* Value for text-only chips */
.dt-attribute-chip--text-only .dt-attribute-chip__value {
	display: inline;
}

/* ===== HOVER STATE ===== */
.dt-attribute-chip:hover,
.dt-attribute-chip:focus-visible {
	border-color: #9ca3af;
	outline: none;
}

/* ===== SELECTED STATE ===== */
.dt-attribute-chip--selected {
	border: 2px solid var(--color-primary, #84B082);
	cursor: default;
}

.dt-attribute-chip--selected:hover {
	border-color: var(--color-primary, #84B082);
}

/* Adjust padding for 2px border */
.dt-attribute-chip--with-image.dt-attribute-chip--selected {
	padding: 3px;
}

.dt-attribute-chip--text-only.dt-attribute-chip--selected {
	padding: calc(0.5rem - 1px) calc(0.875rem - 1px);
}

/* ===== OUT OF STOCK STYLING ===== */

/* Base out-of-stock */
.dt-attribute-chip--oos {
	cursor: not-allowed;
}

.dt-attribute-chip--oos:hover,
.dt-attribute-chip--oos:focus-visible {
	border-color: #e5e7eb;
}

/* Out of stock label - red text */
.dt-attribute-chip__oos-label {
	display: block;
	font-size: 0.6rem;
	font-weight: 500;
	color: #dc2626;
	white-space: nowrap;
	padding: 0;
	background: none;
	border: none;
	text-transform: none;
	letter-spacing: normal;
}

/* ===== OUT OF STOCK - IMAGE CHIPS ===== */
.dt-attribute-chip--with-image.dt-attribute-chip--oos {
	border-color: #e5e7eb;
	opacity: 1;
	background: #ffffff;
}

.dt-attribute-chip--with-image.dt-attribute-chip--oos:hover {
	border-color: #e5e7eb;
}

/* Keep image visible - no heavy grayscale */
.dt-attribute-chip--with-image.dt-attribute-chip--oos .dt-attribute-chip__image {
	filter: none;
	opacity: 0.6;
}

.dt-attribute-chip--with-image.dt-attribute-chip--oos .dt-attribute-chip__color {
	color: #9ca3af;
}

/* OOS label for image chips */
.dt-attribute-chip--with-image .dt-attribute-chip__oos-label {
	font-size: 0.55rem;
	text-align: center;
}

/* ===== OUT OF STOCK - TEXT-ONLY CHIPS ===== */
.dt-attribute-chip--text-only.dt-attribute-chip--oos {
	border-color: #e5e7eb;
	background: #ffffff;
	opacity: 1;
}

.dt-attribute-chip--text-only.dt-attribute-chip--oos:hover {
	border-color: #e5e7eb;
}

.dt-attribute-chip--text-only.dt-attribute-chip--oos .dt-attribute-chip__value {
	color: #9ca3af;
	text-decoration: line-through;
}

/* OOS label for text-only chips */
.dt-attribute-chip--text-only .dt-attribute-chip__oos-label {
	margin-left: 0.35rem;
	font-size: 0.65rem;
}

/* ===== RESPONSIVE STYLES ===== */

/* Mobile */
@media (max-width: 639px) {
	.dt-attribute-chip--with-image {
		width: 60px;
	}

	.dt-attribute-chip--text-only {
		padding: 0.4rem 0.7rem;
		min-height: 32px;
	}

	.dt-attribute-chip__value {
		font-size: 0.8rem;
	}

	.dt-attribute-chip__color {
		font-size: 0.6rem;
	}

	.dt-attribute-chip__oos-label {
		font-size: 0.55rem;
	}
}

/* Loading Spinner Overlay */
.dt-attribute-dropdowns {
	position: relative;
}

.dt-attribute-loading {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: rgba(249, 250, 251, 0.85);
	border-radius: 14px;
	z-index: 10;
	opacity: 0;
	animation: dt-fade-in 0.15s ease forwards;
}

@keyframes dt-fade-in {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

.dt-attribute-spinner {
	position: relative;
	width: 44px;
	height: 44px;
}

.dt-attribute-spinner::before {
	content: '';
	position: absolute;
	inset: 0;
	border: 3px solid rgba(47, 191, 113, 0.2);
	border-radius: 50%;
}

.dt-attribute-spinner::after {
	content: '';
	position: absolute;
	inset: 0;
	border: 3px solid transparent;
	border-top-color: #2fbf71;
	border-radius: 50%;
	animation: dt-spin 0.8s linear infinite;
}

@keyframes dt-spin {
	from {
		transform: rotate(0deg);
	}

	to {
		transform: rotate(360deg);
	}
}

.dt-attribute-loading__text {
	position: absolute;
	bottom: -1.75rem;
	left: 50%;
	transform: translateX(-50%);
	font-size: 0.75rem;
	font-weight: 600;
	color: #374151;
	white-space: nowrap;
}