/* Deliberately light: the theme's own fonts and colours do most of the work. */
.pack-calculator {
	flex: 1 0 100%;
	width: 100%;
	font-size: 0.85em;
	line-height: 1.4;
}

.pack-calculator[hidden] {
	display: none;
}

.pack-calculator__pack {
	margin: 0 0 1em;
	opacity: 0.75;
}

.pack-calculator__pack .amount {
	font-weight: inherit;
}

.pack-calculator__field {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4em 1em;
}

.pack-calculator__label {
	flex: 1 0 100%;
	font-weight: 600;
}

.pack-calculator .pack-calculator__area {
	width: 7em;
	min-height: 0;
	padding: 0.5em 0.6em;
	font-size: inherit;
}

.pack-calculator__help {
	flex: 1 0 100%;
	text-decoration: none;
	opacity: 0.75;
}

.pack-calculator__help:hover,
.pack-calculator__help:focus {
	opacity: 1;
}

/* Doubled-up selector so shop themes that style every form label don't make this bold. */
.pack-calculator label.pack-calculator__wastage {
	display: flex;
	align-items: center;
	gap: 0.5em;
	margin-top: 0.75em;
	font-weight: 400;
	cursor: pointer;
}

.pack-calculator__result {
	margin: 0.9em 0 0;
	padding: 0.6em 0.8em;
	border-radius: 3px;
	background: rgba(0, 0, 0, 0.04);
}

/*
 * Phones. Sizes are fixed here because shop themes often shrink their base text on
 * small screens, and iOS zooms the page when an input's text is under 16px.
 */
@media (max-width: 767px) {
	.pack-calculator {
		font-size: 14px;
	}

	.pack-calculator .pack-calculator__area {
		font-size: 16px;
	}
}
