/* WP Recipe Pro – Public Stylesheet */

/* ── Variables ──────────────────────────────────── */
:root {
  --wprp-primary:       #2d6a4f;
  --wprp-primary-dark:  #1b4332;
  --wprp-accent:        #52b788;
  --wprp-text:          #1a1a1a;
  --wprp-text-light:    #555;
  --wprp-border:        #e0e0e0;
  --wprp-bg:            #fff;
  --wprp-bg-alt:        #f8f8f6;
  --wprp-radius:        8px;
  --wprp-shadow:        0 2px 12px rgba(0,0,0,.08);
  --wprp-font:          inherit;
}

/* ── Card wrapper ────────────────────────────────── */
.wprp-recipe-card {
  font-family: var(--wprp-font);
  background: var(--wprp-bg);
  border: 1px solid var(--wprp-border);
  border-radius: var(--wprp-radius);
  box-shadow: var(--wprp-shadow);
  overflow: hidden;
  max-width: 780px;
  margin: 32px auto;
  color: var(--wprp-text);
  line-height: 1.6;
}

/* ── Coloured header band ────────────────────────── */
.wprp-card-header-band {
  background: var(--wprp-primary);
  color: #fff;
  text-align: center;
  padding: 28px 24px 22px;
  position: relative;
}
.wprp-card-hero-image {
  margin: 0 auto 16px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid rgba(255,255,255,.35);
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
}
.wprp-card-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.wprp-recipe-title {
  font-size: 1.7em;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
  margin: 0 0 8px;
  color: #fff;
  line-height: 1.2;
}
.wprp-recipe-description {
  margin: 0 0 14px;
  color: rgba(255,255,255,.85);
  font-size: .95em;
}

