.ingredients {
  margin-left: 0;
  padding-left: 0px;
}
.ingredients li {
  cursor: pointer;
  margin-bottom: 13px;
  list-style: none;
}
.ingredients li::before {
  font-family: 'FontAwesome';
  font-size: 18px;
  margin-right: 7px;
  content: '\f1db';
  text-decoration: none !important;
  font-style: normal !important;
}
.ingredients li.checked {
  color: #ccc;
}
.ingredients li.checked::before {
  color: #79a079;
  text-decoration: none;
  font-style: normal;
  content: '\f058';
}
.grocery-list ul {
  list-style: none;
  padding-left: 0px;
  margin-left: 0px;
  padding-top: 10px;
  padding-bottom:10px;
}
.grocery-list ul li {
  overflow: hidden;
  list-style: none !important;
  margin-right: 10%;
  clear: both;
  margin-bottom: 0px;
  position: relative;
}
.grocery-list ul button {
  width: 12%;
  padding: 1% 0;
}
.grocery-list ul label {
  list-style: none !important;
  margin-left: 0px;
  border-bottom: 1px solid #DDD;
  background: #fafafa;
  font-size: 14px;
  text-transform: uppercase;
  float: left;
  width: 84%;
  padding: 1%;
  margin-bottom: 4px;
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.6);
  border: 1px solid #ddd;
  cursor: move;
}
.grocery-list ul label input {
  margin-top: 0px;
}
.grocery-list ul .ui-state-highlight {
  min-height: 30px;
  margin-bottom: 5px;
}
.grocery-list textarea {
  width: 90%;
}
.btn-group form {
  display: inline-block;
}
.hidden-list {
  display: none;
}

/* Mobile Grocery List Optimizations */
@media screen and (max-width: 768px) {
  .grocery-list {
    padding: 0 10px;
  }
  
  .grocery-list h2, .grocery-list h3 {
    font-size: 18px;
    margin: 15px 0 10px 0;
    padding: 8px 12px;
    background: #f8f9fa;
    border-left: 4px solid #007cba;
    border-radius: 4px;
  }
  
  .grocery-list ul li {
    margin-right: 0;
    margin-bottom: 8px;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
    overflow: visible;
  }
  
  .grocery-list ul label {
    width: 100%;
    float: none;
    padding: 12px 50px 12px 40px;
    margin-bottom: 0;
    font-size: 16px;
    line-height: 1.4;
    text-transform: none;
    border: none;
    border-radius: 6px;
    background: transparent;
    box-shadow: none;
    cursor: pointer;
    position: relative;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  
  .grocery-list ul label input {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    width: 18px;
    height: 18px;
  }
  
  .grocery-list ul button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    background: #dc3545;
    border: none;
    color: white;
    font-size: 14px;
    z-index: 10;
  }
  
  .grocery-list ul button:hover,
  .grocery-list ul button:focus {
    background: #c82333;
    transform: translateY(-50%) scale(1.1);
  }
  
  /* Walmart link styling for mobile */
  .grocery-list ul li a[href*="walmart"] {
    position: absolute;
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #004c91;
    border-radius: 50%;
    padding: 4px;
  }
  
  .grocery-list ul li a[href*="walmart"] img {
    width: 20px !important;
    height: auto;
    filter: brightness(0) invert(1);
  }
  
  /* Touch-friendly sortable handles */
  .grocery-list ul li::before {
  }
  
  .grocery-list ul li.ui-sortable-helper::before {
    cursor: grabbing;
  }
  
  /* Shopping list sections on mobile */
  .shopping-list {
    margin-bottom: 25px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
  }
  
  .shopping-list h2 {
    margin: 0;
    background: #e44c2a;
    color: white;
    border-left: none;
  }
  
  /* Checked items section */
  .checked-list {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
  }
  
  .checked-list h3 {
    background: #6c757d;
    color: white;
    margin: -15px -15px 15px -15px;
    padding: 12px 15px;
    border-radius: 8px 8px 0 0;
  }
  
  .checked-list ul li {
    opacity: 0.7;
  }
  
  .checked-list ul label {
    text-decoration: line-through;
  }
  
  /* Form styling for mobile */
  .grocery-list form {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-top: 20px;
    margin-bottom: 50px;
  }
  
  .grocery-list form label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
    text-transform: none;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    width: auto;
    float: none;
  }
  
  .grocery-list textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    min-height: 120px;
    resize: vertical;
    box-sizing: border-box;
  }
  
  .grocery-list textarea:focus {
    border-color: #007cba;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
  }
  
  .grocery-list input[type="submit"] {
    width: 100%;
    padding: 14px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
  }
  
  .grocery-list input[type="submit"]:hover {
    background: #005a87;
  }
  
  /* Button group styling */
  .btn-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
  }
  
  .btn-group form {
    margin: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
  }
  
  .btn-group button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
  }
  
  .btn-mini.btn-danger {
    background: #dc3545;
    color: white;
  }
  
  .btn-mini.btn-danger:hover {
    background: #c82333;
  }
  
  /* Sortable placeholder styling */
  .ui-state-highlight {
    background: #e3f2fd !important;
    border: 2px dashed #2196f3 !important;
    border-radius: 6px;
    min-height: 50px;
  }
  
  /* Dragging state */
  .ui-sortable-helper {
    transform: rotate(3deg);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2) !important;
    z-index: 1000;
  }
  
  /* Unsorted list mobile styling */
  .unsorted-list {
    width: 100% !important;
    float: none !important;
    padding: 0 !important;
    margin-bottom: 20px;
  }
  
  .unsorted-list h2 {
    font-size: 18px !important;
    background: #ffc107;
    color: #212529;
  }
  
  .unsorted-list ul {
    background: transparent !important;
    border: none !important;
  }
}

