/*
 * Recipe page: block "Das nutze ich für dieses Brot" below "Das brauchst du" (template-parts/recipe-gear.php),
 * its reminder after the steps (recipe-gear-reminder.php) and the compact partner links further down
 * (recipe-gear-partners.php). Enqueued by src/RecipeHelpers.php on recipe pages while the block is switched on.
 * Phone first: 16px side gutter (the text inside lines up with the page's 36px text column), text 14px and up,
 * tap targets 44px and up. Breakpoints as in main.less: 834px (text column 666px), 1194px (810px). Colour #191919.
 */

.single-recipes .jo-gear,
.single-recipes .jo-gear-reminder,
.single-recipes .jo-gear-partners {
  box-sizing: border-box;
  max-width: calc(100% - 32px);
  margin-left: auto;
  margin-right: auto;
  font-family: 'Open Sans', sans-serif;
  color: #191919;
}

.single-recipes .jo-gear *,
.single-recipes .jo-gear-reminder *,
.single-recipes .jo-gear-partners * {
  box-sizing: border-box;
}

@media only screen and (min-width: 834px) {
  .single-recipes .jo-gear,
  .single-recipes .jo-gear-reminder,
  .single-recipes .jo-gear-partners {
    max-width: 714px;
  }
}

@media only screen and (min-width: 1194px) {
  .single-recipes .jo-gear,
  .single-recipes .jo-gear-reminder,
  .single-recipes .jo-gear-partners {
    max-width: 858px;
  }
}

@media print {
  .single-recipes .jo-gear,
  .single-recipes .jo-gear-reminder,
  .single-recipes .jo-gear-partners {
    display: none;
  }
}

/* ---------- Block "Das nutze ich" ---------- */

.single-recipes .jo-gear {
  margin-top: 18px;
  margin-bottom: 34px;
  scroll-margin-top: 90px;
}

.single-recipes .jo-gear__box {
  background: #fff;
  border-radius: 8px;
  padding: 18px 16px 16px;
}

@media only screen and (min-width: 834px) {
  .single-recipes .jo-gear {
    margin-top: 24px;
  }

  .single-recipes .jo-gear__box {
    padding: 24px;
  }
}

.single-recipes .jo-gear .jo-gear__title {
  margin: 0;
  font-family: 'Open Sans', sans-serif;
  font-size: 20px;
  line-height: 27px;
  font-weight: 800;
  text-transform: uppercase;
  color: #191919;
}

@media only screen and (min-width: 834px) {
  .single-recipes .jo-gear .jo-gear__title {
    font-size: 24px;
    line-height: 32px;
  }
}

.single-recipes .jo-gear .jo-gear__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* image | name, reason; below across the full width: price left, button right (wraps when the price is long) */
.single-recipes .jo-gear .jo-gear__item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  column-gap: 14px;
  align-items: start;
  margin: 0;
  padding: 16px 0;
  border-top: 1px solid #EDEBE8;
}

.single-recipes .jo-gear .jo-gear__item:first-child {
  border-top: 0;
  padding-top: 14px;
}

.single-recipes .jo-gear .jo-gear__item:last-child {
  padding-bottom: 4px;
}

@media only screen and (min-width: 834px) {
  .single-recipes .jo-gear .jo-gear__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 28px;
  }

  /* two products per row: price and button of both at the same height */
  .single-recipes .jo-gear .jo-gear__item {
    grid-template-columns: 88px minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    padding-bottom: 16px;
  }

  .single-recipes .jo-gear .jo-gear__buy {
    align-self: end;
  }

  .single-recipes .jo-gear .jo-gear__item:nth-child(2) {
    border-top: 0;
    padding-top: 14px;
  }
}

.single-recipes .jo-gear .jo-gear__image {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  overflow: hidden;
  background: #EDEBE8;
}

.single-recipes .jo-gear .jo-gear__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.single-recipes .jo-gear .jo-gear__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.single-recipes .jo-gear .jo-gear__tag {
  display: inline-block;
  margin: 0 0 6px;
  padding: 1px 8px;
  border-radius: 4px;
  background: #EDEBE8;
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
}

/* the name is a link too: padding + negative margin give it a 44px tap area without moving the text */
.single-recipes .jo-gear .jo-gear__name {
  display: block;
  margin: -11px 0;
  padding: 11px 0;
  font-family: 'Anton', sans-serif;
  font-size: 18px;
  line-height: 23px;
  font-weight: 400;
  text-transform: uppercase;
  color: #191919;
  text-decoration: none;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.single-recipes .jo-gear .jo-gear__name:hover,
.single-recipes .jo-gear .jo-gear__name:focus-visible {
  text-decoration: underline;
}

.single-recipes .jo-gear .jo-gear__reason {
  margin: 5px 0 0;
  font-family: 'Open Sans', sans-serif;
  font-size: 15px;
  line-height: 21px;
  font-weight: 500;
  color: #191919;
}

.single-recipes .jo-gear .jo-gear__buy {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-top: 12px;
}

.single-recipes .jo-gear .jo-gear__price {
  font-size: 16px;
  line-height: 22px;
  font-weight: 700;
}

.single-recipes .jo-gear .jo-gear__price small,
.single-recipes .jo-gear .jo-gear__price .woocommerce-price-suffix {
  font-size: 14px;
  font-weight: 500;
}

.single-recipes .jo-gear .jo-gear__price del {
  opacity: .55;
  font-weight: 500;
}

.single-recipes .jo-gear .jo-gear__price ins {
  text-decoration: none;
}

.single-recipes .jo-gear .jo-gear__price .jo-card-unit-price {
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
}

.single-recipes .jo-gear .jo-gear__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 44px;
  margin-left: auto;
  padding: 10px 18px;
  border-radius: 6px;
  background: #191919;
  color: #fff;
  font-family: 'Open Sans', sans-serif;
  font-size: 15px;
  line-height: 20px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: background-color .15s;
}

