/* Storage note and empty-list placeholder. */
.local-storage-note {
  font-size: 10px;
  line-height: 1.55;
  color: #8a7660;
  background: #f8f3e9;
  border: 1px solid #eee5d6;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 13px;
}

.empty-state {
  padding: 20px 12px;
  text-align: center;
  color: #8f998f;
  font-size: 11px;
  line-height: 1.55;
  background: #fafbf8;
  border: 1px dashed #e3e9e1;
  border-radius: 9px;
  margin: 12px 0 2px;
}

/* Saved food and exercise entries. */
.saved-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0eb;
}

.saved-entry:last-child {
  border-bottom: 0;
}

.saved-entry .entry-main {
  min-width: 0;
  flex: 1;
}

.saved-entry strong {
  display: block;
  font-size: 11px;
  color: #34483a;
}

.saved-entry span {
  display: block;
  font-size: 10px;
  color: #919a92;
  margin-top: 4px;
}

.saved-entry .entry-numbers {
  text-align: right;
  white-space: nowrap;
  font: 700 11px Manrope, sans-serif;
  color: #526653;
}

.saved-entry .entry-numbers span {
  font: 400 10px 'DM Sans', sans-serif;
}

.saved-entry .entry-symbol {
  width: 35px;
  height: 35px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #eef3eb;
  color: #678365;
  flex: 0 0 35px;
}

.saved-entry.exercise .entry-symbol {
  background: #f8eee6;
  color: #c9895d;
}

/* Local-only data messaging and supporting card copy. */
.local-only-card {
  background: #f8f6ef;
  border-color: #ebe7dd;
}

.local-only-card p {
  font-size: 11px;
  line-height: 1.6;
  color: #7e867d;
  margin: 9px 0 0;
}

/* Date input and controls for removing an entry. */
.entry-date {
  max-width: 100%;
  height: 37px;
  border: 1px solid #e4e7df;
  border-radius: 7px;
  padding: 0 9px;
  background: #fcfcfa;
  font: 12px 'DM Sans', sans-serif;
  color: #394a3f;
}

.removable-entry {
  position: relative;
  min-width: 0;
}

.removable-entry .food-entry,
.removable-entry .saved-entry {
  padding-right: 34px;
}

.entry-delete {
  position: absolute;
  right: 3px;
  top: 50%;
  transform: translateY(-50%);
  width: 25px;
  height: 25px;
  border: 1px solid #e6e8df;
  border-radius: 50%;
  background: #fff;
  color: #8a7660;
  font: 500 17px/1 'DM Sans', sans-serif;
  cursor: pointer;
  opacity: 0.72;
}

.entry-delete:hover,
.entry-delete:focus-visible {
  opacity: 1;
  background: #f8eee6;
  color: #a85f3b;
  border-color: #e8d1c1;
  outline: none;
}

/* Keep long modal content scrollable within the viewport. */
.modal {
  max-height: 92vh;
  overflow-y: auto;
}

/* Nutrition summary tiles adapt to tablet and phone widths. */
.nutrition-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.nutrition-stats .stat-tile {
  padding: 12px;
}

.nutrition-stats .stat-tile strong {
  font-size: 17px;
  margin: 6px 0 2px;
}

.nutrition-stats .stat-tile > span {
  font-size: 8px;
}

.nutrition-stats .progress-track {
  margin-top: 8px;
}

@media (max-width: 760px) {
  .local-storage-note {
    font-size: 9px;
  }

  .saved-entry {
    gap: 9px;
  }

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

@media (max-width: 390px) {
  .nutrition-stats .stat-tile:last-child {
    grid-column: auto;
  }
}