/* ── Action buttons ──────────────────────────────── */
.wprp-card-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 14px; }
.wprp-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 20px; font-size: .88em; font-weight: 700;
  border-radius: 4px; text-decoration: none; cursor: pointer;
  transition: background .15s, transform .1s;
  border: none; white-space: nowrap;
}
.wprp-btn:hover { transform: translateY(-1px); }
.wprp-btn-print  { background: #fff; color: var(--wprp-primary); }
.wprp-btn-print:hover { background: #f0faf4; color: var(--wprp-primary); }
.wprp-btn-pin    { background: #e60023; color: #fff; }
.wprp-btn-pin:hover { background: #c0001d; }
.wprp-btn-jump   { background: var(--wprp-bg-alt); color: var(--wprp-primary); border: 1px solid var(--wprp-border); }
.wprp-btn-shop   { background: #ff7400; color: #fff; }
.wprp-btn-shop:hover { background: #e05f00; }
.wprp-btn-download {
  background: var(--wprp-primary); color: #fff;
  padding: 12px 28px; font-size: 1em; border-radius: var(--wprp-radius);
  box-shadow: 0 2px 8px rgba(45,106,79,.3);
}
.wprp-btn-download:hover { background: var(--wprp-primary-dark); color: #fff; }

/* Inner card padding for everything below the band */
.wprp-recipe-card > *:not(.wprp-card-header-band):not(.wprp-card-footer-band) {
  padding-left: 24px;
  padding-right: 24px;
}

/* ── Time row ────────────────────────────────────── */
.wprp-time-row {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--wprp-border);
  margin-bottom: 0;
}
.wprp-time-item {
  flex: 1;
  min-width: 100px;
  text-align: center;
  padding: 14px 8px;
  border-right: 1px solid var(--wprp-border);
}
.wprp-time-item:last-child { border-right: none; }
.wprp-time-icon { color: var(--wprp-primary); display: block; margin-bottom: 4px; }
.wprp-time-icon svg { display: inline-block; vertical-align: middle; }
.wprp-time-label {
  display: block;
  font-size: .72em;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--wprp-text-light);
  margin-bottom: 2px;
}
.wprp-time-value { font-weight: 700; font-size: .95em; }

/* ── Pills row (servings / course / cuisine / cals) ── */
.wprp-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--wprp-border);
}
.wprp-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--wprp-primary);
  color: #fff;
  border-radius: 20px;
  padding: 4px 14px;
  font-size: .8em;
  font-weight: 600;
}
.wprp-pill-label { opacity: .8; font-weight: 400; }
.wprp-pill-value { font-weight: 700; }

/* ── Section headings ────────────────────────────── */
.wprp-card-ingredients h3,
.wprp-card-instructions h3,
.wprp-card-notes h3,
.wprp-card-equipment h3,
.wprp-card-section h3 {
  font-size: 1em;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 800;
  border-bottom: 2px solid var(--wprp-primary);
  padding-bottom: 6px;
  margin: 24px 0 14px;
  color: var(--wprp-primary);
}
.wprp-group-title {
  font-size: .95em; font-weight: 700;
  color: var(--wprp-text-light); margin: 14px 0 6px;
}

/* Section padding */
.wprp-card-ingredients,
.wprp-card-instructions,
.wprp-card-notes,
.wprp-card-equipment,
.wprp-card-section,
.wprp-card-keywords {
  padding-top: 0;
  padding-bottom: 4px;
}

/* ── Video ───────────────────────────────────────── */
.wprp-video-wrapper { margin-bottom: 20px; }
.wprp-embed-wrapper {
  position: relative; padding-bottom: 56.25%; height: 0;
  border-radius: var(--wprp-radius); overflow: hidden;
}
.wprp-embed-wrapper iframe {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}

/* ── Ingredients ─────────────────────────────────── */
.wprp-ingredient-list { list-style: none; padding: 0; margin: 0 0 12px; }
.wprp-ingredient {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 6px 0; border-bottom: 1px dashed var(--wprp-border);
  font-size: .95em;
}
.wprp-ingredient:last-child { border-bottom: none; }
.wprp-ingredient-checkbox { margin-top: 4px; flex-shrink: 0; accent-color: var(--wprp-primary); }
.wprp-ingredient-amount { font-weight: 700; min-width: 30px; }
.wprp-ingredient-unit { color: var(--wprp-text-light); }
.wprp-ingredient-notes { color: var(--wprp-text-light); font-style: italic; font-size: .88em; }
.wprp-ingredient-link { color: var(--wprp-primary); text-decoration: underline; }
.wprp-shop-link { font-size: .78em; background: #f0f0f0; padding: 1px 6px; border-radius: 3px; white-space: nowrap; text-decoration: none; color: var(--wprp-text); }
.wprp-shop-all { margin-top: 12px; }

/* ── Instructions ────────────────────────────────── */
.wprp-step-list { padding-left: 0; list-style: none; counter-reset: steps; }
.wprp-step {
  display: flex; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--wprp-border);
  counter-increment: steps;
}
.wprp-step:last-child { border-bottom: none; }
.wprp-step-content { flex: 1; }
.wprp-step-content::before {
  content: counter(steps);
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--wprp-primary); color: #fff;
  font-weight: 700; font-size: .85em;
  flex-shrink: 0; float: left; margin: 0 12px 2px 0;
}
.wprp-step-name { display: block; font-weight: 700; margin-bottom: 4px; }
.wprp-step-text { display: block; }
.wprp-step-image { max-width: 100%; border-radius: 4px; margin-top: 8px; }
.wprp-step-ingredients { margin-bottom: 6px; display: flex; flex-wrap: wrap; gap: 4px; }
.wprp-step-ingredient-tag {
  background: var(--wprp-bg-alt); border: 1px solid var(--wprp-border);
  border-radius: 12px; padding: 1px 10px; font-size: .8em;
}
.wprp-step-checkbox { flex-shrink: 0; margin-top: 4px; accent-color: var(--wprp-primary); }
.wprp-step-video { margin-top: 8px; }

