@layer components {

/* FDA-style nutrition facts label */
.nutrition-label {
  width: 100%;
  padding: 0.6rem;
  border: 2px solid var(--color-dark);
  font-family: Arial, Helvetica, sans-serif;
  color: var(--color-text);
}

.nutrition-label__heading {
  margin: 0 0 0.3rem;
  border-bottom: 7px solid var(--color-dark);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.25;
}

.nutrition-label__servings,
.nutrition-label__size {
  margin: 0.15rem 0;
  font-size: 0.7rem;
  font-weight: 700;
}

.nutrition-label__size {
  padding-bottom: 0.2rem;
  border-bottom: 1px solid var(--color-dark);
}

.nutrition-label__amount-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0.25rem 0;
  border-bottom: 7px solid var(--color-dark);
}

.nutrition-label__amount-per {
  margin: 0;
  font-size: 0.55rem;
  font-weight: 700;
}

.nutrition-label__calories-label {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.15;
}

.nutrition-label__calories-value {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
}

.nutrition-label__dv-header {
  margin: 0;
  padding-top: 0.2rem;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid var(--color-dark);
  text-align: right;
  font-size: 0.6rem;
  font-weight: 700;
}

.nutrition-label__table,
.nutrition-label__minerals {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.7rem;
}

.nutrition-label__table td,
.nutrition-label__minerals td {
  padding: 0.2rem 0;
  border-bottom: 1px solid #b5b5b5;
}

/* Top-level nutrient rows (Total Fat, Cholesterol, Sodium…) are bold;
   their indented sub-nutrients (Saturated Fat, Dietary Fiber…) are not —
   but every %Daily Value figure is bold regardless of indent level. */
.nutrition-label__table td:first-child {
  font-weight: 700;
}

.nutrition-label__table tr.is-indent td:first-child {
  padding-left: 0.75rem;
  font-weight: 400;
}

.nutrition-label__table tr:last-child td {
  border-bottom: 3px solid var(--color-dark);
}

/* Vitamins/minerals (Vitamin D, Calcium, Iron) are always regular weight. */
.nutrition-label__minerals td:first-child {
  font-weight: 400;
}

.nutrition-label__table td:last-child,
.nutrition-label__minerals td:last-child {
  font-weight: 700;
}

.nutrition-label__amount {
  font-weight: 400;
}

.nutrition-label__dv {
  text-align: right;
}

.nutrition-label__footnote {
  margin: 0.4rem 0 0;
  font-size: 0.55rem;
  line-height: 1.35;
  color: var(--color-text);
}

/* Comparison table + ingredients panel */
.nutrition-panel {
  padding: 0.85rem;
  border: 1.5px solid var(--brand-primary);
  border-radius: 10px;
}

.nutrition-panel h4 {
  margin: 0 0 0.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--brand-primary);
  color: var(--brand-primary);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.nutrition-panel__note {
  margin: -0.25rem 0 0.5rem;
  color: var(--brand-primary);
  font-size: 0.7rem;
}

.nutrition-compare {
  width: 100%;
  border-collapse: collapse;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.75rem;
}

.nutrition-compare th,
.nutrition-compare td {
  padding: 0.4rem;
  text-align: left;
}

.nutrition-compare thead th {
  background: var(--brand-primary);
  color: var(--brand-tertiary);
  font-family: var(--font-condensed);
  font-size: 0.7rem;
  font-weight: 700;
}

.nutrition-compare tbody td {
  border-bottom: 1px solid var(--color-border);
  color: var(--brand-primary);
}

.nutrition-compare tbody tr:last-child td {
  border-bottom: none;
}

/* Nutrient name and the per-whole-package figure are bold; the
   per-unit/per-serving figure in the middle column stays regular. */
.nutrition-compare tbody td:first-child,
.nutrition-compare tbody td:last-child {
  font-weight: 700;
}

.nutrition-panel__ingredients {
  margin: 0 0 0.5rem;
  color: var(--brand-primary);
  font-family: var(--font-condensed);
  font-size: 0.8rem;
  line-height: 1.5;
}

.nutrition-panel__allergens {
  margin: 0;
  color: #9b5538;
  font-family: var(--font-condensed);
  font-size: 0.8rem;
  line-height: 1.5;
}

}
