.ggb-weight {
	box-sizing: border-box;
	width: 100%;
	max-width: 36rem;
	margin: 0 0 1.25rem;
	padding: 1rem 1.1rem;
	border: 1px solid rgba(0, 0, 0, 0.14);
	border-color: color-mix(in srgb, currentColor 18%, transparent);
	border-radius: 0.5rem;
}

.ggb-weight *,
.ggb-weight *::before,
.ggb-weight *::after {
	box-sizing: border-box;
}

.ggb-weight__label {
	display: block;
	margin: 0 0 0.35rem;
	font-weight: 600;
}

.ggb-weight__hint {
	margin: 0 0 0.75rem;
	font-size: 0.92em;
	opacity: 0.85;
}

.ggb-weight__volume {
	margin: 0.35rem 0 0;
	color: #3d6624;
	font-size: 0.92em;
	font-weight: 600;
}

.ggb-weight__controls {
	display: flex;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: 0.5rem;
}

.ggb-weight__input,
.ggb-weight__unit {
	margin: 0;
	padding: 0.65rem 0.75rem;
	font: inherit;
	font-size: 1rem;
	line-height: 1.3;
	color: fieldtext;
	background: field;
	border: 1px solid rgba(0, 0, 0, 0.22);
	border-color: color-mix(in srgb, currentColor 28%, transparent);
	border-radius: 0.35rem;
}

.ggb-weight__input {
	flex: 1 1 12rem;
	min-width: 0;
	width: auto;
}

.ggb-weight select.ggb-weight__unit {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.ggb-weight__input:focus {
	outline: 2px solid #518036;
	outline-offset: 1px;
}

.ggb-weight__unit-fixed {
	display: flex;
	align-items: center;
	flex: 0 0 auto;
	padding: 0.65rem 0.9rem;
	border: 1px solid rgba(0, 0, 0, 0.22);
	border-radius: 0.35rem;
	color: #1f2a1c;
	background: #fff;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.3;
	text-transform: none;
}

.ggb-select {
	position: relative;
	flex: 0 0 7.5rem;
}

.ggb-select__face {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.35rem;
	height: 100%;
	padding: 0.65rem 0.75rem;
	border: 1px solid rgba(0, 0, 0, 0.22);
	border-radius: 0.35rem;
	color: #1f2a1c;
	background: #fff;
	font: inherit;
	font-size: 1rem;
	line-height: 1.3;
	text-transform: none;
	cursor: pointer;
}

.ggb-select__face:focus {
	outline: 2px solid #518036;
	outline-offset: 1px;
}

.ggb-select__value {
	text-transform: none;
}

.ggb-select__chevron {
	flex: 0 0 auto;
	color: #5d6856;
}

.ggb-select__menu {
	position: absolute;
	z-index: 30;
	top: calc(100% + 0.3rem);
	right: 0;
	left: 0;
	margin: 0;
	padding: 0.3rem;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 0.5rem;
	background: #fff;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
	list-style: none;
}

.ggb-select__menu[hidden] {
	display: none;
}

.ggb-select__option {
	padding: 0.45rem 0.6rem;
	border-radius: 0.35rem;
	color: #1f2a1c;
	font-size: 0.95rem;
	text-transform: none;
	cursor: pointer;
}

.ggb-select__option:hover,
.ggb-select__option.is-selected {
	background: #e8f2df;
}

.ggb-weight__result,
.ggb-weight__price,
.ggb-weight__warning {
	margin: 0.75rem 0 0;
}

.ggb-weight__price {
	font-weight: 600;
}

.ggb-weight__warning {
	padding: 0.55rem 0.7rem;
	border-left: 3px solid #9b3d12;
	background: color-mix(in srgb, #9b3d12 12%, transparent);
}

.ggb-weight__warning[hidden] {
	display: none;
}

.ggb-weight__notice {
	align-self: start;
	flex: 0 0 auto;
	width: 100%;
	max-width: 36rem;
	height: auto !important;
	min-height: 0 !important;
	margin: 0.75rem 0 1rem;
	padding: 0.75rem 0.85rem;
	border: 1px solid color-mix(in srgb, #518036 35%, transparent);
	border-radius: 0.35rem;
	background: color-mix(in srgb, #518036 10%, transparent);
}

.ggb-weight__notice p {
	margin: 0;
	min-height: 0;
}

.ggb-weight__notice::before,
.ggb-weight__notice::after {
	content: none;
	display: none;
}

.ggb-cart-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
}

form.cart:has(.ggb-weight) .ggb-cart-actions .single_add_to_cart_button,
form.cart:has(.ggb-weight) .ggb-cart-actions a.ggb-view-cart {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: auto !important;
	margin: 0 !important;
	text-decoration: none !important;
}

form.cart:has(.ggb-weight) a.ggb-view-cart,
form.cart:has(.ggb-weight) a.ggb-view-cart:visited {
	border: 0 !important;
	color: #fff !important;
	background: #518036 !important;
}

form.cart:has(.ggb-weight) a.ggb-view-cart:hover,
form.cart:has(.ggb-weight) a.ggb-view-cart:focus {
	color: #fff !important;
	background: #3d6624 !important;
}

.ggb-per-bag {
	font-size: 0.85em;
	font-weight: 400;
	white-space: nowrap;
}

.ggb-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

form:has(.ggb-weight) .quantity,
.ggb-weight ~ .quantity,
.quantity:has(.ggb-qty-input) {
	display: none;
}

form.cart:has(.ggb-weight) .single_add_to_cart_button:disabled,
form.cart:has(.ggb-weight) .single_add_to_cart_button[disabled] {
	border-color: #518036 !important;
	color: #fff !important;
	background: #518036 !important;
	box-shadow: none !important;
	cursor: not-allowed;
	opacity: 0.45;
}