/* ── Notes ───────────────────────────────────────── */
.wprp-notes-content {
  background: var(--wprp-bg-alt); border-left: 4px solid var(--wprp-accent);
  padding: 12px 16px; border-radius: 0 var(--wprp-radius) var(--wprp-radius) 0;
  font-size: .95em;
}

/* ── Ingredients + Nutrition side-by-side ─────────── */
.wprp-ingredients-nutrition-row {
  display: flex; align-items: flex-start; gap: 24px; margin: 0;
}
.wprp-ingredients-nutrition-row .wprp-card-ingredients {
  flex: 1 1 0; min-width: 0;
}
.wprp-ingredients-nutrition-row .wprp-nutrition-label {
  flex: 0 0 280px;
}

/* ── Nutrition label ─────────────────────────────── */
.wprp-nutrition-label {
  border: 2px solid var(--wprp-text); border-radius: 4px;
  padding: 12px; max-width: 320px; margin: 20px 0;
  font-size: .9em;
}
.wprp-nutrition-header h3 { margin: 0 0 4px; font-size: 1.4em; }
.wprp-nutrition-calories {
  display: flex; justify-content: space-between; align-items: baseline;
  border-top: 8px solid var(--wprp-text); border-bottom: 4px solid var(--wprp-text);
  padding: 4px 0; margin: 6px 0;
}
.wprp-nut-label { font-size: .85em; font-weight: 700; }
.wprp-nut-amount { font-size: 2em; font-weight: 900; }
.wprp-nutrition-dv-header { text-align: right; font-weight: 700; font-size: .8em; border-bottom: 4px solid var(--wprp-text); padding-bottom: 2px; }
.wprp-nutrition-list { list-style: none; padding: 0; margin: 0; }
.wprp-nut-row { display: flex; justify-content: space-between; border-bottom: 1px solid var(--wprp-border); padding: 2px 0; font-size: .85em; }
.wprp-nut-indent .wprp-nut-name { padding-left: 20px; }
.wprp-nut-bold { font-weight: 700; }
.wprp-nut-dv { font-weight: 700; }
.wprp-nutrition-footnote { font-size: .75em; color: var(--wprp-text-light); margin-top: 8px; }

