/*
 * Darin Kitchen recipe article components
 * Paste after the existing recipe component CSS.
 * Scoped to single-post article content to avoid affecting the theme,
 * sidebar widgets, navigation, or the recipe-card plugin.
 */

.single-post .entry-content {
  --dk-forest: #1b382e;
  --dk-green: #2b745f;
  --dk-mint: #2fc6a3;
  --dk-mint-soft: #eff9f6;
  --dk-mint-border: #cfe7df;
  --dk-coral: #e4556c;
  --dk-coral-dark: #a83d50;
  --dk-coral-soft: #fff4f6;
  --dk-coral-border: #f0d2d8;
  --dk-cream: #fffaf6;
  --dk-text: #3d4643;
  --dk-muted: #68736f;
  --dk-shadow: 0 10px 28px rgba(27, 56, 46, 0.08);
  --dk-shadow-hover: 0 14px 34px rgba(27, 56, 46, 0.12);
}

/* Shared rhythm and safe text wrapping */
.single-post .entry-content :is(
  .rcp-box,
  .rcp-note,
  .rcp-love,
  .rcp-faq
) {
  box-sizing: border-box;
  color: var(--dk-text);
  overflow-wrap: anywhere;
}

.single-post .entry-content :is(.rcp-box, .rcp-note) {
  margin-block: 34px;
}

.single-post .entry-content :is(.rcp-box, .rcp-note) > :first-child {
  margin-top: 0;
}

.single-post .entry-content :is(.rcp-box, .rcp-note) > :last-child {
  margin-bottom: 0;
}

.single-post .entry-content :is(.rcp-box, .rcp-note) p,
.single-post .entry-content :is(.rcp-box, .rcp-note) ul,
.single-post .entry-content :is(.rcp-box, .rcp-note) ol {
  max-width: none;
}

/* 1. Explanatory section box */
.single-post .entry-content .rcp-box {
  position: relative;
  isolation: isolate;
  padding: 26px 28px 25px;
  border: 1px solid var(--dk-mint-border);
  border-top: 4px solid var(--dk-green);
  border-radius: 16px;
  background: linear-gradient(145deg, #ffffff 0%, #f6fcfa 100%);
  box-shadow: var(--dk-shadow);
}

.single-post .entry-content .rcp-box > h2:first-child,
.single-post .entry-content .rcp-box > h3:first-child {
  margin: 0 0 18px;
  color: var(--dk-forest);
  font-family: Eczar, Georgia, serif;
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.single-post .entry-content .rcp-box > h2:first-child::after,
.single-post .entry-content .rcp-box > h3:first-child::after {
  display: block;
  width: 46px;
  height: 3px;
  margin-top: 11px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--dk-green), var(--dk-mint));
  content: "";
}

.single-post .entry-content .rcp-box li::marker {
  color: var(--dk-green);
  font-weight: 700;
}

/* 2. Actionable tip, rescue, storage, or reheating note */
.single-post .entry-content .rcp-note {
  position: relative;
  padding: 22px 24px 22px 27px;
  border: 1px solid var(--dk-coral-border);
  border-left: 6px solid var(--dk-coral);
  border-radius: 14px;
  background: linear-gradient(135deg, var(--dk-cream), var(--dk-coral-soft));
  box-shadow: 0 8px 24px rgba(168, 61, 80, 0.07);
}

.single-post .entry-content .rcp-note-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  color: var(--dk-coral-dark);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.06em;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0.005em;
}

.single-post .entry-content .rcp-note-title::before {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
  background: var(--dk-coral);
  box-shadow: 0 0 0 5px rgba(228, 85, 108, 0.13);
  content: "";
}

.single-post .entry-content .rcp-note ul,
.single-post .entry-content .rcp-note ol {
  margin: 0;
  padding-left: 1.25em;
}

.single-post .entry-content .rcp-note li {
  margin-bottom: 9px;
  padding-left: 3px;
}

.single-post .entry-content .rcp-note li:last-child {
  margin-bottom: 0;
}