.single-recipes .jo-gear .jo-gear__button:hover {
  background: #000;
  color: #fff;
}

.single-recipes .jo-gear .jo-gear__button:focus-visible,
.single-recipes .jo-gear-reminder a:focus-visible,
.single-recipes .jo-gear-partners a:focus-visible {
  outline: 2px solid #191919;
  outline-offset: 2px;
}

.single-recipes .jo-gear .jo-gear__without {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 6px;
  background: #F4F2EF;
}

.single-recipes .jo-gear .jo-gear__without p {
  margin: 0;
  font-size: 15px;
  line-height: 22px;
  font-weight: 500;
}

.single-recipes .jo-gear .jo-gear__without .jo-gear__without-line {
  font-weight: 700;
}

.single-recipes .jo-gear .jo-gear__without p + p {
  margin-top: 4px;
}

.single-recipes .jo-gear .jo-gear__without-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 15px;
  font-weight: 700;
  color: #191919;
  text-decoration: underline;
}

.single-recipes .jo-gear .jo-gear__note {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid #EDEBE8;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: #4A4643;
}

/* ---------- Reminder after the steps ---------- */

.single-recipes .jo-gear-reminder {
  margin-top: 8px;
  margin-bottom: 40px;
}

.single-recipes .jo-gear-reminder__box {
  background: #fff;
  border-radius: 8px;
  padding: 14px 16px 6px;
}

@media only screen and (min-width: 834px) {
  .single-recipes .jo-gear-reminder__box {
    padding: 18px 24px 10px;
  }
}

.single-recipes .jo-gear-reminder .jo-gear-reminder__title {
  margin: 0 0 2px;
  font-family: 'Open Sans', sans-serif;
  font-size: 16px;
  line-height: 22px;
  font-weight: 800;
  text-transform: uppercase;
  color: #191919;
}

.single-recipes .jo-gear-reminder .jo-gear-reminder__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.single-recipes .jo-gear-reminder .jo-gear-reminder__item {
  margin: 0;
  border-top: 1px solid #EDEBE8;
}

.single-recipes .jo-gear-reminder .jo-gear-reminder__item:first-child {
  border-top: 0;
}

.single-recipes .jo-gear-reminder .jo-gear-reminder__link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 8px 0;
  color: #191919;
  text-decoration: none;
}

.single-recipes .jo-gear-reminder .jo-gear-reminder__image {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 6px;
  overflow: hidden;
  background: #EDEBE8;
}

.single-recipes .jo-gear-reminder .jo-gear-reminder__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.single-recipes .jo-gear-reminder .jo-gear-reminder__name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 15px;
  line-height: 20px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.single-recipes .jo-gear-reminder .jo-gear-reminder__go {
  flex: 0 0 auto;
  font-size: 15px;
  line-height: 20px;
  font-weight: 700;
  text-decoration: underline;
  white-space: nowrap;
}

.single-recipes .jo-gear-reminder .jo-gear-reminder__link:hover .jo-gear-reminder__name {
  text-decoration: underline;
}

.single-recipes .jo-gear-reminder .jo-gear-reminder__more {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 15px;
  line-height: 20px;
  font-weight: 700;
  color: #191919;
  text-decoration: underline;
}

/* ---------- Partner links (Amazon), visually secondary ---------- */

.single-recipes .jo-gear-partners {
  margin-top: 12px;
  margin-bottom: 56px;
}

.single-recipes .jo-gear-partners__inner {
  padding: 0 16px;
}

@media only screen and (min-width: 834px) {
  .single-recipes .jo-gear-partners__inner {
    padding: 0 24px;
  }
}

.single-recipes .jo-gear-partners .jo-gear-partners__title {
  margin: 0 0 4px;
  font-family: 'Open Sans', sans-serif;
  font-size: 16px;
  line-height: 22px;
  font-weight: 700;
  text-transform: none;
  color: #191919;
}

.single-recipes .jo-gear-partners .jo-gear-partners__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

@media only screen and (min-width: 834px) {
  .single-recipes .jo-gear-partners .jo-gear-partners__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 24px;
  }
}

.single-recipes .jo-gear-partners .jo-gear-partners__item {
  margin: 0;
  border-bottom: 1px solid #DAD6D1;
}

.single-recipes .jo-gear-partners .jo-gear-partners__link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 6px 0;
  color: #191919;
  text-decoration: none;
}

.single-recipes .jo-gear-partners .jo-gear-partners__image {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.single-recipes .jo-gear-partners .jo-gear-partners__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border: 0;
}

.single-recipes .jo-gear-partners .jo-gear-partners__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.single-recipes .jo-gear-partners .jo-gear-partners__name {
  font-size: 14px;
  line-height: 19px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.single-recipes .jo-gear-partners .jo-gear-partners__shop {
  margin-top: 2px;
  font-size: 14px;
  line-height: 19px;
  font-weight: 500;
  color: #4A4643;
  text-decoration: underline;
}

.single-recipes .jo-gear-partners .jo-gear-partners__note {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: #4A4643;
}
