
/* ============================================================
   MyFoodExplorer — recipe.css
   Recipe-specific styles
   ============================================================ */

/* ── Recipe Hero ── */
.mfe-recipe-hero {
  position: relative; overflow: hidden; border-radius: var(--mfe-radius-lg);
  margin-bottom: 1.5rem; background: var(--mfe-bg-alt);
}
.mfe-recipe-hero-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.mfe-recipe-hero-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,.7) 0%, transparent 70%);
  padding: 2.5rem 1.5rem 1.5rem;
}
.mfe-recipe-hero-cat {
  display: inline-block; background: var(--mfe-primary); color: #fff;
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  padding: .22rem .65rem; border-radius: 50px; margin-bottom: .5rem;
  text-decoration: none;
}
.mfe-recipe-hero-title {
  color: #fff; font-size: clamp(1.5rem, 3vw, 2.2rem);
  text-shadow: 0 2px 8px rgba(0,0,0,.4); line-height: 1.2;
}
.mfe-pin-image-overlay {
  position: absolute; top: 1rem; right: 1rem;
  background: #E60023; color: #fff;
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: none; cursor: pointer; transition: transform var(--mfe-transition), opacity var(--mfe-transition);
  opacity: 0;
}
.mfe-recipe-hero:hover .mfe-pin-image-overlay { opacity: 1; }
.mfe-pin-image-overlay:hover { transform: scale(1.1); }
.mfe-pin-image-overlay svg { width: 20px; height: 20px; }

/* ── Recipe Title Section ── */
.mfe-recipe-title-bar {
  display: flex; flex-wrap: wrap; gap: 1rem;
  align-items: flex-start; margin-bottom: 1rem;
}
.mfe-recipe-title-main {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem); flex: 1; min-width: 0;
}
.mfe-recipe-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.mfe-recipe-stars-row {
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
  margin-bottom: 1rem;
}
.mfe-recipe-stars-row .mfe-stars .star { width: 20px; height: 20px; }
.mfe-recipe-stars-row .mfe-rating-value { font-size: 1rem; }

/* ── Recipe Info Card ── */
.mfe-recipe-info-card {
  background: var(--mfe-bg-alt);
  border-radius: var(--mfe-radius);
  border: 1.5px solid var(--mfe-border-light);
  overflow: hidden; margin-block: 1.5rem;
  scroll-margin-top: 90px;
}
.mfe-recipe-info-card-header {
  background: var(--mfe-primary); color: #fff;
  padding: .85rem 1.25rem; display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: .5rem;
}
.mfe-recipe-card-title {
  font-family: var(--mfe-font-heading); font-size: 1.15rem; font-weight: 700; color: #fff;
}
.mfe-recipe-card-actions { display: flex; gap: .5rem; }
.mfe-recipe-card-actions .mfe-btn {
  background: rgba(255,255,255,.2); color: #fff; border-color: rgba(255,255,255,.3);
  font-size: .8rem; padding: .35rem .8rem;
}
.mfe-recipe-card-actions .mfe-btn:hover { background: rgba(255,255,255,.35); color: #fff; }
/* Pinterest action button — red on hover/active, matches brand */
.mfe-recipe-card-actions .mfe-btn-pinterest {
  display: inline-flex; align-items: center; gap: .35rem;
  background: rgba(230,0,35,.15);
  border-color: rgba(230,0,35,.4);
  color: #fff;
}
.mfe-recipe-card-actions .mfe-btn-pinterest:hover {
  background: #E60023;
  border-color: #E60023;
  color: #fff;
}
.mfe-recipe-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  padding: 1.1rem;
  gap: .6rem;
}
.mfe-info-item {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: var(--mfe-bg); padding: .75rem .5rem; border-radius: var(--mfe-radius-sm);
  border: 1px solid var(--mfe-border-light);
}
.mfe-info-icon { font-size: 1.4rem; margin-bottom: .2rem; }
.mfe-info-label { font-size: .68rem; font-weight: 700; color: var(--mfe-text-muted); text-transform: uppercase; letter-spacing: .05em; }
.mfe-info-value { font-size: .95rem; font-weight: 700; color: var(--mfe-text); margin-top: .15rem; }

