/* =====================================================================
   ROLAND'S DELI — EDITOR-FRIENDLY MENU LISTS v2.0
   CSS only. Bootstrap 5 breakpoint-compatible. No extra spans or dots.

   <ul class="deli-menu">
     <li>Bologna <strong>10.5</strong></li>
     <li>Special <strong>11</strong><ul><li>Ham &amp; Salami</li></ul></li>
   </ul>

   The name is the LI's text node. The price is the direct-child STRONG.
   Grid lays out the anonymous text item, generated dotted leader,
   and STRONG price. Nested UL is the optional description.
   ===================================================================== */

/* Modify these variables on .deli-menu or the component's parent. */
:root {
  --deli-ingredient-font: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --deli-ingredient-font: 'Patrick Hand', cursive;
  
  --deli-title-font: 'Amatic SC', 'Arial Narrow', sans-serif;
   --deli-title-font: 'Cabin Sketch', cursive;
  
  --deli-price-font: 'Oswald', Impact, 'Arial Narrow', sans-serif;
   --deli-price-font:  'Patrick Hand', cursive;
   
  --deli-description-font: Georgia, 'Times New Roman', serif;
  --deli-ingredient-yellow: #e9de69;
  --deli-text-white: #f8f7f1;
  --deli-description-color: #e4ded5;
  --deli-separator-red: #ed242d;
  --deli-dots: #d6d0c6;
}

/* Ingredient / request ULs: desktop pipes, mobile vertical lists. */
:is(.deli-options, .deli-options-request) {
  display: flex;
  justify-content: center;
  align-items: baseline;
  flex-wrap: wrap;
  list-style: none;
  gap: 0;
  margin: 0;
  padding: 0;
  text-align: center;
  font-family: var(--deli-ingredient-font);
  font-weight: 500;
  line-height: 1.25;
  text-transform: uppercase;
}
.deli-options {
  color: var(--deli-ingredient-yellow);
  font-size: clamp(1.05rem, 1.55vw, 1.45rem);
}
.deli-options-request {
  color: var(--deli-text-white);
  font-size: clamp(.93rem, 1.24vw, 1.18rem);
  margin-top: .12rem;
}
:is(.deli-options, .deli-options-request) > li {
  display: inline-flex;
  align-items: baseline;
  flex: 0 0 auto;
  list-style: none;
  margin: 0;
  padding: 0;
  white-space: nowrap;
  font: inherit;
  color: inherit;
}
:is(.deli-options, .deli-options-request) > li + li::before {
  content: '|';
  margin-inline: .32em;
  font-weight: 400;
  color: currentColor;
}

/* Sandwich UL — 3 per row; unfinished final row centered. */
.deli-menu {
  --deli-item-padding: clamp(.9rem, 2.05vw, 1.75rem);
  --deli-red-square-size: 9px;
  --deli-name-size: clamp(2.05rem, 2.85vw, 2.8rem);
  --deli-price-size: clamp(1.6rem, 2.45vw, 2.45rem);

  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: flex-start;
  list-style: none;
  width: 100%;
  max-width: 1220px;
  margin: clamp(1.6rem, 3.5vw, 2.9rem) auto 0;
  padding: 0;
  row-gap: clamp(1rem, 2vw, 1.65rem);
  color: var(--deli-text-white);
}

/* Each LI is a two-row grid:
   row 1: name (anonymous text item) | dots (::before) | price (<strong>)
   row 2: optional description (<ul>)
   Use plain text for name, followed by direct-child STRONG for price. */
.deli-menu > li {
  position: relative;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, max-content) minmax(.5rem, 1fr) max-content;
  grid-template-rows: min-content auto;
  align-items: baseline;
  column-gap: clamp(.28rem, .6vw, .65rem);

  flex: 0 0 33.333333%;
  max-width: 33.333333%;
  min-width: 0;
  margin: 0;
  padding: 0 var(--deli-item-padding);
  list-style: none;

  /* Applies to the plain-text name only; <strong> has its own font. */
  font-family: var(--deli-title-font);
  font-size: var(--deli-name-size);
  font-weight: 700;
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--deli-text-white);
}

/* Generated dotted leader is a grid item, not authoring markup. */
.deli-menu > li::before {
  content: '';
  display: block;
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  min-width: 0;
  height: 3px;
  margin-bottom: .22em;
  background-image: radial-gradient(circle, var(--deli-dots) 1.1px, transparent 1.35px);
  background-size: 7px 3px;
  background-repeat: repeat-x;
  background-position: left center;
}

/* Prices can have completely independent font / size / weight / color. */
.deli-menu > li > :is(strong, b) {
  display: block;
  grid-column: 3;
  grid-row: 1;
  margin: 0;
  padding: 0;
  white-space: nowrap;
  font-family: var(--deli-price-font);
  font-size: var(--deli-price-size);
  font-weight: 600;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  text-transform: none;
  color: var(--deli-text-white);
}

/* Red squares are anchored to the FIRST ROW'S type size, never to
   the combined height of name + optional descriptions. */
@media (min-width: 992px) {
  .deli-menu > li:not(:nth-child(3n)):not(:last-child)::after {
    content: '';
    position: absolute;
    width: var(--deli-red-square-size);
    height: var(--deli-red-square-size);
    top: calc(var(--deli-name-size) * .525);
    right: 0;
    transform: translate(50%, -50%);
    background-color: var(--deli-separator-red);
    pointer-events: none;
  }
}

/* Description list: separate font, wraps naturally. */
.deli-menu > li > ul {
  grid-column: 1 / -1;
  grid-row: 2;
  display: block;
  list-style: none;
  min-width: 0;
  margin: .18rem 0 0;
  padding: 0;
  color: var(--deli-description-color);
}
.deli-menu > li > ul > li {
  display: block;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--deli-description-font);
  font-size: clamp(1rem, 1.65vw, 1.4rem);
  font-weight: 400;
  line-height: 1.27;
  text-transform: none;
  white-space: normal;
  overflow-wrap: break-word;
  color: var(--deli-description-color);
}

/* Bootstrap 5 lg: single-column sandwich entries below 992px. */
@media (max-width: 991.98px) {
  .deli-menu {
    --deli-name-size: clamp(1.95rem, 6vw, 2.7rem);
    --deli-price-size: clamp(1.5rem, 5.4vw, 2.2rem);
    max-width: 680px;
    margin-top: 1.6rem;
    row-gap: 1rem;
  }
  .deli-menu > li {
    flex: 0 0 100%;
    max-width: 100%;
    padding-inline: clamp(.5rem, 3.8vw, 1.4rem);
    overflow-wrap: anywhere;
  }
  .deli-menu > li > ul > li {
    font-size: clamp(1rem, 3.6vw, 1.3rem);
  }
}

/* Bootstrap 5 md: stack ingredients; remove pipe separators. */
@media (max-width: 767.98px) {
  :is(.deli-options, .deli-options-request) {
    flex-direction: column;
    align-items: center;
    flex-wrap: nowrap;
    row-gap: .17rem;
    font-size: clamp(1rem, 4.7vw, 1.25rem);
  }
  :is(.deli-options, .deli-options-request) > li + li::before {
    content: none;
  }
  .deli-options-request { margin-top: .85rem; }
}
