/**
 * NexaShop Product Variations & Swatches Styles
 * Matching media_1789925536451.png
 */

.nexashop-variations-widget-wrap {
	direction: rtl;
	display: flex;
	flex-direction: column;
	gap: 20px;
	margin: 16px 0 24px 0;
	box-sizing: border-box;
	font-family: inherit;
}

/* Swatch Row */
.nexashop-swatch-row {
	display: flex;
	flex-direction: column;
	width: 100%;
}

/* Header (Title & Selected Value) */
.nexashop-swatch-header {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 12px;
}

.nexashop-swatch-row-title {
	font-size: 14px;
	font-weight: 800;
	color: #0f172a;
	line-height: 1.4;
}

.nexashop-swatch-selected-val {
	font-size: 13.5px;
	font-weight: 600;
	color: #475569;
}

/* List Container */
.nexashop-swatches-list {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	position: relative;
}

/* Base Swatch Item */
.nexashop-swatch-item {
	position: relative;
	cursor: pointer;
	user-select: none;
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
	box-sizing: border-box;
	outline: none;
}

/* ==========================================================================
   Row 1: Image Swatches (Image / Model Swatches)
   ========================================================================== */
.nexashop-swatches-image-list {
	gap: 10px;
}

.nexashop-swatch-item-image {
	width: 64px;
	height: 70px;
	border: 1.5px solid #e2e8f0;
	border-radius: 8px;
	background-color: #ffffff;
	padding: 2px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.nexashop-swatch-item-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 6px;
	display: block;
	transition: transform 0.2s ease;
}

.nexashop-swatch-item-image:hover {
	border-color: #94a3b8;
	transform: translateY(-2px);
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.nexashop-swatch-item-image:hover img {
	transform: scale(1.04);
}

.nexashop-swatch-item-image.is-active,
.nexashop-swatch-item-image.is-selected {
	border-color: #0288d1;
	box-shadow: 0 0 0 2px #0288d1;
	transform: translateY(-2px);
}

/* ==========================================================================
   Row 2: Label / Button Pill Swatches (Size / Attribute Pills)
   ========================================================================== */
.nexashop-swatches-label-list {
	gap: 10px;
}

.nexashop-swatch-item-label {
	min-width: 52px;
	height: 44px;
	padding: 0 16px;
	border: 1.5px solid #e2e8f0;
	border-radius: 12px;
	background-color: #ffffff;
	color: #1e293b;
	font-size: 14px;
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.nexashop-swatch-item-label .nexashop-pill-text {
	line-height: 1;
	letter-spacing: 0.5px;
}

.nexashop-swatch-item-label:hover {
	border-color: #cbd5e1;
	background-color: #f8fafc;
	color: #0f172a;
}

.nexashop-swatch-item-label.is-active,
.nexashop-swatch-item-label.is-selected {
	border-color: #0288d1;
	color: #0288d1;
	background-color: #f0f9ff;
	box-shadow: 0 0 0 1.5px #0288d1;
}

/* Out of Stock / Disabled State */
.nexashop-swatch-item.is-disabled {
	opacity: 0.35;
	cursor: not-allowed;
	pointer-events: none;
	position: relative;
	background-color: #f1f5f9;
}

.nexashop-swatch-item.is-disabled::after {
	content: '';
	position: absolute;
	top: 50%;
	left: -10%;
	right: -10%;
	height: 1.5px;
	background-color: #ef4444;
	transform: rotate(-35deg);
	pointer-events: none;
}

/* Floating Tooltip */
.nexashop-swatch-tooltip {
	position: absolute;
	bottom: calc(100% + 8px);
	left: 50%;
	transform: translateX(-50%) translateY(4px);
	background: #1e293b;
	color: #ffffff;
	font-size: 11.5px;
	font-weight: 600;
	padding: 4px 8px;
	border-radius: 6px;
	white-space: nowrap;
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	transition: all 0.2s ease;
	z-index: 50;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nexashop-swatch-tooltip::after {
	content: '';
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	border: 4px solid transparent;
	border-top-color: #1e293b;
}

.nexashop-swatch-item:hover .nexashop-swatch-tooltip {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(0);
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
	.nexashop-variations-widget-wrap {
		gap: 16px;
		margin: 12px 0 18px 0;
	}

	.nexashop-swatch-item-image {
		width: 56px;
		height: 62px;
	}

	.nexashop-swatch-item-label {
		min-width: 44px;
		height: 40px;
		padding: 0 12px;
		font-size: 13px;
	}

	.nexashop-swatches-image-list,
	.nexashop-swatches-label-list,
	.nexashop-swatches-color-list {
		gap: 8px;
	}
}

/* ==========================================================================
   Color Swatches
   ========================================================================== */
.nexashop-swatches-color-list {
	gap: 12px;
}

.nexashop-swatch-item-color {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	padding: 3px;
	border: 1.5px solid transparent;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
	background-color: transparent;
}

.nexashop-swatch-color-inner {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	display: block;
	border: 1px solid rgba(0, 0, 0, 0.1);
	box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
	position: relative;
}

.nexashop-swatch-item-color:hover {
	border-color: #cbd5e1;
	transform: scale(1.1);
}

.nexashop-swatch-item-color.is-active,
.nexashop-swatch-item-color.is-selected {
	border-color: #0288d1;
	transform: scale(1.15);
}

.nexashop-swatch-item-color.is-active .nexashop-swatch-color-inner::after,
.nexashop-swatch-item-color.is-selected .nexashop-swatch-color-inner::after {
	content: "\f147";
	font-family: dashicons;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: #fff;
	font-size: 14px;
	text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