/* ── Ingredients ── */
.mfe-ingredients-section { margin-block: 1.75rem; }
.mfe-ingredients-section-title {
  font-family: var(--mfe-font-heading); font-size: 1.3rem; font-weight: 700;
  margin-bottom: .75rem; display: flex; align-items: center; gap: .5rem;
}
.mfe-ingredient-group-title {
  font-size: .8rem; font-weight: 700; color: var(--mfe-primary);
  text-transform: uppercase; letter-spacing: .06em;
  margin: .75rem 0 .35rem; padding-bottom: .2rem;
  border-bottom: 1.5px solid var(--mfe-border-light);
}
.mfe-ingredient-list { list-style: none; padding: 0; margin: 0; }
.mfe-ingredient-item {
  display: flex; align-items: flex-start; gap: .65rem;
  padding: .55rem 0; border-bottom: 1px solid var(--mfe-border-light);
  cursor: pointer; transition: opacity var(--mfe-transition);
}
.mfe-ingredient-item:last-child { border-bottom: none; }
.mfe-ingredient-item.checked { opacity: .45; text-decoration: line-through; }
.mfe-ingredient-check {
  width: 20px; height: 20px; border-radius: 4px;
  border: 2px solid var(--mfe-border); flex-shrink: 0; margin-top: 2px;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--mfe-transition);
}
.mfe-ingredient-item.checked .mfe-ingredient-check {
  background: var(--mfe-primary); border-color: var(--mfe-primary);
}
.mfe-ingredient-check::after {
  content: '✓'; font-size: .7rem; color: #fff; display: none;
}
.mfe-ingredient-item.checked .mfe-ingredient-check::after { display: block; }
.mfe-ingredient-qty  { font-weight: 700; color: var(--mfe-primary); min-width: 70px; font-size: .9rem; }
.mfe-ingredient-name { font-size: .93rem; flex: 1; }
.mfe-ingredient-note { font-size: .8rem; color: var(--mfe-text-muted); display: block; margin-top: .1rem; }
.mfe-servings-adjuster {
  display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem;
  background: var(--mfe-bg-alt); padding: .65rem 1rem; border-radius: var(--mfe-radius-sm);
}
.mfe-servings-label { font-size: .85rem; font-weight: 600; color: var(--mfe-text-light); margin-right: auto; }
.mfe-servings-btn {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--mfe-bg); border: 1.5px solid var(--mfe-border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1.1rem; font-weight: 700; color: var(--mfe-text);
  transition: all var(--mfe-transition);
}
.mfe-servings-btn:hover { background: var(--mfe-primary); color: #fff; border-color: var(--mfe-primary); }
.mfe-servings-value { font-weight: 700; font-size: 1rem; min-width: 30px; text-align: center; }

/* ── Instructions ── */
.mfe-instructions-section { margin-block: 1.75rem; }
.mfe-steps-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 1.5rem; }
.mfe-step {
  display: flex; gap: 1.1rem; align-items: flex-start;
  padding: 1.2rem; background: var(--mfe-bg-card);
  border-radius: var(--mfe-radius); border: 1px solid var(--mfe-border-light);
  box-shadow: var(--mfe-shadow);
  transition: transform var(--mfe-transition);
}
.mfe-step:hover { transform: translateX(3px); }
.mfe-step-done { opacity: .55; }
.mfe-step-num-wrap {
  display: flex; flex-direction: column; align-items: center; flex-shrink: 0;
}
.mfe-step-num {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--mfe-primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .9rem; flex-shrink: 0;
  cursor: pointer; transition: background var(--mfe-transition);
}
.mfe-step-done .mfe-step-num { background: #10B981; }
.mfe-step-body { flex: 1; }
.mfe-step-title { font-weight: 700; font-size: 1rem; margin-bottom: .35rem; }
.mfe-step-desc  { font-size: .93rem; color: var(--mfe-text-light); line-height: 1.65; }
.mfe-step-image { width: 100%; max-width: 280px; border-radius: var(--mfe-radius-sm); margin-top: .75rem; }

/* ── Cook Mode ── */
.cook-mode-active body { background: #0D1117 !important; }
.cook-mode-active .mfe-step:not(.mfe-step-active) { opacity: .3; transition: opacity .3s; }
.cook-mode-active .mfe-step.mfe-step-active { opacity: 1; box-shadow: 0 0 0 3px var(--mfe-primary); }
#mfe-cook-mode-bar {
  display: none; position: sticky; top: 64px; z-index: 100;
  background: #0D1117; color: #fff; padding: .65rem 1.25rem;
  border-radius: var(--mfe-radius-sm); margin-bottom: 1rem;
  align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.cook-mode-active #mfe-cook-mode-bar { display: flex; }
#mfe-cook-mode-bar .mfe-cook-label { font-weight: 700; font-size: .9rem; }
#mfe-cook-prev, #mfe-cook-next {
  background: var(--mfe-primary); color: #fff; border: none; border-radius: 6px;
  padding: .4rem .9rem; cursor: pointer; font-weight: 700; font-size: .85rem;
}

/* ── Tips ── */
.mfe-tips-section { margin-block: 1.75rem; }
.mfe-tips-grid { display: flex; flex-direction: column; gap: .75rem; }
.mfe-tip-card {
  display: flex; gap: .85rem; align-items: flex-start;
  background: linear-gradient(135deg, #FFF8F0 0%, #FFF3E8 100%);
  border-radius: var(--mfe-radius-sm); padding: 1rem 1.1rem;
  border-left: 3px solid var(--mfe-primary);
}
.mfe-tip-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: .1rem; }
.mfe-tip-content {}
.mfe-tip-title { font-weight: 700; font-size: .93rem; margin-bottom: .2rem; }
.mfe-tip-text  { font-size: .88rem; color: var(--mfe-text-light); }

/* ── Notes ── */
.mfe-notes-section {
  background: var(--mfe-bg-alt); border-radius: var(--mfe-radius);
  padding: 1.25rem 1.4rem; margin-block: 1.75rem;
  border: 1px dashed var(--mfe-border);
}
.mfe-notes-title { font-weight: 700; font-size: 1rem; margin-bottom: .5rem; display: flex; align-items: center; gap: .4rem; }
.mfe-notes-content { font-size: .92rem; color: var(--mfe-text-light); }

/* ── Nutrition ── */
.mfe-nutrition-section { margin-block: 1.75rem; }
.mfe-nutrition-card {
  background: var(--mfe-bg-card); border-radius: var(--mfe-radius);
  border: 1.5px solid var(--mfe-border); overflow: hidden;
}
.mfe-nutrition-header {
  background: var(--mfe-text); color: #fff; padding: .85rem 1.25rem;
}
.mfe-nutrition-header h3 { color: #fff; font-size: 1.1rem; margin: 0; }
.mfe-nutrition-header small { font-size: .78rem; opacity: .7; }
.mfe-nutrition-calories {
  padding: 1rem 1.25rem; border-bottom: 6px solid var(--mfe-text);
  display: flex; align-items: baseline; gap: .3rem;
}
.mfe-cal-num { font-size: 2.2rem; font-weight: 800; color: var(--mfe-text); }
.mfe-cal-label { font-size: .85rem; color: var(--mfe-text-light); }
.mfe-nutrition-grid { display: grid; grid-template-columns: 1fr 1fr; }
.mfe-nutrition-item {
  padding: .6rem 1rem; border-bottom: 1px solid var(--mfe-border-light);
  display: flex; justify-content: space-between; align-items: center; gap: .5rem;
  font-size: .88rem;
}
.mfe-nutrition-item:nth-child(even) { border-left: 1px solid var(--mfe-border-light); }
.mfe-nutr-label { color: var(--mfe-text-light); }
.mfe-nutr-val   { font-weight: 700; color: var(--mfe-text); }

/* ── FAQ ── */
.mfe-faq-section { margin-block: 1.75rem; }
.mfe-faq-list { display: flex; flex-direction: column; gap: .5rem; }
.mfe-faq-item {
  border: 1.5px solid var(--mfe-border-light); border-radius: var(--mfe-radius-sm);
  overflow: hidden; transition: border-color var(--mfe-transition);
}
.mfe-faq-item.open { border-color: var(--mfe-primary); }
.mfe-faq-btn {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  gap: .75rem; padding: .9rem 1.1rem; background: var(--mfe-bg-alt);
  border: none; cursor: pointer; text-align: left; font-family: var(--mfe-font-body);
}
.mfe-faq-q { font-weight: 700; font-size: .93rem; color: var(--mfe-text); }
.mfe-faq-icon { width: 20px; height: 20px; flex-shrink: 0; color: var(--mfe-primary); transition: transform .25s ease; }
.mfe-faq-item.open .mfe-faq-icon { transform: rotate(45deg); }
.mfe-faq-answer { display: none; padding: .85rem 1.1rem; font-size: .9rem; color: var(--mfe-text-light); border-top: 1px solid var(--mfe-border-light); }
.mfe-faq-item.open .mfe-faq-answer { display: block; }

/* ── Video embed ── */
.mfe-video-wrap { position: relative; padding-top: 56.25%; margin-block: 1.5rem; border-radius: var(--mfe-radius); overflow: hidden; }
.mfe-video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }

/* ── Table of Contents ── */
#mfe-toc {
  background: var(--mfe-bg-alt); border-radius: var(--mfe-radius);
  padding: 1.1rem 1.25rem; margin-block: 1.5rem;
  border: 1px solid var(--mfe-border-light);
}
#mfe-toc-title { font-weight: 700; font-size: .95rem; margin-bottom: .6rem; cursor: pointer; display: flex; align-items: center; justify-content: space-between; }
#mfe-toc ol { margin: 0; padding-left: 1.25rem; font-size: .88rem; }
#mfe-toc ol li { padding: .2rem 0; }
#mfe-toc ol li a { color: var(--mfe-text-light); font-weight: 500; }
#mfe-toc ol li a:hover { color: var(--mfe-primary); }

