/* HNZ Stores Core — swatches + printable design selector (front-end) */

/* Hide the native selects but keep them accessible to WooCommerce/JS. */
.variations select.hnz-native-select {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
}

.hnz-swatch-group {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 4px 0;
}

.hnz-swatch {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	border: 1px solid var(--hnz-line, #e0ddd6);
	border-radius: 6px;
	cursor: pointer;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	color: var(--hnz-ink, #16130f);
	transition: all 0.18s ease;
	padding: 0;
}

/* Text swatches (sizes) */
.hnz-swatch-text {
	min-width: 46px;
	height: 44px;
	padding: 0 14px;
}
.hnz-swatch-text:hover {
	border-color: var(--hnz-ink, #16130f);
}
.hnz-swatch-text.is-active {
	background: var(--hnz-primary, #16130f);
	color: #fff;
	border-color: var(--hnz-primary, #16130f);
}

/* Color swatches */
.hnz-swatch-color {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	padding: 3px;
}
.hnz-swatch-dot {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	border: 1px solid rgba(0, 0, 0, 0.12);
}
.hnz-swatch-color.is-active {
	border-color: var(--hnz-ink, #16130f);
	box-shadow: 0 0 0 2px #fff inset;
}

/* Unavailable (for the currently selected combination) */
.hnz-swatch.is-disabled {
	opacity: 0.4;
	cursor: not-allowed;
}
.hnz-swatch.is-disabled::after {
	content: "";
	position: absolute;
	inset: 50% 6% auto 6%;
	height: 1px;
	background: currentColor;
	transform: rotate(-18deg);
}

/* ------------------------------------------------ Printable designs --- */
/* Rendered to visually match the theme's color image-swatches:
   a row of round thumbnails with a selected ring, and the chosen
   design's name shown next to the "طرح:" label. */
.hnz-designs {
	margin: 20px 0;
}
.hnz-designs__title {
	font-size: 14px;
	margin-bottom: 12px;
	color: #222;
}
.hnz-designs__label {
	font-weight: 400;
}
.hnz-designs__selected {
	font-weight: 700;
}
.hnz-designs__title .hnz-required {
	color: #c0392b;
	margin-inline-start: 2px;
}
.hnz-designs__grid {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0;
}
.hnz-design {
	position: relative;
	display: inline-flex;
	cursor: pointer;
	margin: 0;
	line-height: 0;
}
.hnz-design input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	pointer-events: none;
}
.hnz-design__thumb {
	display: block;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	object-fit: cover;
	border: 1px solid #e2e2e2;
	box-sizing: border-box;
	background: #f4f4f4;
	transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.hnz-design:hover .hnz-design__thumb {
	border-color: #a0a0a0;
}
.hnz-design__thumb--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 10px;
	line-height: 1.2;
	font-weight: 600;
	color: #555;
	text-align: center;
	padding: 4px;
	overflow: hidden;
}
/* Selected ring — mirrors the active color swatch. */
.hnz-design.is-selected .hnz-design__thumb,
.hnz-design:has(input:checked) .hnz-design__thumb {
	border-color: #111;
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px #111;
}
.hnz-designs__error {
	color: #c0392b;
	font-size: 13px;
	margin-top: 10px;
	display: none;
}
.hnz-designs.has-error .hnz-designs__error {
	display: block;
}

/* Block the add-to-cart button until a «طرح» is chosen (like color/size). */
.single_add_to_cart_button.hnz-design-blocked {
	opacity: 0.45 !important;
	cursor: not-allowed !important;
	pointer-events: none !important;
}
