/* Single recipe page - docs/design/Recept-kort.html */

body.page-recipe {
  background: var(--white);
  --article-content-width: min(var(--max-article), calc(100vw - 2rem));
  --pillar-band-width: min(var(--max), calc(100vw - 2.5rem));
}

.page-recipe article {
  --recipe-content-width: min(100% - 2rem, var(--max-article));
}

.recipe-hero {
  padding: clamp(2.5rem, 5vw, 3.5rem) 0 0;
  background: var(--white);
}

.recipe-hero .container--recipe {
  width: var(--recipe-content-width);
}

.recipe-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 1rem 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.recipe-meta-row span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.recipe-featured-wrap {
  position: relative;
  z-index: 1;
  width: var(--recipe-content-width);
  margin: 2rem auto 0;
  margin-bottom: calc(var(--recipe-content-width) * -9 / 32);
}

.recipe-featured {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border-subtle);
}

.recipe-featured-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.recipe-featured-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

.recipe-body {
  padding: calc(var(--recipe-content-width) * 9 / 32 + 1.5rem) 0 3rem;
  background: var(--white);
}

.recipe-prose {
  width: var(--recipe-content-width);
  margin-inline: auto;
}

.recipe-prose > * + * {
  margin-top: 1.25rem;
}

.recipe-lead {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
}

.recipe-prose p {
  color: var(--text);
  line-height: 1.7;
}

.recipe-prose h2 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-size: clamp(1.25rem, 3vw, 1.5rem);
}

.recipe-prose h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-style: normal;
  font-weight: 700;
}

.recipe-prose h3 + ul {
  margin-top: 0.5rem;
}

.recipe-prose ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.625rem;
}

/* Ingredienser och övriga listor: punktlista, inga nummer. */
.recipe-prose ul:not(:has(input[type="checkbox"])) {
  list-style: disc;
  padding-left: 1.25rem;
  gap: 0.375rem;
}

.recipe-prose ul:not(:has(input[type="checkbox"])) li {
  display: list-item;
  padding: 0;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--text);
}

.recipe-prose ul:not(:has(input[type="checkbox"])) li::before {
  content: none;
}

.recipe-prose input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Instruktioner: numrerade steg med grå cirkel. */
.recipe-prose ul:has(input[type="checkbox"]),
.recipe-prose ol {
  list-style: none;
  counter-reset: recipe-step;
  padding: 0;
  display: grid;
  gap: 0.875rem;
}

.recipe-prose ul:has(input[type="checkbox"]) li,
.recipe-prose ol li {
  counter-increment: recipe-step;
  padding: 0 0 0 2rem;
  border-bottom: none;
  position: relative;
  line-height: 1.7;
  font-size: 0.9375rem;
  color: var(--text);
}

.recipe-prose ul:has(input[type="checkbox"]) li::before,
.recipe-prose ol li::before {
  content: counter(recipe-step);
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  background: var(--green-muted);
  color: var(--green-text-strong);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.recipe-prose a {
  font-weight: 700;
  color: var(--green-text);
  text-decoration-thickness: 1px;
}

.recipe-prose img,
.recipe-prose svg {
  display: none;
}

.recipe-prose .store-badges img {
  display: block;
}

.recipe-cta {
  margin: 2.5rem 0 0;
  padding: 1.75rem 1.5rem;
  background: linear-gradient(135deg, var(--green) 0%, #3a7373 100%);
  color: var(--white);
  border-radius: var(--radius);
  display: grid;
  gap: 1.25rem;
}

.recipe-cta h2 {
  color: var(--white);
  margin: 0 0 0.5rem;
  font-size: clamp(1.375rem, 3vw, 1.75rem);
}

.recipe-cta p {
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  max-width: 46ch;
  line-height: 1.55;
}

.recipe-cta-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.625rem;
  width: fit-content;
  margin-inline: auto;
}

.recipe-cta-label {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  color: rgba(255, 255, 255, 0.78);
}

.recipe-cta .store-badges {
  gap: 0.625rem;
}

.recipe-cta .store-badges a {
  height: 44px;
  width: 135px;
}

.page-recipe .recipe-related-recipes {
  border-top: 1px solid var(--border-subtle);
}

.page-recipe .recipe-related-recipes .article-related-lead {
  max-width: none;
}

.page-recipe .recipe-related-pillars {
  border-top: 0;
}

@media (min-width: 640px) {
  .recipe-cta {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .recipe-cta-actions {
    justify-self: end;
    margin-inline: 0;
  }
}
