/* Proportional digits avoid the wide fixed-width spacing around narrow 1s. */
.hub-stats strong {
  font-variant-numeric: lining-nums proportional-nums;
  font-feature-settings: "tnum" 0, "pnum" 1;
  letter-spacing: -.025em;
}
.hub-stats strong small { letter-spacing: normal; }

/* Give Safari's native select the same dimensions as the adjoining inputs. */
#meal-form select[name="kind"] {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 48px;
  min-height: 48px;
  margin-top: 8px;
  border: 1px solid var(--border-strong, var(--line));
  border-radius: 10px;
  padding: 12px 44px 12px 12px;
  font: inherit;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--ink);
  background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23788770' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 20px;
}
[data-theme="dark"] #meal-form select[name="kind"] { background-color: #111914; }
.hub-columns:has(#meal-form) > .card:nth-child(2) > h2 { font-size: 1.5rem; line-height: 1.3; margin-top: 0; margin-bottom: 18px; }
.hub-columns:has(#meal-form) .log-row { align-items: center; padding: 14px 0; }
.hub-columns:has(#meal-form) .log-row .rep-badge { margin-bottom: 5px; line-height: 1.4; }
.hub-columns:has(#meal-form) .log-row h3 { font-size: 1.125rem; line-height: 1.4; margin: 0 0 6px; }
.hub-columns:has(#meal-form) .log-row p { line-height: 1.5; }

/* Draw the cross geometrically so its centre does not depend on the font. */
.icon-button[data-delete-meal] {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  font-size: 0;
  line-height: 1;
  align-self: center;
  cursor: pointer;
}
.icon-button[data-delete-meal]::before,
.icon-button[data-delete-meal]::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 15px;
  height: 1.8px;
  border-radius: 2px;
  background: currentColor;
  transform: translate(-50%, -50%) rotate(45deg);
}
.icon-button[data-delete-meal]::after { transform: translate(-50%, -50%) rotate(-45deg); }
.nutrition-delete-dialog {
  box-sizing: border-box;
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface, #fff);
  color: var(--ink);
  box-shadow: 0 24px 90px #0003;
}
.nutrition-delete-dialog::backdrop { background: #07130d80; backdrop-filter: blur(5px); }
.nutrition-dialog-label { display: block; padding-right: 26px; color: var(--accent-text); font-size: .6875rem; font-weight: 700; letter-spacing: .09em; }
.nutrition-delete-dialog h2 { margin: 14px 0 10px; font-size: 1.65rem; line-height: 1.2; letter-spacing: -.035em; }
.nutrition-delete-dialog p { margin: 0; color: var(--muted); font-size: .9375rem; line-height: 1.6; overflow-wrap: anywhere; }
.nutrition-dialog-close { position: absolute; top: 16px; right: 16px; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-alt); color: var(--muted); cursor: pointer; }
.nutrition-dialog-close svg { display: block; }
.nutrition-dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 25px; }
.nutrition-dialog-actions .btn { min-width: 0; margin: 0; padding: 12px 14px; }
.nutrition-delete-dialog .nutrition-delete-confirm { background: #a83529; border-color: #a83529; color: #fff; }
.nutrition-delete-dialog .nutrition-delete-confirm:hover { background: #912b21; }
[data-theme="dark"] .nutrition-delete-dialog .nutrition-delete-confirm { background: #f0a99a; border-color: #f0a99a; color: #35150f; }
[data-theme="dark"] .nutrition-delete-dialog .nutrition-delete-confirm:hover { background: #f6bbaf; }
@media (prefers-reduced-motion: no-preference) {
  .nutrition-delete-dialog[open] { animation: nutrition-dialog-in .18s ease-out; }
  @keyframes nutrition-dialog-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
}
@media (max-width: 480px) { .nutrition-delete-dialog { padding: 27px 22px; } }
