/* SLUSD Child Nutrition Custom CSS */

/* ==========================================================================
   Screen & Interactive UI Styles
   ========================================================================== */

/* Star Rating Hover Effects */
.star-btn {
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), color 0.15s ease;
}
.star-btn:hover {
  transform: scale(1.25);
  color: #f59e0b;
}

/* Allergen Filter Buttons */
.allergen-filter-btn {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  user-select: none;
}
.allergen-filter-btn.active {
  background-color: #059669 !important;
  color: #ffffff !important;
  border-color: #047857 !important;
  box-shadow: 0 1px 3px rgba(5, 150, 105, 0.3) !important;
}

/* Dimming effect for non-matching items (Cards & Tiles in Calendar & List Views) */
.menu-item-tile.dimmed,
.list-item-card.dimmed,
.day-row-group.dimmed {
  opacity: 0.22;
  filter: grayscale(85%);
  transition: opacity 0.25s ease, filter 0.25s ease;
}

.menu-item-tile.highlighted,
.list-item-card.highlighted {
  border-color: #10b981 !important;
  background-color: #ecfdf5 !important;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.35) !important;
  transition: all 0.25s ease;
}

/* View Mode Switcher Toggle */
.view-switch-btn {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.view-switch-btn.active {
  background-color: #ffffff !important;
  color: #065f46 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06) !important;
}

/* Day Row subtle accent in List View */
.list-day-card {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.list-day-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.06);
}

/* ==========================================================================
   Print Formatting Rules - High Precision Single-Page Landscape Calendar & Clean List
   ========================================================================== */
@media print {
  @page {
    size: landscape;
    margin: 5mm 7mm 5mm 7mm;
  }

  /* Universal Print Reset */
  html, body {
    background-color: #ffffff !important;
    color: #0f172a !important;
    font-size: 8.5pt !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Hide Web-only Layouts & Elements */
  header, footer, nav,
  .print\:hidden,
  #mobileMenu,
  #langDropdown,
  #nutritionModal,
  .public-sidebar,
  .action-tools-bar,
  .switchers-bar,
  .filter-toolbar {
    display: none !important;
  }

  .print\:block {
    display: block !important;
  }
  .print\:flex {
    display: flex !important;
  }
  .print\:grid {
    display: grid !important;
  }

  /* Container bounds on paper */
  .main-print-container {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* -------------------------------------------------------------
     CALENDAR VIEW - Strictly 1 Single Page Landscape Fit
     ------------------------------------------------------------- */
  .print-calendar-view {
    display: block !important;
    width: 100% !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
    page-break-after: avoid !important;
  }

  .print-header-banner {
    display: block !important;
    border-bottom: 2px solid #0f172a !important;
    padding-bottom: 4px !important;
    margin-bottom: 4px !important;
  }

  .print-calendar-table {
    width: 100% !important;
    border-collapse: collapse !important;
    table-layout: fixed !important;
    border: 1.5px solid #0f172a !important;
    margin-bottom: 4px !important;
  }

  .print-calendar-header-row {
    background-color: #0f2942 !important;
    color: #ffffff !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .print-calendar-header-cell {
    padding: 3px 4px !important;
    font-size: 8pt !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: #ffffff !important;
    text-align: center !important;
    border-right: 1px solid #334155 !important;
  }

  .print-calendar-row {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  .print-calendar-cell {
    border: 1px solid #94a3b8 !important;
    padding: 3px 4px !important;
    vertical-align: top !important;
    background-color: #ffffff !important;
    height: 25mm !important;
    max-height: 27mm !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  .print-calendar-cell.inactive-day {
    background-color: #f1f5f9 !important;
    color: #94a3b8 !important;
  }

  .print-day-badge {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 2px !important;
  }

  .print-day-number {
    font-size: 9pt !important;
    font-weight: 900 !important;
    color: #0f172a !important;
    line-height: 1 !important;
  }

  .print-today-indicator {
    font-size: 6pt !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    background-color: #059669 !important;
    color: #ffffff !important;
    padding: 1px 3px !important;
    border-radius: 2px !important;
  }

  .print-dish-item {
    font-size: 7.5pt !important;
    line-height: 1.15 !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin-bottom: 2px !important;
    padding: 1.5px 3px !important;
    background-color: #f8fafc !important;
    border: 0.5px solid #cbd5e1 !important;
    border-radius: 2px !important;
  }

  .print-dish-alt {
    background-color: #fefce8 !important;
    border-color: #fde047 !important;
  }

  .print-dish-cal {
    font-size: 6.5pt !important;
    font-weight: 600 !important;
    color: #475569 !important;
  }

  .print-dish-tag {
    font-size: 6pt !important;
    font-weight: 700 !important;
    padding: 0 2px !important;
    border-radius: 2px !important;
    background-color: #ecfdf5 !important;
    color: #065f46 !important;
    border: 0.5px solid #6ee7b7 !important;
  }

  .print-footer-banner {
    display: block !important;
    background-color: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 4px !important;
    padding: 3px 6px !important;
    font-size: 7pt !important;
    color: #334155 !important;
    line-height: 1.25 !important;
  }

  /* -------------------------------------------------------------
     LIST VIEW PRINT FORMATTING (When List View is Printed)
     ------------------------------------------------------------- */
  body.print-mode-list {
    @page {
      size: portrait;
      margin: 8mm 10mm;
    }
  }

  body.print-mode-list .print-calendar-view,
  body.print-mode-list #menuCalendarView {
    display: none !important;
  }

  body.print-mode-list #menuListView {
    display: block !important;
  }

  .print-list-week-card {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
    margin-bottom: 8px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    padding: 6px 8px !important;
    background-color: #ffffff !important;
  }

  .print-list-day-row {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
    border-top: 1px dashed #e2e8f0 !important;
    padding: 4px 0 !important;
  }
  .print-list-day-row:first-child {
    border-top: none !important;
  }
}

/* ==========================================================================
   Desktop Dropdown Menu Smooth Hover Bridge
   Fixes cursor losing hover state when mousing down from trigger to items
   ========================================================================== */
.nav-dropdown-wrapper {
  position: absolute;
  top: 100%;
  left: 0;
  padding-top: 8px; /* Seamless hoverable hit-box bridge */
  z-index: 50;
  pointer-events: auto;
}

.nav-dropdown-wrapper::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 20px;
  background: transparent;
  pointer-events: auto;
}

.nav-dropdown-right {
  left: auto !important;
  right: 0 !important;
}

/* Ensure child dropdowns stay visible during continuous mouse movement */
.group:hover > .nav-dropdown-wrapper,
.group:focus-within > .nav-dropdown-wrapper {
  display: block !important;
}

/* ==========================================================================
   Strict Navbar Brand Logo Constraints
   Guarantees mobile header logo never renders at unconstrained natural size
   ========================================================================== */
.navbar-brand-logo {
  width: 48px !important;
  height: 48px !important;
  max-width: 48px !important;
  max-height: 48px !important;
  object-fit: contain !important;
  flex-shrink: 0 !important;
}

@media (min-width: 640px) {
  .navbar-brand-logo {
    width: 56px !important;
    height: 56px !important;
    max-width: 56px !important;
    max-height: 56px !important;
  }
}

@media (min-width: 1024px) {
  .navbar-brand-logo {
    width: 60px !important;
    height: 60px !important;
    max-width: 60px !important;
    max-height: 60px !important;
  }
}


