@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* WDN Ultimate Front-End Swatches Layout */
.wdn-swatches-wrapper {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 10px 0 15px 0;
	padding: 0;
}

.wdn-swatches-wrapper * {
	box-sizing: border-box;
}

/* Swatch Item Base */
.wdn-swatch-item {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #d4d4d8;
	padding: 1px;
	cursor: pointer;
	position: relative;
	transition: border-color 0.15s ease, transform 0.15s ease;
	background: #ffffff;
}

.wdn-swatch-item:hover {
	border-color: #18181b;
}

.wdn-swatch-item.selected {
	border-color: #18181b;
	border-width: 2px;
	padding: 0; /* Adjust for thicker border */
}

/* Shapes */
.wdn-swatches-shape-circle .wdn-swatch-item {
	border-radius: 50%;
}
.wdn-swatches-shape-circle .wdn-swatch-inner {
	border-radius: 50%;
}

.wdn-swatches-shape-rounded .wdn-swatch-item {
	border-radius: 6px;
}
.wdn-swatches-shape-rounded .wdn-swatch-inner {
	border-radius: 4px;
}

.wdn-swatches-shape-square .wdn-swatch-item {
	border-radius: 0;
}
.wdn-swatches-shape-square .wdn-swatch-inner {
	border-radius: 0;
}

/* Swatch Inner Bullets */
.wdn-swatch-inner {
	display: block;
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: center;
	overflow: hidden;
}

.wdn-swatch-color-bullet {
	border: 1px solid rgba(0,0,0,0.08);
}

.wdn-swatch-image-bullet {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wdn-swatch-text-bullet {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-weight: 500;
	color: #09090b;
	padding: 0 8px;
	height: 100%;
}

/* Tooltip Styles */
.wdn-swatch-tooltip-box {
	position: absolute;
	bottom: 125%;
	left: 50%;
	transform: translateX(-50%) translateY(4px);
	background: #18181b;
	color: #ffffff;
	padding: 4px 8px;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 500;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.15s ease, transform 0.15s ease;
	z-index: 100;
	box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.wdn-swatch-tooltip-box::after {
	content: '';
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	border-width: 4px;
	border-style: solid;
	border-color: #18181b transparent transparent transparent;
}

.wdn-has-tooltip .wdn-swatch-item:hover .wdn-swatch-tooltip-box {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

/* Out of Stock configurations */
.wdn-swatch-item.out-of-stock {
	opacity: 0.4;
	cursor: not-allowed;
}

.wdn-swatch-item.out-of-stock::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: linear-gradient(to top right, transparent 46%, #ef4444 49%, #ef4444 51%, transparent 54%);
	pointer-events: none;
}

.wdn-swatch-item.out-of-stock:hover {
	border-color: #d4d4d8;
}