/* ── Ratings ─────────────────────────────────────── */
.wprp-rating { margin: 6px 0 10px; }
.wprp-rating-form { display: inline-flex; flex-direction: row-reverse; align-items: center; gap: 4px; }
.wprp-rating-form fieldset { border: none; padding: 0; margin: 0; display: inline-flex; flex-direction: row-reverse; }
.wprp-star { font-size: 1.5em; cursor: pointer; color: rgba(255,255,255,.5); transition: color .1s; }
.wprp-card-header-band .wprp-star { color: rgba(255,255,255,.5); }
.wprp-rating-form .wprp-star:hover,
.wprp-rating-form .wprp-star:hover ~ .wprp-star,
.wprp-rating-form input:checked ~ .wprp-star { color: #f4a100; }
.wprp-stars-display .wprp-star--full,
.wprp-stars-display .wprp-star--half { color: #f4a100; }
.wprp-stars-display .wprp-star--empty { color: rgba(255,255,255,.4); }
.wprp-rating-summary { font-size: .85em; color: rgba(255,255,255,.8); margin-left: 6px; }

/* ── Timer ───────────────────────────────────────── */
.wprp-timer {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--wprp-bg-alt); border: 1px solid var(--wprp-border);
  border-radius: 24px; padding: 6px 14px; margin: 8px 0; font-size: .9em;
}
.wprp-timer-btn { background: none; border: none; cursor: pointer; font-size: 1.1em; padding: 2px 4px; }
.wprp-timer-display { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 48px; text-align: center; }
.wprp-timer-label { color: var(--wprp-text-light); }
.wprp-timer--done .wprp-timer-display { color: var(--wprp-primary); animation: wprp-pulse 1s infinite; }
@keyframes wprp-pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

/* ── Keywords ────────────────────────────────────── */
.wprp-card-keywords {
  margin-top: 4px; padding-top: 12px; padding-bottom: 12px;
  border-top: 1px solid var(--wprp-border);
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .85em;
}
.wprp-keywords-label { color: var(--wprp-text-light); font-weight: 600; }
.wprp-keyword-tag { background: var(--wprp-bg-alt); border: 1px solid var(--wprp-border); padding: 3px 12px; border-radius: 12px; }

/* ── Footer CTA band ─────────────────────────────── */
.wprp-card-footer-band {
  background: var(--wprp-primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 24px;
  font-weight: 700; font-size: 1em;
  flex-wrap: wrap;
  text-align: center;
}
.wprp-card-footer-band svg { flex-shrink: 0; }
.wprp-card-footer-band span { font-weight: 400; opacity: .85; }

/* ── Search form ─────────────────────────────────── */
.wprp-search-form { margin: 16px 0; }
.wprp-search-inner { display: flex; border: 1px solid var(--wprp-border); border-radius: 24px; overflow: hidden; max-width: 440px; }
.wprp-search-input { flex: 1; border: none; padding: 10px 16px; font-size: 1em; outline: none; }
.wprp-search-btn { background: var(--wprp-primary); color: #fff; border: none; padding: 0 16px; cursor: pointer; }
.wprp-search-btn:hover { background: var(--wprp-primary-dark); }

/* ── Roundup ─────────────────────────────────────── */
.wprp-roundup { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; margin: 20px 0; }
.wprp-roundup-card { border: 1px solid var(--wprp-border); border-radius: var(--wprp-radius); overflow: hidden; background: var(--wprp-bg); box-shadow: var(--wprp-shadow); }
.wprp-roundup-image { width: 100%; height: 160px; object-fit: cover; display: block; }
.wprp-roundup-body { padding: 12px; }
.wprp-roundup-title { font-size: 1em; margin: 0 0 6px; }
.wprp-roundup-title a { color: var(--wprp-text); text-decoration: none; }
.wprp-roundup-title a:hover { color: var(--wprp-primary); }
.wprp-roundup-desc { font-size: .85em; color: var(--wprp-text-light); margin: 0 0 6px; }
.wprp-roundup-meta { display: flex; gap: 12px; font-size: .8em; color: var(--wprp-text-light); }

/* ── Temperature shortcode ───────────────────────── */
.wprp-temperature { display: inline-flex; align-items: center; gap: 4px; }

/* ── Template variants ───────────────────────────── */
.wprp-template-compact .wprp-card-hero-image { width: 120px; height: 120px; }
.wprp-template-compact .wprp-recipe-title { font-size: 1.3em; }

.wprp-template-bold { border-top: 6px solid var(--wprp-primary-dark); }
.wprp-template-bold .wprp-recipe-title { font-size: 2.2em; letter-spacing: .06em; }
.wprp-template-bold .wprp-card-header-band { padding: 36px 24px 28px; }

/* ──────────────────────────────────────────────────
   COLORING PAGE CARD
   ────────────────────────────────────────────────── */
.wprp-coloring-page-card {
  font-family: var(--wprp-font);
  background: var(--wprp-bg);
  border: 1px solid var(--wprp-border);
  border-radius: var(--wprp-radius);
  box-shadow: var(--wprp-shadow);
  overflow: hidden;
  max-width: 680px;
  margin: 32px auto;
  color: var(--wprp-text);
  line-height: 1.6;
}

/* Header band */
.wprp-cp-header {
  background: var(--wprp-primary);
  color: #fff;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 24px;
}
.wprp-cp-header-text { flex: 1; min-width: 0; }
.wprp-cp-title {
  font-size: 1.5em;
  font-weight: 800;
  margin: 0 0 8px;
  color: #fff;
  line-height: 1.2;
}
.wprp-cp-description {
  margin: 0 0 12px;
  color: rgba(255,255,255,.85);
  font-size: .9em;
}
.wprp-cp-header-image {
  width: 120px;
  height: 120px;
  border-radius: var(--wprp-radius);
  overflow: hidden;
  flex-shrink: 0;
  border: 3px solid rgba(255,255,255,.3);
}
.wprp-cp-header-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Badges */
.wprp-cp-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.wprp-cp-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,.2);
  color: #fff;
  border-radius: 20px;
  padding: 3px 12px;
  font-size: .78em;
  font-weight: 600;
  backdrop-filter: blur(4px);
}
.wprp-cp-badge-difficulty.wprp-cp-diff-easy  { background: rgba(76,175,80,.6); }
.wprp-cp-badge-difficulty.wprp-cp-diff-medium { background: rgba(255,152,0,.6); }
.wprp-cp-badge-difficulty.wprp-cp-diff-hard   { background: rgba(244,67,54,.5); }

/* Preview image */
.wprp-cp-preview { padding: 20px 24px 0; background: var(--wprp-bg); }
.wprp-cp-preview-img {
  width: 100%;
  max-height: 400px;
  object-fit: contain;
  display: block;
  border-radius: var(--wprp-radius);
  border: 1px solid var(--wprp-border);
}

/* Download section */
.wprp-cp-download-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 20px 24px;
  background: var(--wprp-bg-alt);
  border-top: 1px solid var(--wprp-border);
}
.wprp-cp-download-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.wprp-cp-pdf-icon { color: #e53935; flex-shrink: 0; }
.wprp-cp-download-info strong { display: block; font-size: .95em; }
.wprp-cp-download-hint { margin: 2px 0 0; font-size: .82em; color: var(--wprp-text-light); }
.wprp-cp-no-pdf { padding: 16px 24px; font-size: .9em; color: var(--wprp-text-light); }

/* Footer band */
.wprp-cp-footer {
  background: var(--wprp-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  font-size: .85em;
}
.wprp-cp-footer-label { font-weight: 700; }
.wprp-cp-footer-print { opacity: .8; }

/* ──────────────────────────────────────────────────
   SHORTCODE INSERTER MODAL (front-end side — none needed here,
   all admin styles live in recipe-admin.css)
   ────────────────────────────────────────────────── */

/* ── SEO check panel ─────────────────────────────── */
.wprp-seo-panel h4 { margin-bottom: 8px; }
.wprp-seo-list { margin: 0; padding: 0; list-style: none; }
.wprp-seo-list li { padding: 4px 0; font-size: .85em; border-bottom: 1px solid #f0f0f0; }
.wprp-seo-ok      .wprp-seo-icon { color: #2e7d32; }
.wprp-seo-warning .wprp-seo-icon { color: #f57c00; }
.wprp-seo-error   .wprp-seo-icon { color: #c62828; }

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 600px) {
  .wprp-recipe-card { margin: 16px 0; }
  .wprp-card-hero-image { width: 120px; height: 120px; }
  .wprp-recipe-title { font-size: 1.3em; }
  .wprp-time-item { min-width: 70px; }
  .wprp-pills-row { gap: 6px; padding: 12px 16px; }
  .wprp-ingredients-nutrition-row { flex-direction: column; }
  .wprp-ingredients-nutrition-row .wprp-nutrition-label { flex: none; max-width: 100%; margin: 0; }
  .wprp-nutrition-label { max-width: 100%; }
  .wprp-roundup { grid-template-columns: 1fr; }

  .wprp-coloring-page-card { margin: 16px 0; }
  .wprp-cp-header { flex-direction: column; }
  .wprp-cp-header-image { width: 80px; height: 80px; }
  .wprp-cp-download-section { flex-direction: column; align-items: flex-start; }
}