.single-post .entry-content .rcp-note li::marker {
  color: var(--dk-coral);
  font-weight: 800;
}

/* 3. Related-recipes line */
.single-post .entry-content .rcp-love {
  position: relative;
  margin-block: 30px;
  padding: 16px 20px 16px 54px;
  border: 1px solid var(--dk-mint-border);
  border-radius: 14px;
  background: var(--dk-mint-soft);
  box-shadow: 0 6px 18px rgba(27, 56, 46, 0.06);
  color: var(--dk-forest);
  font-size: 0.97em;
  line-height: 1.6;
}

.single-post .entry-content .rcp-love::before {
  position: absolute;
  top: 50%;
  left: 18px;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--dk-coral);
  box-shadow: 0 0 0 5px rgba(228, 85, 108, 0.11);
  color: #ffffff;
  content: "♥";
  font-size: 13px;
  line-height: 1;
}

.single-post .entry-content .rcp-love a {
  color: var(--dk-forest);
  font-weight: 750;
  text-decoration-color: var(--dk-coral);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.single-post .entry-content .rcp-love a:hover {
  color: var(--dk-coral-dark);
}

/* 4. FAQ accordion */
.single-post .entry-content .rcp-faq {
  overflow: clip;
  margin-block: 11px;
  border: 1px solid #d8e8e2;
  border-radius: 13px;
  background: #ffffff;
  box-shadow: 0 3px 14px rgba(27, 56, 46, 0.055);
  transition: border-color 180ms ease, box-shadow 180ms ease,
    transform 180ms ease;
}

.single-post .entry-content .rcp-faq summary {
  position: relative;
  display: flex;
  min-height: 58px;
  align-items: center;
  margin: 0;
  padding: 15px 64px 15px 19px;
  color: var(--dk-forest);
  cursor: pointer;
  font-size: 1em;
  font-weight: 750;
  line-height: 1.4;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}

.single-post .entry-content .rcp-faq summary::-webkit-details-marker {
  display: none;
}

.single-post .entry-content .rcp-faq summary::marker {
  content: "";
}

.single-post .entry-content .rcp-faq summary::after {
  position: absolute;
  top: 50%;
  right: 16px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--dk-mint-soft);
  color: var(--dk-green);
  content: "+";
  font-family: system-ui, sans-serif;
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  transition: background-color 180ms ease, color 180ms ease,
    transform 180ms ease;
}

.single-post .entry-content .rcp-faq[open] {
  border-color: #bcded3;
  box-shadow: 0 9px 24px rgba(27, 56, 46, 0.09);
}

.single-post .entry-content .rcp-faq[open] summary {
  border-bottom: 1px solid #dcece7;
  background: #f5fbf9;
}

.single-post .entry-content .rcp-faq[open] summary::after {
  transform: translateY(-50%) rotate(180deg);
  background: var(--dk-green);
  color: #ffffff;
  content: "−";
}

.single-post .entry-content .rcp-faq > p {
  margin: 0;
  padding: 17px 20px 19px;
  color: var(--dk-text);
  font-size: 0.96em;
  line-height: 1.65;
}

.single-post .entry-content .rcp-faq[open] > p {
  animation: dk-faq-reveal 180ms ease-out both;
}

@keyframes dk-faq-reveal {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 5. Process-photo caption */
.single-post .entry-content .rcp-caption {
  margin: 10px 8px 34px;
  padding-left: 13px;
  border-left: 3px solid #8ed4c2;
  color: var(--dk-muted);
  font-size: 0.86em;
  font-style: italic;
  line-height: 1.55;
  text-align: left;
}

/* 6. Soft divider */
.single-post .entry-content hr.rcp-divider {
  width: min(240px, 58%);
  height: 2px;
  margin: 46px auto;
  border: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    #b7ddd2 25%,
    var(--dk-coral) 50%,
    #b7ddd2 75%,
    transparent 100%
  );
  opacity: 0.8;
}

/* Keyboard accessibility */
.single-post .entry-content :is(.rcp-faq summary, .rcp-love a):focus-visible {
  outline: 3px solid rgba(228, 85, 108, 0.42);
  outline-offset: 3px;
}

