/**
 * WooCommerce Variation Swatches - Frontend Styles
 * 100% RTL & Responsive
 */

.nexashop-swatches-wrapper {
	margin-bottom: 18px;
}

.nexashop-swatch-header {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 10px;
	font-family: inherit;
}

.nexashop-swatch-title {
	font-size: 15px;
	font-weight: 700;
	color: #1e293b;
}

.nexashop-swatch-selected-val {
	font-size: 14px;
	font-weight: 600;
	color: #ef394e;
	transition: color 0.2s ease;
}

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

/* Base Item */
.nexashop-swatch-item {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	user-select: none;
	background: #ffffff;
	border: 1.5px solid #e2e8f0;
	transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
	outline: none;
}

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

.nexashop-swatch-item.is-selected {
	border-color: #0f172a !important;
	border-width: 2px !important;
	box-shadow: 0 0 0 1px #0f172a;
}

/* Shapes */
.nexashop-shape-rounded .nexashop-swatch-item {
	border-radius: 10px;
}

.nexashop-shape-circle .nexashop-swatch-item {
	border-radius: 50%;
}

.nexashop-shape-square .nexashop-swatch-item {
	border-radius: 2px;
}

/* Image Swatch (matching media_1789910498660.png) */
.nexashop-swatches-image .nexashop-swatch-item {
	width: 54px;
	height: 54px;
	padding: 2px;
	overflow: hidden;
}

.nexashop-size-small.nexashop-swatches-image .nexashop-swatch-item {
	width: 42px;
	height: 42px;
}

.nexashop-size-large.nexashop-swatches-image .nexashop-swatch-item {
	width: 66px;
	height: 66px;
}

.nexashop-swatch-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: inherit;
	display: block;
}

/* Color Swatch */
.nexashop-swatches-color .nexashop-swatch-item {
	width: 38px;
	height: 38px;
	padding: 3px;
}

.nexashop-size-small.nexashop-swatches-color .nexashop-swatch-item {
	width: 30px;
	height: 30px;
	padding: 2px;
}

.nexashop-size-large.nexashop-swatches-color .nexashop-swatch-item {
	width: 46px;
	height: 46px;
	padding: 3px;
}

.nexashop-swatch-color-bullet {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: inherit;
	border: 1px solid rgba(0, 0, 0, 0.08);
}

/* Label / Button Swatch (Pill design matching media_1789910498660.png) */
.nexashop-swatches-label .nexashop-swatch-item {
	min-width: 48px;
	height: 38px;
	padding: 0 16px;
	border-radius: 12px;
	font-size: 14px;
	font-weight: 700;
	color: #1e293b;
	background: #ffffff;
}

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

.nexashop-size-large.nexashop-swatches-label .nexashop-swatch-item {
	min-width: 56px;
	height: 44px;
	padding: 0 20px;
	font-size: 15px;
}

.nexashop-swatches-label .nexashop-swatch-item.is-selected {
	background: #f8fafc;
	color: #0f172a;
}

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

/* Radio Swatch */
.nexashop-swatches-radio .nexashop-swatch-item {
	padding: 8px 14px;
	border-radius: 8px;
	gap: 8px;
}

.nexashop-swatch-radio-input {
	margin: 0;
	cursor: pointer;
}

.nexashop-swatch-radio-text {
	font-size: 13px;
	font-weight: 600;
	color: #1e293b;
}

/* Disabled & Out of Stock States */
.nexashop-swatch-item.is-disabled,
.nexashop-swatch-item.is-out-of-stock {
	opacity: 0.4;
	cursor: not-allowed !important;
	border-color: #e2e8f0 !important;
	transform: none !important;
	box-shadow: none !important;
}

.nexashop-swatch-item.is-out-of-stock::after {
	content: '';
	position: absolute;
	top: 50%;
	left: -2px;
	right: -2px;
	height: 1.5px;
	background: #ef4444;
	transform: rotate(45deg);
	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: 12px;
	font-weight: 500;
	padding: 4px 10px;
	border-radius: 6px;
	white-space: nowrap;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	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-width: 4px;
	border-style: solid;
	border-color: #1e293b transparent transparent transparent;
}

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