/* Extra small devices (phones in portrait) */
@media screen and (max-width: 480px) {
  .grocery-list {
    padding: 0 5px;
  }
  
  .grocery-list ul label {
    padding: 10px 45px 10px 35px;
    font-size: 15px;
  }
  
  .grocery-list ul button {
    width: 32px;
    height: 32px;
    right: 6px;
  }
  
  .grocery-list ul li a[href*="walmart"] {
    right: 44px;
    width: 28px;
    height: 28px;
  }
  
  .grocery-list ul li a[href*="walmart"] img {
    width: 16px !important;
  }
}
@media print {
  .header-wrap,
  .add_note,
  .cal_notes,
  .noprint {
    display: none;
  }
  .footer {
    font-size: 80%;
    padding-top: 1em;
    border-top: 1px solid #ddd;
  }
  td {
    border: 1px solid #454545;
    height: 1in;
    width: .8in;
    vertical-align: top;
  }
  table {
    border-collapse: collapse;
    border-spacing: 0;
  }
  .calendar-nav {
    display: none;
  }
  body {
    font-family: "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
  }
  .calendar-date,
  th.day_name {
    font-size: x-small;
  }
  td p {
    font-size: 12px;
  }
  td p.meal-title a {
    text-decoration: none;
    color: #000;
  }
}
body input.picker {
  width: 60px;
  height: 1px;
  padding: 0px;
  border: none;
}
/* Calendar STyles */
#calendar {
  clear: both;
}
.calendar-content td {
  border: 1px solid #ccc;
  height: 95px;
  width: 14.28%;
  background: rgba(255, 255, 255, 0.8);
  vertical-align: top;
}
.day {
  position: relative;
  padding-top: 26px;
  padding-left: 5px;
}
.day_name {
  text-align: center;
  font-size: 12px;
  font-weight: normal;
  padding: 10px 0 4px;
}
div.day p.meal-title a {
  font-family: arial, sans-serif;
  font-weight: normal;
  font-size: 12px;
}
.calendar h3 {
  float: left;
}
.calendar-date {
  position: absolute;
  right: 10px;
  top: 5px;
  font-size: 12px;
}
.calendar-nav {
  padding-top: 10px;
  font-size: 12px;
  padding-bottom: 10px;
}

/* Grocery Consolidation Feedback Styles */
.ingredients-added {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
  padding: 10px 15px;
  border-radius: 4px;
  margin-bottom: 15px;
  position: relative;
}

.ingredients-added.consolidated {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  color: #856404;
}

.ingredients-added .close-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  opacity: 0.7;
}

.ingredients-added .close-btn:hover {
  opacity: 1;
}

.consolidation-details {
  font-size: 12px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(0,0,0,0.1);
}

.consolidation-item {
  margin-bottom: 4px;
}

.consolidation-item .original {
  text-decoration: line-through;
  color: #666;
}

.consolidation-item .arrow {
  margin: 0 5px;
  color: #666;
}

.consolidation-item .new {
  font-weight: bold;
}