/* Pointer hover feedback without burdening touch devices */
@media (hover: hover) and (pointer: fine) {
  .single-post .entry-content .rcp-faq:hover {
    border-color: #bcded3;
    box-shadow: var(--dk-shadow);
    transform: translateY(-1px);
  }

  .single-post .entry-content .rcp-faq summary:hover::after {
    background: #dff3ed;
  }
}

/*
 * Defensive treatment for Ad Inserter blocks injected inside a component.
 * The preferred fix is to exclude .rcp-box, .rcp-note, and .rcp-faq from
 * automatic paragraph-based ad insertion. This rule keeps an injected block
 * visually separated without hiding or disabling the ad.
 */
.single-post .entry-content :is(.rcp-box, .rcp-note) > .code-block {
  clear: both;
  margin: 24px -28px 0;
  padding: 20px 28px 0;
  border-top: 1px solid rgba(27, 56, 46, 0.1);
}

.single-post .entry-content .rcp-note > .code-block {
  margin-right: -24px;
  margin-left: -27px;
  padding-right: 24px;
  padding-left: 27px;
}

/* Mobile sizing and thumb-friendly controls */
@media (max-width: 640px) {
  .single-post .entry-content :is(.rcp-box, .rcp-note) {
    margin-block: 28px;
  }

  .single-post .entry-content .rcp-box {
    padding: 20px 18px;
    border-top-width: 3px;
    border-radius: 13px;
  }

  .single-post .entry-content .rcp-box > h2:first-child,
  .single-post .entry-content .rcp-box > h3:first-child {
    margin-bottom: 15px;
    font-size: clamp(1.35rem, 7vw, 1.62rem);
  }

  .single-post .entry-content .rcp-note {
    padding: 18px 17px 18px 19px;
    border-left-width: 5px;
    border-radius: 12px;
  }

  .single-post .entry-content .rcp-love {
    margin-block: 26px;
    padding: 15px 16px 15px 49px;
    border-radius: 12px;
  }

  .single-post .entry-content .rcp-love::before {
    left: 15px;
    width: 24px;
    height: 24px;
  }

  .single-post .entry-content .rcp-faq {
    border-radius: 11px;
  }

  .single-post .entry-content .rcp-faq summary {
    min-height: 56px;
    padding: 14px 56px 14px 16px;
    font-size: 0.98em;
  }

  .single-post .entry-content .rcp-faq summary::after {
    right: 13px;
    width: 30px;
    height: 30px;
  }

  .single-post .entry-content .rcp-faq > p {
    padding: 15px 16px 17px;
    font-size: 0.94em;
  }

  .single-post .entry-content .rcp-caption {
    margin-right: 4px;
    margin-bottom: 30px;
    margin-left: 4px;
  }

  .single-post .entry-content hr.rcp-divider {
    margin-block: 38px;
  }

  .single-post .entry-content .rcp-box > .code-block {
    margin-right: -18px;
    margin-left: -18px;
    padding-right: 18px;
    padding-left: 18px;
  }

  .single-post .entry-content .rcp-note > .code-block {
    margin-right: -17px;
    margin-left: -19px;
    padding-right: 17px;
    padding-left: 19px;
  }
}

/* Respect motion preferences */
@media (prefers-reduced-motion: reduce) {
  .single-post .entry-content .rcp-faq,
  .single-post .entry-content .rcp-faq summary::after,
  .single-post .entry-content .rcp-faq[open] > p {
    animation: none;
    transition: none;
  }
}

/* Clean printed recipes */
@media print {
  .single-post .entry-content :is(
    .rcp-box,
    .rcp-note,
    .rcp-love,
    .rcp-faq
  ) {
    break-inside: avoid;
    border-color: #bfc7c4;
    background: #ffffff;
    box-shadow: none;
  }

  .single-post .entry-content .rcp-faq > p {
    display: block !important;
  }

  .single-post .entry-content .rcp-faq summary::after {
    display: none;
  }
}