/* Display one of the three panels from the supplied artwork on each button. */
#browse #washingFilters {
  grid-template-rows: auto !important;
  --washing-filter-art-height: clamp(47px, 12vw, 82px);
}
#browse #washingFilters > .washing-filter-button[data-washing] {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  place-items: center;
  align-self: stretch !important;
  height: calc(var(--washing-filter-art-height) + 34px) !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 5px !important;
}

#browse #washingFilters > .washing-filter-button::before {
  content: "";
  display: block;
  width: min(100%, calc(var(--crop-width) / var(--crop-height) * var(--washing-filter-art-height)));
}
#browse #washingFilters > .washing-filter-button > .washing-typed-label {
  display: block !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: center;
  white-space: normal;
  font-size: clamp(0.72rem, 2.9vw, 0.95rem) !important;
  line-height: 1.2 !important;
  font-weight: 750;
}
.washing-card-art {
  display: block;
  flex: none;
  width: min(38px, 100%);
}
#washingFilters > [data-washing="Few"],
.washing-card-art[data-washing-art="Few"] {
  --crop-x: 131;
  --crop-y: 157;
  --crop-width: 476;
  --crop-height: 302;
}
#washingFilters > [data-washing="Some"],
.washing-card-art[data-washing-art="Some"] {
  --crop-x: 826;
  --crop-y: 114;
  --crop-width: 519;
  --crop-height: 347;
}
#washingFilters > [data-washing="Lots"],
.washing-card-art[data-washing-art="Lots"] {
  --crop-x: 1498;
  --crop-y: 112;
  --crop-width: 626;
  --crop-height: 350;
}
/* The original sheet is 2172 × 724. Detail badges crop out the lettering. */
#browse #washingFilters > .washing-filter-button::before,
.washing-card-art {
  aspect-ratio: var(--crop-width) / var(--crop-height);
  background-image: url("ui-art/washing-dishes-v360.png");
  background-repeat: no-repeat;
  background-size: calc(2172 / var(--crop-width) * 100%) calc(724 / var(--crop-height) * 100%);
  background-position: calc(var(--crop-x) / (2172 - var(--crop-width)) * 100%)
                       calc(var(--crop-y) / (724 - var(--crop-height)) * 100%);
}
.washing-up-simple .washing-card-art {
  width: min(100%, calc(var(--crop-width) / var(--crop-height) * 60px));
  mix-blend-mode: multiply;
}

/* Keep the caption beneath the artwork at every recipe width. */
#recipeDetail .recipe-scale-side > .washing-up-simple {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  text-align: center;
}
#recipeDetail .recipe-scale-side > .washing-up-simple strong {
  width: 100%;
  min-block-size: 2.4em;
  align-content: center;
  overflow-wrap: normal !important;
  line-height: 1.2 !important;
}
@media (max-width: 700px) {
  #recipeDetail .recipe-scale-side > .plant-points-detail,
  #recipeDetail .recipe-scale-side > .washing-up-simple {
    height: auto !important;
    min-height: 68px !important;
  }
  #recipeDetail .recipe-scale-side > .plant-points-detail {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 5px;
  }
  #recipeDetail .plant-points-detail .plant-leaf { font-size: 21px; }
  #recipeDetail .plant-points-detail strong {
    font-size: 12px !important;
    overflow-wrap: normal !important;
  }
  #recipeDetail .washing-up-simple .washing-card-art {
    width: min(100%, calc(var(--crop-width) / var(--crop-height) * 48px));
  }
}
