/* 
 * Shared Styles for Mess Hall Menu Modules
 * Restored to follow the original 28 Day layout exactly.
 */

.menu-container {
  max-width: 1000px;
  margin: auto;
  padding: 10px;
  position: relative;
}

.menu-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95em;
  margin-bottom: 25px;
}

.menu-table th,
.menu-table td {
  border-bottom: 1px solid #e0e0e0;
  padding: 8px 12px;
  text-align: left;
}

.menu-table th {
  background-color: #0f2d52;
  color: #fff;
  font-weight: 500;
  position: sticky;
  top: 0;
  z-index: 2;
}

.menu-table.mobile-only {
  display: none;
}

@media (max-width: 768px) {
  .menu-table.desktop-only {
    display: none;
  }

  .menu-table.mobile-only {
    display: table;
  }

  .menu-table.mobile-only th {
    display: none;
  }

  .menu-table.mobile-only td {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 12px;
    padding: 10px;
  }

  .menu-table.mobile-only td p.label {
    display: flex;
    margin: 0;
    font-size: 0.7em;
    font-style: italic;
    color: #666;
    line-height: 0.7;
  }

  .menu-table.mobile-only td p.label .value {
    margin-left: 3px;
    color: #333;
  }

  .recipe-name {
    font-weight: 600;
    font-size: 1.1em;
    width: 100%;
    line-height: 0.9;
  }
}

.day-heading {
  position: relative;
  font-size: 1.4em;
  font-weight: 600;
  margin: 20px 0 10px;
  text-align: center;
  background: aliceblue;
  padding: 10px 40px;
}

.nav-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 1.4em;
  color: #0f2d52;
}

.nav-icon.left {
  left: 10px;
}

.nav-icon.right {
  right: 10px;
}

.nav-icon:hover {
  opacity: 0.7;
}

.meal-title {
  font-weight: 500;
  margin-top: 15px;
  margin-bottom: 5px;
  font-size: 1.4em;
}

/* Loader styling */
#loader {
  border: 6px solid #f3f3f3;
  border-top: 6px solid #0f2d52;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 50px auto;
  display: block;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Holiday menu specific styles */
.holiday-day {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
  background: #fff;
}

.holiday-day ul {
  margin-top: 5px;
  margin-bottom: 15px;
  padding-left: 20px;
}

.holiday-day li {
  margin-bottom: 4px;
}

.status-line {
  margin: 10px 0;
}

.section-title {
  font-weight: 600;
  margin-top: 15px;
  margin-bottom: 5px;
  color: #0f2d52;
}

/* Native datepicker wrapper & input styling */
.datepicker-toggle {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* jQuery UI Datepicker hidden override */
#hiddenDatePicker {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  font-size: 16px !important;
}

.datepicker-toggle #nativeDatePicker {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  padding: 0;
  margin: 0;
  border: none;
}

.datepicker-toggle .nav-icon {
  position: static;
  transform: none;
  display: block;
  line-height: 1;
}
