/**
 * Botão «Ver stock» na ficha do produto.
 */

.weg-stock {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin: 10px 0 14px;
}

/*
 * Reset defensivo. Os temas costumam estilizar todos os <button> com fundo
 * e cor próprios, com selectores mais específicos do que os nossos, o que
 * deixaria este botão invisível. Aqui o !important é a escolha certa: não
 * sabemos que regras o tema traz, e o botão tem de se ver sempre.
 */
.weg-stock .weg-stock__button--link,
.weg-stock .weg-stock__button--link:hover,
.weg-stock .weg-stock__button--link:focus,
.weg-stock .weg-stock__button--link:active {
	display: inline !important;
	width: auto !important;
	min-height: 0 !important;
	background: none !important;
	background-color: transparent !important;
	background-image: none !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	padding: 0 !important;
	margin: 0 !important;
	font: inherit !important;
	font-size: 0.95em !important;
	line-height: inherit !important;
	letter-spacing: normal !important;
	text-transform: none !important;
	text-shadow: none !important;
	color: inherit !important;
	opacity: 1;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.weg-stock .weg-stock__button--link:hover:not( :disabled ) {
	opacity: 0.7;
}

.weg-stock .weg-stock__button--link:disabled {
	opacity: 0.45;
	cursor: default;
	text-decoration: none;
}

.weg-stock .weg-stock__button:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.weg-stock .weg-stock__button--theme:disabled {
	opacity: 0.5;
	cursor: default;
}

.weg-stock__result {
	font-size: 0.9em;
	line-height: 1.4;
}

.weg-stock__result:empty {
	display: none;
}

.weg-stock__result.is-loading {
	opacity: 0.7;
	font-style: italic;
}

.weg-stock__result.is-ok {
	font-weight: 600;
}

.weg-stock__result.is-error,
.weg-stock__result.is-empty {
	opacity: 0.8;
}
