/* =========================================================
   Lists expanded tabs
   Shopping | Tasks | Meals | Recipes
   Scoped to Lists tab only.
   ========================================================= */

#listsTab .overview-meals-card,
#listsTab .overview-recipes-card {
  grid-column: auto;
}

#listsTab .overview-meals-list,
#listsTab .overview-recipes-list,
#listsTab .overview-extra-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

#listsTab .overview-list-mini-form {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(110px, 0.35fr) auto;
  gap: 9px;
  align-items: end;
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid rgba(226, 230, 242, 0.74);
  border-radius: 20px;
  background: rgba(248, 250, 255, 0.86);
}

#listsTab .overview-recipe-form {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
}

#listsTab .overview-list-mini-field {
  min-width: 0;
  display: grid;
  gap: 5px;
  color: #667085;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

#listsTab .overview-list-mini-field input,
#listsTab .overview-list-mini-field select,
#listsTab .overview-list-mini-field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(226, 230, 242, 0.96);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.96);
  color: #1f2937;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  outline: none;
  padding: 10px 11px;
  box-shadow: 0 7px 16px rgba(31, 41, 55, 0.04);
}

#listsTab .overview-list-mini-field textarea {
  min-height: 40px;
  max-height: 74px;
  resize: vertical;
  line-height: 1.25;
}

#listsTab .overview-list-mini-field input:focus,
#listsTab .overview-list-mini-field select:focus,
#listsTab .overview-list-mini-field textarea:focus {
  border-color: rgba(91, 63, 244, 0.42);
  box-shadow: 0 0 0 4px rgba(91, 63, 244, 0.1);
}

#listsTab .overview-list-mini-submit,
#listsTab .overview-extra-list-delete,
#listsTab .overview-extra-list-add-icon {
  border: 0;
  cursor: pointer;
  font: inherit;
}

#listsTab .overview-list-mini-submit {
  height: 41px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #7657ff, #5030e8);
  color: #ffffff;
  font-size: 12px;
  font-weight: 950;
  box-shadow: 0 12px 22px rgba(91, 53, 245, 0.18);
}

#listsTab .overview-list-mini-submit:active {
  transform: translateY(1px);
}

#listsTab .overview-extra-list-add-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #f2efff;
  color: #5b3ff4;
  box-shadow: 0 9px 18px rgba(91, 53, 245, 0.1);
}

#listsTab .overview-extra-list-empty {
  min-height: 145px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px dashed rgba(203, 213, 225, 0.9);
  border-radius: 22px;
  background: rgba(248, 250, 252, 0.74);
  color: #8b95a7;
  font-size: 13px;
  font-weight: 850;
  padding: 18px;
}

#listsTab .overview-extra-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 4px;
  border-bottom: 1px solid rgba(226, 230, 242, 0.78);
}

#listsTab .overview-extra-list-row:first-child {
  padding-top: 2px;
}

#listsTab .overview-extra-list-row:last-child {
  border-bottom: 0;
}

#listsTab .overview-extra-list-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

#listsTab .overview-extra-list-main strong {
  min-width: 0;
  color: #22283a;
  font-size: 14px;
  font-weight: 950;
  letter-spacing: -0.02em;
  line-height: 1.18;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#listsTab .overview-extra-list-main small {
  min-width: 0;
  color: #7b8495;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#listsTab .overview-extra-list-meta {
  width: max-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #5b3ff4;
  background: #f2efff;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 950;
}

#listsTab .overview-extra-list-delete {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
}

#listsTab .overview-extra-list-delete:hover {
  background: rgba(239, 68, 68, 0.13);
}

#listsTab .overview-task-shopping-pagination {
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

#listsTab .overview-task-shopping-pagination::-webkit-scrollbar {
  display: none;
}

#listsTab .overview-carousel-dot {
  flex: 0 0 auto;
}

@media (min-width: 821px) {
  #listsTab .overview-task-shopping-carousel {
    max-width: 820px;
  }
}

@media (max-width: 820px) {
  body[data-active-tab="lists"] #listsTab .overview-meals-list,
  body[data-active-tab="lists"] #listsTab .overview-recipes-list,
  body[data-active-tab="lists"] #listsTab .overview-extra-list,
  body:has(#listsTab.active) #listsTab .overview-meals-list,
  body:has(#listsTab.active) #listsTab .overview-recipes-list,
  body:has(#listsTab.active) #listsTab .overview-extra-list,
  #listsTab.active .overview-meals-list,
  #listsTab.active .overview-recipes-list,
  #listsTab.active .overview-extra-list {
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: contain !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    padding-bottom: 8px !important;
    box-sizing: border-box !important;
  }

  #listsTab .overview-list-mini-form,
  #listsTab .overview-recipe-form {
    grid-template-columns: 1fr auto;
    gap: 8px;
    padding: 9px;
  }

  #listsTab .overview-list-mini-field-main,
  #listsTab .overview-list-mini-field-wide {
    grid-column: 1 / -1;
  }

  #listsTab .overview-list-mini-field select {
    min-height: 41px;
  }

  #listsTab .overview-task-shopping-pagination {
    justify-content: flex-start;
  }

  #listsTab .overview-carousel-dot {
    min-width: 76px;
    padding-inline: 10px;
  }
}

@media (max-width: 390px) {
  #listsTab .overview-carousel-dot {
    min-width: 65px !important;
    font-size: 10.5px !important;
    padding-inline: 8px !important;
  }

  #listsTab .overview-task-shopping-pagination {
    gap: 5px !important;
    padding: 5px !important;
  }

  #listsTab .overview-list-mini-form,
  #listsTab .overview-recipe-form {
    padding: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #listsTab .overview-list-mini-submit,
  #listsTab .overview-extra-list-delete,
  #listsTab .overview-extra-list-add-icon {
    transition: none !important;
  }
}

/* Lists tab quick-add consistency: use the Meals/Recipes + button style on Shopping and Tasks too. */
#listsTab .overview-shopping-add-icon,
#listsTab .overview-task-add-icon,
#listsTab .overview-extra-list-add-icon {
  width: 34px !important;
  height: 34px !important;
  display: grid !important;
  place-items: center !important;
  flex: 0 0 34px !important;
  border: 0 !important;
  border-radius: 14px !important;
  background: #f2efff !important;
  color: #5b3ff4 !important;
  font-size: 14px !important;
  cursor: pointer !important;
  box-shadow: 0 9px 18px rgba(91, 53, 245, 0.1) !important;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease !important;
}

#listsTab .overview-shopping-add-icon:hover,
#listsTab .overview-task-add-icon:hover,
#listsTab .overview-extra-list-add-icon:hover {
  transform: translateY(-1px) !important;
  background: #ebe6ff !important;
  box-shadow: 0 12px 22px rgba(91, 53, 245, 0.15) !important;
}

@media (max-width: 820px) {
  #listsTab .overview-shopping-add-icon,
  #listsTab .overview-task-add-icon,
  #listsTab .overview-extra-list-add-icon {
    width: 34px !important;
    height: 34px !important;
    flex-basis: 34px !important;
    border-radius: 14px !important;
    font-size: 14px !important;
  }
}