/* ── Related Recipes ── */
.mfe-related { margin-top: 2.5rem; }
/* FIX: start with 1-col on mobile, expand via breakpoints below */
.mfe-related-grid { grid-template-columns: 1fr; }

/* ── Recipe Hero — ensure no overflow ── */
.mfe-recipe-hero { max-width: 100%; overflow: hidden; }
.mfe-recipe-hero-img {
  width: 100%;
  /* CLS FIX: reserve space before image loads */
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

/* Touch devices: pin button always visible */
@media (hover: none) {
  .mfe-pin-image-overlay { opacity: 1 !important; }
}

/* ── Ingredient row ── */
.mfe-ingredient-item { flex-wrap: nowrap; align-items: flex-start; }
.mfe-ingredient-qty  { min-width: 60px; max-width: 80px; }
.mfe-ingredient-name { overflow-wrap: break-word; word-break: break-word; }

/* ── Step cards ── */
.mfe-step { flex-wrap: nowrap; }

/* ── FAQ ── */
.mfe-faq-btn { min-height: 48px; }
.mfe-faq-q { overflow-wrap: break-word; word-break: break-word; }

/* ── TOC ── */
#mfe-toc { overflow: hidden; }
#mfe-toc ol { word-break: break-word; }

/* ── Recipe title bar — column on mobile ── */
.mfe-recipe-title-bar { flex-direction: column; align-items: flex-start; }

/* ── Recipe actions ── */
.mfe-recipe-actions { flex-wrap: wrap; }

/* ── Recipe info card actions ── */
.mfe-recipe-info-card-header { flex-wrap: wrap; }
.mfe-recipe-card-actions { flex-wrap: wrap; }

/* ── Video embed (responsive) ── */
.mfe-video-wrap {
  position: relative;
  padding-top: 56.25%;
  margin-block: 1.5rem;
  border-radius: var(--mfe-radius);
  overflow: hidden;
  background: #000;
}
.mfe-video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }

