#listsNav { position: relative; }
#listsNav .list-nav-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 7px;
}
#listsNav .list-nav-card:has([data-rename-list]) { padding-right: 32px; }
.list-nav-link {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: center;
  align-self: stretch;
  padding: 3px 7px;
  touch-action: none;
  user-select: none;
  border-radius: 6px;
}
#listsNav .list-nav-card:has([data-rename-list]) .list-nav-name small { margin-right: -23px; }
.list-nav-title, #listDetail #activeListName {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  overflow-wrap: anywhere;
  text-overflow: ellipsis;
}
#listDetail #activeListName { margin: 0; }
.list-tool {
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: #71695d;
}
@media (hover: hover) and (pointer: fine) {
  #listsNav .list-nav-card, .list-nav-link { cursor: grab; }
  .list-nav-link { user-select: none; -webkit-user-drag: none; }
}
.list-tool[data-rename-list] { position: absolute; top: 2px; right: 2px; width: 30px; height: 30px; }
.list-tool[data-rename-list] svg { width: 16px; height: 16px; }
#listsNav .list-nav-card:has(.list-receipt-number) { min-height: 51px; }
#listsNav .list-nav-card:has(.list-receipt-number) .list-nav-name small { margin-right: 0; }
.list-receipt-number {
  position: absolute;
  top: 32px;
  right: 2px;
  min-width: 30px;
  text-align: center;
  color: #665c47;
  font-size: 12px;
  font-weight: 700;
  line-height: 15px;
}
.list-tool:hover, .list-tool:focus-visible { background: #e8dfbc; color: #191919; }
.moving-list, .moving-list * { cursor: grabbing !important; }
.moving-list { user-select: none; }
#listsNav .is-grabbed { outline: 2px solid #796330; }
#listsNav .drop-before { box-shadow: inset 0 3px #796330; }
#listsNav .drop-after { box-shadow: inset 0 -3px #796330; }
#listsNav .list-nav-card.is-dragging {
  position: fixed;
  inset: 0 auto auto 0;
  margin: 0;
  z-index: 120;
  pointer-events: none;
  box-shadow: 0 7px 22px #32260c40;
}
.list-drop-slot {
  box-sizing: border-box;
  min-width: 0;
  border: 2px dashed #aa9452;
  border-radius: 12px;
  background: #fbf7e9;
  outline: 1px dashed #aa9452;
  outline-offset: 2px;
}
.saved-dialog p { overflow-wrap: anywhere; }
.list-detail-heading { display: block; }
.list-comment [data-comment-edit] {
  color: #767676;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: #b8b8b8;
  text-underline-offset: 3px;
}
.list-comment [data-comment-edit]:hover, .list-comment [data-comment-edit]:focus-visible { color: #343434; text-decoration-color: currentColor; }
.list-items-summary, #listDetail .list-footer-actions {
  display: flex;
  align-items: center;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 6px 12px;
}
.list-items-summary { justify-content: space-between; }
#listDetail .list-detail-footer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: end;
}
#listDetail .list-footer-actions { justify-content: flex-end; align-items: center; }
#listDetail .list-share {
  grid-column: -2;
  justify-self: end;
  color: white;
  background: #191919;
  border-radius: 9px;
  min-height: 38px;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 700;
}
#listDetail .list-share:hover { background: #383838; }
.clear-list { display: inline-flex; gap: 5px; align-items: center; padding: 5px; min-height: 32px; font-size: 13px; font-weight: 650; color: #51493f; }
.clear-list:disabled { opacity: .48; }
.clear-list:hover:not(:disabled), .delete-list:hover { color: var(--orange-dark); }
.delete-list { font-size: 12px; }
#listDetail .list-footer-actions:empty { display: none; }
@media (max-width: 650px) {
  #listsNav { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(184px,100%),1fr)); }
  #listsNav .list-nav-card { min-height: 46px; }
  #listDetail .list-detail-footer { grid-template-columns: minmax(0,1fr) auto; align-items: end; }
  #listDetail .list-footer-actions { grid-column: 1/-1; grid-row: 2; justify-content: flex-start; }
  #listDetail .list-footer-actions:not(:empty) + .list-share { grid-row: 3; }
}

.list-summary-actions {
  margin-left: auto;
  display: grid;
  justify-items: end;
  gap: 4px;
}
.list-items-summary { align-items: end; }
#listDetail .list-summary-actions .list-share { grid-column: auto; }
#listDetail .saved-row-pricing { display: flex; flex-direction: column; align-items: center; gap: 5px; }
#listDetail .saved-line-total { font-size: 20.4px; text-align: center; }
#listDetail .saved-product-image { width: 78.2px; height: 75.9px; }
.saved-unit-details { display: contents; }

@media (min-width: 651px) {
  #listDetail .saved-product-rows { grid-template-columns: 78.2px minmax(0, 1fr) max-content max-content; }
}
@media (max-width: 650px) {
  #listDetail .list-items-summary { align-items: center; gap: 5px 12px; }
  #listDetail .list-summary-actions {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px;
  }
  #listDetail .saved-product-row {
    grid-template-columns: clamp(48px, 14vw, 68px) minmax(0, 1fr) auto;
    gap: 5px 8px; padding: 12px 0; align-items: center;
  }
  #listDetail .saved-product-image {
    grid-area: 1 / 1 / 3; align-self: start; width: 100%; height: auto; aspect-ratio: 1;
  }
  #listDetail .saved-product-info, #listDetail .saved-unit-details, #listDetail .saved-row-pricing { display: contents; }
  #listDetail .saved-product-info > :first-child { grid-area: 1 / 2 / auto / -1; }
  #listDetail .saved-unit-details > :first-child {
    grid-area: 2 / 2; justify-self: start; color: #242424; background: #f5f5f5;
    border: 1px solid #dcdcdc; border-radius: 7px; padding: 3px 6px;
    font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums;
  }
  #listDetail .saved-unit-details .saved-unavailable { grid-area: 3 / 2 / auto / -1; font-size: 12px; }
  #listDetail [data-owner-item-reactions] { grid-column: 2; min-width: 0; }
  #listDetail [data-owner-item-reactions]:empty { display: none; }
  #listDetail [data-owner-item-reactions] .list-reactions__vote { padding: 1px 2px; font-size: 13px; }
  #listDetail .saved-row-cart { grid-column: 3; justify-self: end; margin: 0; padding: 4px 8px; }
  #listDetail .saved-product-row .saved-quantity {
    grid-area: 2 / 3; justify-self: end; width: 88px; height: 32px;
    border-radius: 9px; border-color: #dadada; background: #f4f4f4;
  }
  #listDetail .saved-product-row .saved-quantity button { width: 28px; font-size: 18px; }
  #listDetail .saved-row-actions, #listDetail .saved-line-total,
  #listDetail .saved-row-cart[data-selection="selected"] { display: none; }
}
@media (max-width: 420px) {
  #listDetail .list-summary-actions { flex-basis: 100%; margin: 0; justify-content: space-between; gap: 6px; }
  #listDetail .list-summary-actions .list-share { padding-inline: 10px; }
  #listDetail .clear-list { padding-inline: 2px; min-height: 38px; }
}
.saved-list-loading { color: #675f53; }
.lists-layout:has(.saved-list-loading) { min-block-size: 28rem; }
.lists-layout:has(.saved-list-loading) .list-detail:empty { visibility: hidden; }
@media (max-width: 700px) {
  .lists-layout:has(.saved-list-loading) { min-block-size: 36rem; }
}
