/* ==========================================================
   MODESI – volba velikosti prstenu
   ========================================================== */

.modesi-rss {
	--modesi-rss-red: #b20000;
	--modesi-rss-text: #333333;
	--modesi-rss-border: #d8d8d8;
	--modesi-rss-muted: #9a9a9a;
	--modesi-rss-bg: #ffffff;

	width: 100%;
	margin: 8px 0 14px;
	color: var(--modesi-rss-text);
	font-family: inherit;
}

.modesi-rss *,
.modesi-rss *::before,
.modesi-rss *::after {
	box-sizing: border-box;
}

.modesi-rss__heading {
	margin-bottom: 8px;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.35;
}

.modesi-rss__buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.modesi-rss__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	margin: 0;
	padding: 4px 9px;
	border: 1px solid var(--modesi-rss-border);
	border-radius: 0;
	background: var(--modesi-rss-bg);
	box-shadow: none;
	color: var(--modesi-rss-text);
	font-family: inherit;
	font-size: 13px;
	font-weight: 500;
	line-height: 1;
	cursor: pointer;
	transition:
		border-color 0.16s ease,
		background-color 0.16s ease,
		color 0.16s ease;
}

.modesi-rss__button:hover,
.modesi-rss__button:focus-visible {
	border-color: #777777;
	background: #f7f7f7;
	color: #111111;
	outline: none;
}

.modesi-rss__button.is-selected {
	border-color: var(--modesi-rss-red);
	background: var(--modesi-rss-red);
	color: #ffffff;
}

.modesi-rss__button.is-unavailable,
.modesi-rss__button:disabled {
	border-color: #e4e4e4;
	background:
		linear-gradient(
			to top right,
			transparent 47%,
			#cfcfcf 48%,
			#cfcfcf 52%,
			transparent 53%
		),
		#fafafa;
	color: var(--modesi-rss-muted);
	cursor: not-allowed;
	opacity: 0.72;
}

.modesi-rss__status {
	min-height: 16px;
	margin-top: 7px;
	color: #777777;
	font-size: 11px;
	line-height: 1.35;
}

/*
 * Původní WooCommerce select ponecháváme v dokumentu kvůli funkčnosti
 * a přístupnosti, ale vizuálně jej skryjeme až po úspěšném vytvoření tlačítek.
 */
select.modesi-rss__native-select {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: -1px !important;
	padding: 0 !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	clip-path: inset(50%) !important;
	border: 0 !important;
	white-space: nowrap !important;
}

/* WooCommerce tabulka variant */
.single-product form.variations_form table.variations td.value {
	position: relative;
}

/* Mobil */
@media (max-width: 600px) {
	.modesi-rss__buttons {
		gap: 5px;
	}

	.modesi-rss__button {
		min-width: 34px;
		height: 34px;
		padding: 4px 8px;
		font-size: 12px;
	}
}

/* ==========================================================
   MODESI – doladění výběru velikosti prstenu
   ========================================================== */

/* Skrytí duplicitního textu „Vyberte velikost prstenu“ */
.modesi-rss__heading {
	display: none;
}

/* Odstranění šipky původního selectu vytvořené šablonou Divi */
.single-product form.variations_form table.variations td.value::after,
.single-product form.variations_form table.variations .value::after,
.single-product form.variations_form .select-wrapper::after {
	display: none !important;
	content: none !important;
}

/* Kompaktnější umístění tlačítek */
.single-product .modesi-rss {
	margin-top: 0;
	margin-bottom: 5px;
}

.single-product .modesi-rss__buttons {
	align-items: center;
}

/* Informace o právě zvolené velikosti */
.single-product .modesi-rss__status {
	min-height: 0;
	margin-top: 7px;
	color: #777777;
	font-size: 11px;
}

/* Odkaz Zrušit výběr */
.single-product form.variations_form .reset_variations {
	position: static !important;
	display: inline-block !important;
	float: none !important;
	clear: both;
	margin: 5px 0 0 !important;
	padding: 0 !important;
	color: #777777 !important;
	font-size: 11px !important;
	font-weight: 400;
	line-height: 1.4;
	text-decoration: underline;
	text-underline-offset: 3px;
	opacity: 1 !important;
}

.single-product form.variations_form .reset_variations:hover {
	color: #b20000 !important;
}

/* Menší mezera pod celým řádkem variant */
.single-product form.variations_form table.variations {
	margin-bottom: 16px;
}

/* Odstranění šipky původního selectu v Divi */
.single-product .et_pb_wc_add_to_cart form.cart .variations td.value > span::after,
.single-product form.variations_form .variations td.value > span::after {
	display: none !important;
	content: none !important;
	border: 0 !important;
	width: 0 !important;
	height: 0 !important;
}

.single-product .variations td.value > span[data-is-span-added="1"]::after {
	display: none !important;
	content: none !important;
	border: 0 !important;
}