/* ── Recipe info grid base (2-col minimum) ── */
.mfe-recipe-info-grid { grid-template-columns: repeat(2, 1fr); }

/* ============================================================
   Responsive breakpoints (consolidated — no duplicates)
   ============================================================ */

/* < 360px: very small phones */
@media (max-width: 359px) {
  .mfe-nutrition-grid { grid-template-columns: 1fr; }
  .mfe-nutrition-item:nth-child(even) { border-left: none; }
}

/* < 480px: small phones */
@media (max-width: 479px) {
  .mfe-step { flex-direction: row; gap: .75rem; padding: .9rem; }
  .mfe-step-image { max-width: 100%; }
  .mfe-servings-adjuster { flex-wrap: wrap; gap: .5rem; }
}

/* 480px+ */
@media (min-width: 480px) {
  .mfe-recipe-info-grid { grid-template-columns: repeat(3, 1fr); }
  .mfe-related-grid { grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); }
}

/* 540px+ */
@media (min-width: 540px) {
  .mfe-recipe-title-bar { flex-direction: row; align-items: flex-start; }
}

/* 640px+ */
@media (min-width: 640px) {
  .mfe-recipe-info-grid { grid-template-columns: repeat(4, 1fr); }
  .mfe-recipe-hero-img { aspect-ratio: 16/9; }
}

