/*
 * Menus page (For Families > Menus). Enqueued only on that page.
 * Markup comes from build/gen_menus.py; buttons and the Today marker from
 * lceca-menus.js. Accessibility target: WCAG 2.2 AA.
 */

.lc-menus { padding-bottom: 8px; }
.lc-menus-top { padding-top: 40px; }

/* Shown by lceca-menus.js only when it applies. */
.lc-menu-stale, .lc-menu-today-item { display: none; }
.lc-menu-stale.is-shown { display: block; }
.lc-menu-today-item.is-shown { display: block; }
.lc-print-only, .lc-print-inline { display: none; }

.lc-menu-stale { background: #fdeef3; border-left: 5px solid var(--lc-berry); border-radius: 12px; padding: 14px 18px; margin-bottom: 18px; }
.lc-menu-stale p { margin: 0; font-size: 16px; }

/* ── Which menu ── */
.lc-menu-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.lc-menu-pick a {
  display: flex; flex-direction: column; gap: 2px;
  background: #fff; border: 1px solid var(--lc-border); border-left: 6px solid var(--lc-berry);
  border-radius: var(--lc-r); padding: 18px 22px; text-decoration: none;
  transition: box-shadow .15s ease;
}
.lc-menu-pick a + a { border-left-color: var(--lc-sky); }
.lc-menu-pick a:hover, .lc-menu-pick a:focus-visible { box-shadow: var(--lc-shadow-hover); }
.lc-menu-pick-title { font-family: var(--lc-head); font-weight: 700; font-size: 21px; line-height: 1.2; color: var(--lc-blue); }
.lc-menu-pick-sub { font-size: 15px; line-height: 1.45; color: var(--lc-muted); }

/* ── Keep it handy ── */
.lc-menu-keep {
  margin-top: 20px; background: var(--lc-tint); border-radius: var(--lc-r); padding: 18px 22px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px;
}
.lc-menu-keep > div:first-child { flex: 1 1 420px; }
.lc-menu-keep h2 { font-size: 19px; margin: 0 0 4px; }
.lc-menu-keep p { font-size: 15px; line-height: 1.55; margin: 0 0 4px; color: var(--lc-ink); }

/* ── Tool buttons (built by lceca-menus.js) ── */
.lc-menu-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.lc-tool-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: 0;
  padding: 8px 16px; border: 2px solid var(--lc-blue); border-radius: var(--lc-r-btn);
  background: #fff; color: var(--lc-blue); cursor: pointer;
  font-family: var(--lc-body); font-weight: 700; font-size: 15.5px; line-height: 1.2;
}
.lc-tool-btn:hover, .lc-tool-btn:focus { background: var(--lc-blue); border-color: var(--lc-blue); color: #fff; }
.lc-tool-btn::before {
  content: ""; flex: none; width: 20px; height: 20px; background-color: currentColor;
  -webkit-mask: var(--lc-icon) center / contain no-repeat; mask: var(--lc-icon) center / contain no-repeat;
}
.lc-tool-btn--print { --lc-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9V2h12v7'/%3E%3Cpath d='M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2'/%3E%3Cpath d='M6 14h12v8H6z'/%3E%3C/svg%3E"); }
.lc-tool-btn--pdf { --lc-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3Cpath d='M12 15V3'/%3E%3C/svg%3E"); }
.lc-tool-btn--bookmark { --lc-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z'/%3E%3C/svg%3E"); }
.lc-menu-status { flex-basis: 100%; margin: 0; font-size: 15px; line-height: 1.5; font-weight: 700; color: var(--lc-ink); }

/* ── Menu sections ── */
.lc-menu-section { padding-top: 52px; }
.lc-menu-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px;
  border-bottom: 3px solid var(--lc-blue); padding-bottom: 14px; margin-bottom: 16px;
}
.lc-menu-head h2 { font-size: clamp(27px, 3.2vw, 34px); margin: 0; }
.lc-menu-month { margin: 2px 0 0; font-size: 17px; font-weight: 700; color: var(--lc-muted); }
.lc-menu-lede { font-size: 16.5px; line-height: 1.6; margin: 0 0 14px; max-width: 760px; }
.lc-menu-infant-intro { margin: 0 0 16px; max-width: 820px; }
.lc-menu-infant-intro p { margin: 0 0 4px; color: var(--lc-ink); }
.lc-menu-infant-intro p:last-child { margin-bottom: 0; }

/* Week chips */
.lc-menu-weeks ul { list-style: none; margin: 0 0 4px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.lc-menu-weeks li { margin: 0; }
/* Pill-shaped chips read as controls without an underline (1.4.1). */
.lc-menu-weeks a {
  display: inline-block; min-height: 40px; padding: 8px 14px;
  border: 1px solid #c9d9e6; border-radius: 20px; background: #fff;
  font-weight: 700; font-size: 15px; line-height: 22px; color: var(--lc-blue); text-decoration: none !important;
}
.lc-menu-weeks a:hover, .lc-menu-weeks a:focus { border-color: var(--lc-berry); color: var(--lc-berry); }
.lc-menu-weeks a.is-current { background: var(--lc-blue); border-color: var(--lc-blue); color: #fff; }
.lc-menu-weeks a.is-current:hover, .lc-menu-weeks a.is-current:focus { background: var(--lc-navy); color: #fff; }
.lc-menu-today-item a { background: var(--lc-berry); border-color: var(--lc-berry); color: #fff; }
.lc-menu-today-item a:hover, .lc-menu-today-item a:focus { background: var(--lc-berry-dark); border-color: var(--lc-berry-dark); color: #fff; }

/* Weeks and days */
.lc-menu-week { padding-top: 24px; }
.lc-menu-week h3 { font-size: 22px; margin: 0 0 12px; }
.lc-menu-days { display: grid; grid-template-columns: 1fr; gap: 14px; }
.lc-menu-day { background: #fff; border: 1px solid var(--lc-border); border-radius: 14px; overflow: hidden; }
.lc-menu-day h4 {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin: 0;
  padding: 10px 14px; background: var(--lc-tint); font-size: 17px; line-height: 1.25; color: var(--lc-navy);
}
.lc-menu-date { font-family: var(--lc-body); font-weight: 400; font-size: 14.5px; color: var(--lc-muted); }
.lc-menu-meals { margin: 0; padding: 2px 14px 14px; }
.lc-meal { padding-top: 10px; }
.lc-meal + .lc-meal { margin-top: 10px; border-top: 1px solid var(--lc-border-light); }
.lc-meal dt {
  display: flex; align-items: center; gap: 7px; margin: 0;
  font-family: var(--lc-body); font-size: 12.5px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--lc-gold-ink);
}
.lc-meal dt::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--lc-gold); }
.lc-meal--lunch dt { color: var(--lc-berry-dark); }
.lc-meal--lunch dt::before { background: var(--lc-berry); }
.lc-meal--snack dt { color: var(--lc-sky-ink); }
.lc-meal--snack dt::before { background: var(--lc-sky); }
.lc-meal dd { margin: 4px 0 0; }
.lc-meal ul { list-style: none; margin: 0; padding: 0; }
.lc-meal li { margin: 0 0 2px; font-size: 15px; line-height: 1.45; }
.lc-menu-cond { margin: 6px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--lc-muted); }
.lc-menu-closed { margin: 0; padding: 14px; font-size: 15px; line-height: 1.45; font-weight: 700; color: var(--lc-muted); }

/* Today (set by lceca-menus.js). The badge text carries the meaning. */
.lc-menu-day.is-today { border: 2px solid var(--lc-berry); box-shadow: var(--lc-shadow); }
.lc-menu-day.is-today h4 { background: #fdeef3; }
.lc-today-badge {
  margin-left: auto; padding: 1px 9px; border-radius: 10px; background: var(--lc-berry); color: #fff;
  font-family: var(--lc-body); font-size: 12.5px; font-weight: 700; letter-spacing: .04em;
}

/* Serving sizes and notes */
.lc-menu-details { margin-top: 28px; background: #fff; border: 1px solid var(--lc-border); border-radius: var(--lc-r); }
.lc-menu-details summary {
  cursor: pointer; padding: 14px 20px; min-height: 44px;
  font-family: var(--lc-head); font-weight: 700; font-size: 18px; color: var(--lc-blue);
}
.lc-menu-details summary:hover { color: var(--lc-berry); }
.lc-menu-details summary:focus-visible { outline: 2px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 5px var(--lc-blue); border-radius: var(--lc-r); }
.lc-menu-details-body { padding: 4px 20px 20px; }
.lc-menu-details-body h3 { font-size: 19px; margin: 14px 0 10px; }
.lc-menu-details-body h4 { font-size: 17px; margin: 0 0 8px; }
.lc-portion-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.lc-portion-table { width: 100%; border: 0; border-collapse: collapse; margin: 0; font-size: 14.5px; line-height: 1.4; }
.lc-portion-table caption { caption-side: top; text-align: left; padding: 0 0 6px; font-family: var(--lc-head); font-weight: 700; font-size: 17px; color: var(--lc-blue); }
.lc-portion-table th, .lc-portion-table td { border: 0; border-bottom: 1px solid var(--lc-border); padding: 6px 8px; text-align: left; vertical-align: top; }
.lc-portion-table thead th { border-bottom: 2px solid var(--lc-blue); font-size: 13.5px; color: var(--lc-navy); }
.lc-portion-table tbody th { font-weight: 700; }
.lc-portion-list { margin: 0; }
.lc-portion-list > div + div { margin-top: 10px; }
.lc-portion-list dt { font-weight: 700; font-size: 15px; }
.lc-portion-list dd { margin: 2px 0 0; font-size: 15px; line-height: 1.5; }
.lc-portion-list ul { margin: 0; padding-left: 20px; }
.lc-portion-list li { margin: 0 0 4px; }
.lc-menu-small { font-size: 14px; color: var(--lc-muted); margin: 12px 0 0; }
.lc-nowrap { white-space: nowrap; }

.lc-menu-foot { padding-top: 36px; }
.lc-menu-foot p { font-size: 15px; line-height: 1.6; margin: 0 0 6px; max-width: 820px; }

/* ── Layout ── */
@media (min-width: 640px) {
  .lc-menu-days { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .lc-portion-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lc-portion-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .lc-menu-days { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
}
@media (max-width: 680px) {
  .lc-menu-pick { grid-template-columns: 1fr; }
  .lc-menus-top { padding-top: 28px; }
  .lc-menu-section { padding-top: 40px; }
  .lc-menu-details summary { padding: 14px 16px; }
  .lc-menu-details-body { padding: 4px 14px 16px; }
  .lc-portion-table th, .lc-portion-table td { padding: 6px 5px; }
}

/* ── Print and Save as PDF ──
   One week per landscape page for toddlers and preschool. The Print buttons
   set body[data-print-menu] so only that menu prints; Ctrl+P prints both. */
@media print {
  @page { size: letter landscape; margin: 0.45in; }
  html, body, .site, .site-content, .content-area, .site-main, .inside-article, .lc-menus { background: #fff !important; }
  body { color: #000; }
  .ilcao-strip, .site-header, .main-navigation, .lc-footer, .site-footer, .generate-back-to-top,
  .lc-page-hero, .lc-menu-pick, .lc-menu-keep, .lc-menu-tools, .lc-menu-weeks, .lc-menu-stale,
  .lc-menus-band, .lc-today-badge, #wpadminbar,
  .hcg-banner, .hcg-choices, .hcg-dialog { display: none !important; }
  .lc-print-only { display: block !important; }
  .lc-print-inline { display: inline !important; }
  body[data-print-menu="preschool"] #infants,
  body[data-print-menu="infants"] #preschool { display: none !important; }

  .site-content, .inside-article, .site-main { margin: 0 !important; padding: 0 !important; }
  .lc-wrap { max-width: none; padding-left: 0; padding-right: 0; }
  .lc-menus-top, .lc-menu-section { padding-top: 0; }
  /* Only when both menus print; a one-menu print would open on a blank page. */
  body:not([data-print-menu]) .lc-menu-section + .lc-menu-section { break-before: page; }

  .lc-menu-printhead { margin: 0 0 4pt; font-size: 8.5pt; color: #333; }
  .lc-menu-head { border-bottom: 1.5pt solid #000; padding-bottom: 3pt; margin-bottom: 4pt; gap: 0; }
  .lc-menu-head h2 { font-size: 16pt; color: #000; }
  .lc-menu-month { font-size: 11pt; color: #000; }
  .lc-menu-lede, .lc-menu-infant-intro p { font-size: 9pt; line-height: 1.35; margin-bottom: 3pt; }
  .lc-menu-infant-intro { background: none; padding: 0; margin-bottom: 4pt; }

  .lc-menu-week { padding-top: 6pt; break-inside: avoid; }
  #preschool .lc-menu-week + .lc-menu-week { break-before: page; }
  .lc-menu-week h3 { font-size: 12pt; margin-bottom: 4pt; color: #000; }
  .lc-menu-days { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; gap: 5pt; }
  .lc-menu-day, .lc-menu-day.is-today { border: .75pt solid #777; border-radius: 3pt; box-shadow: none; break-inside: avoid; }
  .lc-menu-day h4, .lc-menu-day.is-today h4 { background: none; border-bottom: .75pt solid #777; padding: 3pt 5pt; font-size: 10.5pt; color: #000; }
  .lc-menu-date { font-size: 9.5pt; color: #000; }
  .lc-menu-meals { padding: 0 5pt 5pt; }
  .lc-meal { padding-top: 3pt; }
  .lc-meal + .lc-meal { margin-top: 3pt; border-top-color: #bbb; }
  .lc-meal dt, .lc-meal--lunch dt, .lc-meal--snack dt { font-size: 7.5pt; color: #000; }
  .lc-meal dt::before { display: none; }
  .lc-meal li { font-size: 9.5pt; line-height: 1.25; margin: 0; }
  .lc-menu-cond { font-size: 8.5pt; color: #000; margin-top: 2pt; }
  .lc-menu-closed { padding: 5pt; font-size: 9.5pt; color: #000; }

  .lc-menu-details { border: 0; margin-top: 8pt; break-inside: avoid; }
  .lc-menu-details summary { display: none; }
  .lc-menu-details-body { padding: 0; }
  .lc-menu-details-body h3 { font-size: 11pt; margin: 6pt 0 3pt; color: #000; }
  .lc-menu-details-body h4, .lc-portion-table caption { font-size: 10pt; color: #000; }
  .lc-portion-grid, .lc-portion-grid--2 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10pt; }
  .lc-portion-table, .lc-portion-list dt, .lc-portion-list dd, .lc-menus ul.lc-dots li, .lc-menu-small { font-size: 8.5pt; line-height: 1.3; }
  .lc-portion-table th, .lc-portion-table td { padding: 2pt 4pt; }
  .lc-portion-table thead th { white-space: nowrap; }
  .lc-menus ul.lc-dots { gap: 2pt; }

  .lc-menu-foot { padding-top: 8pt; }
  .lc-menu-foot p { font-size: 8.5pt; margin: 0 0 2pt; }
  .lc-menus a { color: #000 !important; text-decoration: none !important; }
}
