/* =========================================================
   PRIMING SUGAR — CARD
   ========================================================= */

.hgps-calculator {
	padding: clamp(1.5rem, 4vw, 2.4rem);
	border: 1px solid var(--hg-line);
	border-radius: 18px;
	background: #fff;
	box-shadow:
		0 16px 44px
		rgba(11, 11, 11, .075);
}


.hgps-intro {
	margin-bottom: 0;
}


.hgps-field-note {
	max-width: 30rem;
}


/* =========================================================
   GRID
   ========================================================= */

.hgps-input-grid {
	display: grid;
	grid-template-columns:
		minmax(0, 1fr)
		minmax(0, 1.25fr)
		minmax(0, 1fr);
	gap: 1.55rem 1.5rem;
	align-items: start;
	margin-top: 1.9rem;
}


.hgps-field {
	min-width: 0;
}


.hgps-field:nth-child(4) {
	grid-column: 1 / 3;
}


.hgps-field:nth-child(5) {
	grid-column: 3;
}


/* =========================================================
   INPUTS
   ========================================================= */

.hgps input,
.hgps select {
	height: 52px;
	line-height: 1.2;
}


.hgps select {
	cursor: pointer;
}


/* =========================================================
   BEER VOLUME FIELD
   ========================================================= */

.hgps-field:first-child
.hgps-control-row {
	display: grid;
	grid-template-columns:
		minmax(72px, .8fr)
		minmax(88px, 1fr);
	gap: .5rem;
	width: 100%;
}


.hgps-field:first-child
.hgps-volume,
.hgps-field:first-child
.hgps-volume-unit {
	width: 100%;
	min-width: 0;
}


.hgps-field:first-child
.hgps-volume {
	padding-left: .8rem;
	padding-right: .35rem;
	text-align: left;
}


.hgps-field:first-child
.hgps-volume-unit {
	padding-left: .65rem;
	padding-right: 1.7rem;
}


.hgps-sugar {
	width: 100%;
}


/* =========================================================
   TOGGLES
   ========================================================= */

.hgps-toggle {
	height: 52px;
}


.hgps-toggle button {
	padding: .65rem .75rem;
}


/* =========================================================
   RESULT
   ========================================================= */

.hgps-result {
	margin-top: 2rem;
	padding: 1.65rem;
	border-radius: 14px;
	background: var(--hg-charcoal);
	color: var(--hg-offwhite);
}


.hgps-result-label {
	color: #D5D2CB;
	font-size: .78rem;
	font-weight: 800;
	letter-spacing: .065em;
	text-transform: uppercase;
}


.hgps-result-primary {
	margin-top: .25rem;
	color: var(--hg-amber);
	font-size: clamp(3rem, 8vw, 5.15rem);
	font-weight: 900;
	line-height: .98;
	letter-spacing: -.05em;
}


.hgps-result-secondary {
	margin-top: .35rem;
	color: #fff;
	font-size: 1.24rem;
	font-weight: 800;
}


.hgps-result-sugar {
	margin-top: .4rem;
	color: #D5D2CB;
	font-size: .9rem;
}


.hgps-result-details {
	display: grid;
	grid-template-columns:
		repeat(3, minmax(0, 1fr));
	gap: 1rem;
	margin-top: 1.4rem;
	padding-top: 1.2rem;
	border-top: 1px solid #383838;
}


.hgps-result-details div {
	display: flex;
	flex-direction: column;
	gap: .25rem;
}


.hgps-result-details span {
	color: #BDBAB2;
	font-size: .74rem;
	font-weight: 700;
	line-height: 1.35;
}


.hgps-result-details strong {
	color: var(--hg-offwhite);
	font-size: 1rem;
	line-height: 1.25;
}


/* =========================================================
   WARNINGS / NOTES
   ========================================================= */

.hgps-no-sugar-warning,
.hgps-high-carbonation-warning {
	margin-top: 1rem;
	padding: .95rem 1rem;
	border-left: 5px solid var(--hg-amber);
	background: #FFF6CF;
	line-height: 1.5;
}


.hgps-dme-note,
.hgps-method-note {
	max-width: 760px;
	margin: 1rem 0 0;
	color: #555;
	font-size: .88rem;
	line-height: 1.55;
}


/* =========================================================
   SAFETY
   ========================================================= */

.hgps-safety {
	margin-top: 2rem;
	padding: 1.25rem 1.4rem;
	border-left: 6px solid var(--hg-amber);
	background: #FFF8D9;
}


.hgps-safety > strong {
	font-size: 1.05rem;
}


.hgps-safety p {
	line-height: 1.55;
}


.hgps-safety p:last-child {
	margin-bottom: 0;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 960px) {

	.hgps-input-grid {
		grid-template-columns:
			repeat(2, minmax(0, 1fr));
	}

	.hgps-field:nth-child(4),
	.hgps-field:nth-child(5) {
		grid-column: auto;
	}

	.hgps-field:nth-child(4) {
		grid-column: 1 / 2;
	}

	.hgps-field:nth-child(5) {
		grid-column: 2 / 3;
	}
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 680px) {

	.hgps {
		margin: 2rem 0;
	}

	.hgps-calculator {
		padding: 1.25rem;
		border-radius: 14px;
	}

	.hgps-input-grid {
		grid-template-columns: 1fr;
		gap: 1.25rem;
	}

	.hgps-field:nth-child(4),
	.hgps-field:nth-child(5) {
		grid-column: auto;
	}

	.hgps-control-row {
		gap: .45rem;
	}

	.hgps-result {
		padding: 1.35rem;
	}

	.hgps-result-primary {
		font-size: 3.5rem;
	}

	.hgps-result-details {
		grid-template-columns: 1fr;
		gap: .75rem;
	}
}


/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 420px) {

	.hgps-control-row {
		flex-wrap: wrap;
	}

	.hgps-control-row > input {
		flex: 1 1 130px;
	}

	.hgps-toggle {
		flex-shrink: 0;
	}

	.hgps-field:first-child
	.hgps-control-row {
		grid-template-columns: 1fr;
	}

	.hgps-volume-unit {
		width: 100%;
	}

	.hgps-unit-label {
		min-height: 44px;
	}

	.hgps-result-primary {
		font-size: 3rem;
	}
}