/* 768px+ */
@media (min-width: 768px) {
  .mfe-recipe-info-grid { grid-template-columns: repeat(5, 1fr); }
  .mfe-step { gap: 1.5rem; }
  .mfe-recipe-title-bar { flex-direction: row; }
}

/* ============================================================
   MOBILE HERO UX OPTIMISATION (v3.3)
   All rules below are mobile-ONLY (max-width: 599px).
   Desktop layout is completely untouched.
   ============================================================ */

/* ── Action buttons bar ─────────────────────────────────────── */
.mfe-recipe-actions-bar {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  align-items: center;
}
/* Secondary group: always inline-flex, collapses to full-width row on mobile */
.mfe-btn-secondary-group {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
}

@media (max-width: 599px) {

  /* ── Hero image: taller on mobile for visual impact ──────── */
  /* Portrait-leaning ratio shows more food photography.
     The explicit aspect-ratio reserves space → no CLS.       */
  .mfe-recipe-hero-img {
    aspect-ratio: 4/3;
  }

  /* ── Hero overlay: tighter padding so image breathes ─────── */
  .mfe-recipe-hero-overlay {
    padding: 2rem 1rem 1rem;
    /* Limit gradient height so it doesn't swallow the image */
    background: linear-gradient(to top, rgba(0,0,0,.75) 0%, rgba(0,0,0,.1) 60%, transparent 100%);
  }

  /* ── Hero title: fluid clamp, never too large ────────────── */
  /* clamp(min, preferred, max):
       min  = 1.2rem  (~19px) — tiny phones, long titles
       pref = 5.5vw   — scales with viewport width
       max  = 1.5rem  (~24px) — upper limit on mobile
     This means a 50-char title stays comfortably ≤ 2-3 lines
     while a short title like "Easy Pancakes" reads at ≈24px.  */
  .mfe-recipe-hero-title {
    font-size: clamp(1.2rem, 5.5vw, 1.5rem);
    line-height: 1.25;
    /* Prevent very long words from overflowing the overlay */
    overflow-wrap: break-word;
    word-break: break-word;
    /* Reserve visible area: clamp height to ~3 lines max */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
  }

  /* ── Below-hero title (no-category fallback) ─────────────── */
  .mfe-recipe-title-main {
    font-size: clamp(1.25rem, 5.5vw, 1.6rem);
    line-height: 1.25;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  /* ── Rating row: tighter on mobile ───────────────────────── */
  .mfe-recipe-stars-row {
    margin-bottom: .65rem;
    gap: .5rem;
  }
  .mfe-recipe-stars-row .mfe-stars .star { width: 17px; height: 17px; }

  /* ── Action buttons: stack primary prominently ───────────── */
  .mfe-recipe-actions-bar {
    flex-direction: column;
    align-items: stretch;
    gap: .45rem;
    margin-bottom: 1rem;
  }

  /* Jump To Recipe = primary action, full-width on mobile */
  .mfe-recipe-actions-bar .mfe-btn-jump {
    width: 100%;
    justify-content: center;
    font-size: .95rem;
    min-height: 48px;
  }

  /* Secondary actions row: sit side-by-side under the primary */
  .mfe-recipe-actions-bar .mfe-btn-secondary-group {
    display: flex;
    gap: .4rem;
    flex-wrap: nowrap;
  }
  .mfe-recipe-actions-bar .mfe-btn-secondary-group .mfe-btn {
    flex: 1;
    justify-content: center;
    min-height: 44px;
    font-size: .8rem;
    padding: .4rem .6rem;
  }

  /* ── Excerpt / intro text ─────────────────────────────────── */
  .entry-excerpt {
    font-size: .93rem !important;
    margin-bottom: 1rem !important;
    line-height: 1.65 !important;
  }

  /* ── Breadcrumbs: compact on mobile ──────────────────────── */
  .mfe-breadcrumbs { padding: .45rem 0; font-size: .78rem; }

  /* ── Visual rhythm: hero → title bar spacing ─────────────── */
  .mfe-recipe-hero { margin-bottom: 1rem; }
  .mfe-recipe-title-bar { margin-bottom: .6rem; }

}

/* Very small phones: further tighten the hero title */
@media (max-width: 359px) {
  .mfe-recipe-hero-title {
    font-size: clamp(1.1rem, 5vw, 1.3rem);
    -webkit-line-clamp: 2;
  }
  .mfe-recipe-title-main {
    font-size: clamp(1.1rem, 5vw, 1.35rem);
  }
}

/* ════════════════════════════════════════════════════════════════════════
   Custom Recipe Review System
   Replaces the default WP comment box on recipes — plain text only,
   no links/HTML/scripts. See inc/reviews.php and comments.php.
   ════════════════════════════════════════════════════════════════════════ */

.mfe-reviews-area { margin-top: 2.5rem; }
.mfe-reviews-empty {
  color: var(--mfe-text-light); font-style: italic; margin-bottom: 1.5rem;
}

/* Status notice after submitting (no-JS fallback + JS error states) */
.mfe-review-notice {
  border-radius: var(--mfe-radius-sm); padding: .65rem 1rem; margin-bottom: 1.25rem;
  font-size: .9rem; font-weight: 600;
}
.mfe-review-notice-ok  { background: #D1FAE5; color: #065F46; }
.mfe-review-notice-err { background: #FEE2E2; color: #991B1B; }

/* Review list */
.mfe-reviews-list { list-style: none; padding: 0; margin: 0 0 2rem; }
.mfe-review-item {
  padding: 1rem 0; border-bottom: 1px solid var(--mfe-border-light);
}
.mfe-review-item:first-child { padding-top: 0; }
.mfe-review-head {
  display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; margin-bottom: .4rem;
}
.mfe-review-stars { color: #FBBF24; font-size: .95rem; letter-spacing: 1px; }
.mfe-review-author { font-weight: 700; color: var(--mfe-text); font-size: .9rem; }
.mfe-review-date { color: var(--mfe-text-muted); font-size: .8rem; }
.mfe-review-text {
  color: var(--mfe-text); line-height: 1.6; font-size: .92rem; margin: 0;
  /* MOBILE FIX: long reviews wrap instead of overflowing */
  overflow-wrap: break-word; word-break: break-word;
}

/* Review submission form */
.mfe-review-form {
  background: var(--mfe-bg-alt); border: 1px solid var(--mfe-border-light);
  border-radius: var(--mfe-radius); padding: 1.5rem;
}
.mfe-review-form-title { font-size: 1.05rem; font-weight: 700; margin: 0 0 1rem; }
.mfe-review-field { margin-bottom: 1rem; }
.mfe-review-field label {
  display: block; font-weight: 600; font-size: .85rem; margin-bottom: .35rem; color: var(--mfe-text);
}
.mfe-review-field input[type=text],
.mfe-review-field input[type=email],
.mfe-review-field textarea {
  width: 100%; padding: .65rem 1rem; border: 1.5px solid var(--mfe-border);
  border-radius: var(--mfe-radius-sm); font-family: var(--mfe-font-body);
  outline: none; transition: border-color var(--mfe-transition); resize: vertical;
  /* MOBILE FIX: prevent iOS zoom */
  font-size: max(.93rem, 16px); background: #fff;
}
.mfe-review-field input[type=text]:focus,
.mfe-review-field input[type=email]:focus,
.mfe-review-field textarea:focus { border-color: var(--mfe-primary); }
.mfe-review-submit { margin-top: .25rem; }

/* Honeypot — CSS backup; inline style on the element already hides it */
.mfe-review-hp { display: none !important; }

/* "Submit a Review" CTA — placed between Instructions and Tips so users can
   jump straight to the review form without scrolling the whole article.
   Reuses the existing .mfe-btn / .mfe-btn-primary styles for consistency. */
.mfe-review-cta {
  display: flex; justify-content: center;
  margin: 1.75rem 0;
}
.mfe-review-cta-btn {
  display: inline-flex; align-items: center; gap: .65rem;
  padding: .85rem 1.6rem; border-radius: 50px;
  text-decoration: none; line-height: 1.2;
  box-shadow: 0 4px 14px rgba(255,107,53,.28);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.mfe-review-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,107,53,.38);
  text-decoration: none;
}
.mfe-review-cta-btn:active { transform: translateY(0); }
.mfe-review-cta-btn svg { width: 22px; height: 22px; flex-shrink: 0; fill: #fff; stroke: #fff; }
.mfe-review-cta-btn span { display: flex; flex-direction: column; align-items: flex-start; }
.mfe-review-cta-btn span small {
  font-size: .76rem; font-weight: 400; opacity: .9; margin-top: .15rem;
}
@media (max-width: 480px) {
  .mfe-review-cta { margin: 1.25rem 0; }
  .mfe-review-cta-btn { padding: .75rem 1.3rem; }
  .mfe-review-cta-btn span small { display: none; }
}

/* CSS-only star rating input (no JS required) */
.mfe-review-rating-field { border: 0; padding: 0; margin: 0 0 1rem; }
.mfe-review-rating-field legend {
  font-weight: 600; font-size: .85rem; margin-bottom: .35rem; color: var(--mfe-text); padding: 0;
}
.mfe-star-rating-input {
  display: inline-flex; flex-direction: row-reverse; gap: .15rem; width: max-content;
}
.mfe-star-rating-input input {
  position: absolute; opacity: 0; width: 1px; height: 1px;
}
.mfe-star-rating-input label {
  font-size: 1.9rem; line-height: 1; color: var(--mfe-border);
  cursor: pointer; transition: color .15s ease; user-select: none;
  /* MOBILE FIX: comfortable tap target */
  padding: .1rem;
}
.mfe-star-rating-input label:hover,
.mfe-star-rating-input label:hover ~ label,
.mfe-star-rating-input input:checked ~ label {
  color: #FBBF24;
}
.mfe-star-rating-input input:focus-visible ~ label {
  outline: 2px solid var(--mfe-primary); outline-offset: 2px; border-radius: 4px;
}

@media (max-width: 480px) {
  .mfe-review-form { padding: 1.1rem; }
  .mfe-star-rating-input label { font-size: 1.7rem; }
}
