{"id":5507,"date":"2026-06-27T16:16:52","date_gmt":"2026-06-27T16:16:52","guid":{"rendered":"https:\/\/myaiagenthub.com\/?page_id=5507"},"modified":"2026-07-06T19:28:19","modified_gmt":"2026-07-06T19:28:19","slug":"womens-nutrition-meal-plan-agent-form","status":"publish","type":"page","link":"https:\/\/myaiagenthub.com\/es\/womens-nutrition-meal-plan-agent-form\/","title":{"rendered":"Women`s Nutrition &#038; Meal Plan Agent FORM"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"5507\" class=\"elementor elementor-5507\">\n\t\t\t\t<div class=\"elementor-element elementor-element-6fed76a e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-column-slider-no wpr-equal-height-no e-con e-parent\" data-id=\"6fed76a\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-e32b6ea elementor-widget__width-inherit elementor-widget elementor-widget-html\" data-id=\"e32b6ea\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t\t\r\n<!DOCTYPE html>\r\n<html lang=\"en\">\r\n<head>\r\n<meta charset=\"UTF-8\">\r\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\r\n<title>Women's Nutrition & Meal Plan Agent<\/title>\r\n<link href=\"https:\/\/fonts.googleapis.com\/css2?family=Sora:wght@300;400;600;700;800&family=DM+Mono:wght@400;500&display=swap\" rel=\"stylesheet\">\r\n<style>\r\n:root {\r\n  --navy: #0f1e36;\r\n  --deep: #1a1a6e;\r\n  --cyan: #38bdf8;\r\n  --cyan-dark: #0ea5e9;\r\n  --green: #22c55e;\r\n  --border: #e2e8f0;\r\n}\r\n* { box-sizing: border-box; margin: 0; padding: 0; }\r\nbody { font-family: 'Sora', sans-serif; background: #f0f6ff; min-height: 100vh; padding: 40px 16px; }\r\n.wrapper { width: 100%; max-width: 580px; margin: 0 auto; }\r\n.header { text-align: center; margin-bottom: 28px; }\r\n.header .emoji { font-size: 48px; display: block; margin-bottom: 10px; }\r\n.header h1 { font-size: 26px; font-weight: 800; color: var(--navy); margin-bottom: 6px; }\r\n.header p { font-size: 14px; color: #64748b; }\r\n\r\n.welcome-box {\r\n  background: #fff;\r\n  border: 2px solid var(--cyan);\r\n  border-radius: 14px;\r\n  padding: 16px 20px;\r\n  margin-bottom: 20px;\r\n  display: flex;\r\n  align-items: flex-start;\r\n  gap: 12px;\r\n}\r\n.welcome-box .w-icon { font-size: 26px; flex-shrink: 0; margin-top: 2px; }\r\n.welcome-box .w-name { font-size: 11px; font-weight: 700; color: var(--cyan-dark); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }\r\n.welcome-box .w-msg { font-size: 14px; color: #1e293b; line-height: 1.6; min-height: 20px; }\r\n\r\n.interview-panel { background: var(--navy); border-radius: 20px; padding: 24px; margin-bottom: 18px; text-align: center; }\r\n.q-label { font-size: 11px; font-weight: 600; letter-spacing: 2px; color: var(--cyan); text-transform: uppercase; margin-bottom: 10px; }\r\n.q-text { font-size: 16px; font-weight: 600; color: #fff; margin-bottom: 18px; line-height: 1.5; min-height: 50px; }\r\n.dots { display: flex; gap: 5px; justify-content: center; margin-bottom: 14px; }\r\n.dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.15); transition: all 0.3s; }\r\n.dot.done { background: var(--green); }\r\n.dot.active { background: var(--cyan); transform: scale(1.3); }\r\n\r\n.mic-btn { width: 76px; height: 76px; border-radius: 50%; background: linear-gradient(135deg, var(--cyan), var(--cyan-dark)); border: none; cursor: pointer; font-size: 32px; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; transition: transform 0.2s; }\r\n.mic-btn:hover { transform: scale(1.05); }\r\n.mic-btn.listening { background: linear-gradient(135deg, #ef4444, #dc2626); animation: micPulse 1s infinite; }\r\n.mic-btn.disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }\r\n@keyframes micPulse { 0% { box-shadow: 0 0 0 0 rgba(239,68,68,0.5); } 70% { box-shadow: 0 0 0 20px rgba(239,68,68,0); } 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); } }\r\n.mic-hint { font-size: 12px; color: #94a3b8; font-family: 'DM Mono', monospace; margin-bottom: 10px; }\r\n\r\n.inline-input {\r\n  display: none;\r\n  width: 100%;\r\n  padding: 12px 16px;\r\n  border: 2px solid var(--cyan);\r\n  border-radius: 10px;\r\n  font-size: 15px;\r\n  font-family: 'Sora', sans-serif;\r\n  color: #0f1e36 !important;\r\n  background: #ffffff !important;\r\n  -webkit-text-fill-color: #0f1e36 !important;\r\n  outline: none;\r\n  margin-bottom: 12px;\r\n  box-shadow: inset 0 0 0 100px #ffffff;\r\n}\r\n.inline-input:focus {\r\n  border-color: var(--cyan-dark);\r\n  background: #ffffff !important;\r\n  color: #0f1e36 !important;\r\n  -webkit-text-fill-color: #0f1e36 !important;\r\n  box-shadow: inset 0 0 0 100px #ffffff;\r\n}\r\n\r\n.option-buttons {\r\n  display: none;\r\n  flex-direction: column;\r\n  gap: 8px;\r\n  width: 100%;\r\n  margin-bottom: 12px;\r\n}\r\n.option-btn {\r\n  width: 100%;\r\n  padding: 12px 16px;\r\n  border: 2px solid rgba(56,189,248,0.4);\r\n  border-radius: 10px;\r\n  background: rgba(255,255,255,0.05);\r\n  color: #ffffff;\r\n  font-size: 14px;\r\n  font-family: 'Sora', sans-serif;\r\n  font-weight: 500;\r\n  cursor: pointer;\r\n  text-align: left;\r\n  transition: all 0.2s;\r\n}\r\n.option-btn:hover { background: rgba(56,189,248,0.15); border-color: var(--cyan); }\r\n.option-btn.selected { background: var(--cyan); color: #0f1e36; border-color: var(--cyan); font-weight: 700; }\r\n\r\n.transcript-box {\r\n  background: #ffffff !important;\r\n  border: 2px solid var(--cyan);\r\n  border-radius: 10px;\r\n  padding: 12px 14px;\r\n  font-size: 14px;\r\n  font-weight: 600;\r\n  color: #0f1e36 !important;\r\n  -webkit-text-fill-color: #0f1e36 !important;\r\n  font-family: 'Sora', sans-serif;\r\n  min-height: 52px;\r\n  text-align: left;\r\n  margin-bottom: 12px;\r\n  width: 100%;\r\n  resize: vertical;\r\n  display: none;\r\n  box-shadow: inset 0 0 0 100px #ffffff;\r\n}\r\n.transcript-box:focus {\r\n  outline: none;\r\n  border-color: var(--cyan-dark);\r\n  background: #ffffff !important;\r\n  color: #0f1e36 !important;\r\n  -webkit-text-fill-color: #0f1e36 !important;\r\n}\r\n\r\n.voice-nav { display: none; gap: 8px; justify-content: center; margin-top: 10px; }\r\n.voice-nav button { padding: 10px 22px; border-radius: 50px; border: none; font-size: 13px; font-family: 'Sora', sans-serif; font-weight: 600; cursor: pointer; }\r\n.btn-confirm { background: var(--green); color: white; }\r\n.btn-redo { background: rgba(255,255,255,0.1); color: #94a3b8; border: 1px solid rgba(255,255,255,0.2) !important; }\r\n\r\n.progress-wrap { margin-bottom: 18px; }\r\n.progress-label { font-size: 11px; color: #94a3b8; font-family: 'DM Mono', monospace; margin-bottom: 6px; }\r\n.progress-bar { background: #e2e8f0; border-radius: 99px; height: 6px; overflow: hidden; }\r\n.progress-fill { height: 100%; background: linear-gradient(90deg, var(--cyan), var(--deep)); border-radius: 99px; transition: width 0.4s; width: 0%; }\r\n\r\n.card { background: #fff; border-radius: 14px; padding: 20px; margin-bottom: 12px; border: 1.5px solid var(--border); box-shadow: 0 2px 10px rgba(15,30,54,0.05); transition: border-color 0.3s; }\r\n.card.active-field { border-color: var(--cyan); }\r\n.card.filled-field { border-color: var(--green); }\r\n.card label { display: block; font-size: 13px; font-weight: 600; color: var(--navy); margin-bottom: 8px; }\r\n.card label span { color: var(--cyan-dark); }\r\n.card input, .card textarea, .card select { width: 100%; padding: 11px 14px; border: 1.5px solid var(--border); border-radius: 10px; font-size: 14px; font-family: 'Sora', sans-serif; color: var(--navy); background: #f8fafc; outline: none; transition: border-color 0.2s; resize: vertical; }\r\n.card input:focus, .card textarea:focus, .card select:focus { border-color: var(--cyan); background: white; }\r\n.card input.filled, .card textarea.filled, .card select.filled { border-color: var(--green); background: #f0fdf4; }\r\n\r\n.submit-btn { width: 100%; background: linear-gradient(135deg, var(--deep), #2d2d9f); color: white; border: none; border-radius: 50px; padding: 18px; font-size: 16px; font-weight: 700; font-family: 'Sora', sans-serif; cursor: pointer; box-shadow: 0 4px 20px rgba(26,26,110,0.3); transition: transform 0.2s, box-shadow 0.2s; margin-top: 8px; }\r\n.submit-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(26,26,110,0.4); }\r\n.submit-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }\r\n#form-message { text-align: center; margin-top: 18px; font-size: 14px; font-weight: 500; line-height: 1.5; padding: 14px; border-radius: 10px; display: none; }\r\n#form-message.success { background: #f0fdf4; color: #166534; display: block; }\r\n#form-message.error { background: #fef2f2; color: #991b1b; display: block; }\r\n#form-message.loading { background: #eff6ff; color: #1d4ed8; display: block; }\r\n<\/style>\r\n<\/head>\r\n<body>\r\n<div class=\"wrapper\">\r\n  <div class=\"header\">\r\n    <span class=\"emoji\">\ud83e\udd57<\/span>\r\n    <h1>Women's Nutrition & Meal Plan Agent<\/h1>\r\n    <p>River will guide you through 9 quick questions. Just tap the mic and talk naturally \u2014 your personalized 7-day meal plan will be in your inbox within minutes.<\/p>\r\n  <\/div>\r\n\r\n  <div class=\"welcome-box\">\r\n    <div class=\"w-icon\">\ud83e\udd57<\/div>\r\n    <div>\r\n      <div class=\"w-name\">River \u2014 Women's Nutrition & Meal Plan Coach<\/div>\r\n      <div class=\"w-msg\" id=\"welcomeMsg\"><\/div>\r\n    <\/div>\r\n  <\/div>\r\n\r\n  <div class=\"interview-panel\">\r\n    <div class=\"q-label\">Question <span id=\"qNum\">1<\/span> of 9<\/div>\r\n    <div class=\"dots\" id=\"stepDots\"><\/div>\r\n    <div class=\"q-text\" id=\"questionText\">Getting ready...<\/div>\r\n    <button class=\"mic-btn disabled\" id=\"micBtn\" onclick=\"toggleMic()\">\ud83c\udfa4<\/button>\r\n    <div class=\"mic-hint\" id=\"micHint\">River is asking your first question...<\/div>\r\n    <input type=\"email\" class=\"inline-input\" id=\"inlineEmail\" placeholder=\"Type your email address here...\" autocomplete=\"off\" \/>\r\n    <input type=\"text\" class=\"inline-input\" id=\"inlineText\" placeholder=\"Type your answer here...\" autocomplete=\"off\" \/>\r\n    <div class=\"option-buttons\" id=\"optionButtons\"><\/div>\r\n    <textarea class=\"transcript-box\" id=\"transcriptBox\" rows=\"2\"><\/textarea>\r\n    <div class=\"voice-nav\" id=\"voiceNav\">\r\n      <button class=\"btn-confirm\" onclick=\"confirmAnswer()\">\u2705 Confirm<\/button>\r\n      <button class=\"btn-redo\" onclick=\"redoAnswer()\">\ud83d\udd04 Redo<\/button>\r\n    <\/div>\r\n  <\/div>\r\n\r\n  <div class=\"progress-wrap\">\r\n    <div class=\"progress-label\" id=\"progressLabel\">0 of 9 fields completed<\/div>\r\n    <div class=\"progress-bar\"><div class=\"progress-fill\" id=\"progressFill\"><\/div><\/div>\r\n  <\/div>\r\n\r\n  <div class=\"card\" id=\"card_full_name\"><label for=\"full_name\">Full Name <span>*<\/span><\/label><input type=\"text\" id=\"full_name\" placeholder=\"Your full name\" oninput=\"manualFill('full_name')\"><\/div>\r\n  <div class=\"card\" id=\"card_email\"><label for=\"email\">Email Address <span>*<\/span><\/label><input type=\"email\" id=\"email\" placeholder=\"your@email.com\" oninput=\"this.value=this.value.replace(\/\\s\/g,'').toLowerCase(); manualFill('email')\"><\/div>\r\n  <div class=\"card\" id=\"card_primary_goal\"><label for=\"primary_goal\">Primary Goal <span>*<\/span><\/label><input type=\"text\" id=\"primary_goal\" placeholder=\"Your primary goal\" oninput=\"manualFill('primary_goal')\"><\/div>\r\n  <div class=\"card\" id=\"card_health_considerations\"><label for=\"health_considerations\">Any Health Considerations <span>*<\/span><\/label><input type=\"text\" id=\"health_considerations\" placeholder=\"Health considerations\" oninput=\"manualFill('health_considerations')\"><\/div>\r\n  <div class=\"card\" id=\"card_food_preferences\"><label for=\"food_preferences\">Food Preferences <span>*<\/span><\/label><input type=\"text\" id=\"food_preferences\" placeholder=\"Food preferences\" oninput=\"manualFill('food_preferences')\"><\/div>\r\n  <div class=\"card\" id=\"card_foods_dislike\"><label for=\"foods_dislike\">Foods You Dislike or Won't Eat <span>*<\/span><\/label><textarea id=\"foods_dislike\" rows=\"3\" placeholder=\"List any foods you dislike or won't eat\" oninput=\"manualFill('foods_dislike')\"><\/textarea><\/div>\r\n  <div class=\"card\" id=\"card_meals_per_day\"><label for=\"meals_per_day\">How Many Meals Per Day <span>*<\/span><\/label><input type=\"text\" id=\"meals_per_day\" placeholder=\"Meals per day\" oninput=\"manualFill('meals_per_day')\"><\/div>\r\n  <div class=\"card\" id=\"card_activity_level\"><label for=\"activity_level\">Activity Level <span>*<\/span><\/label><input type=\"text\" id=\"activity_level\" placeholder=\"Activity level\" oninput=\"manualFill('activity_level')\"><\/div>\r\n  <div class=\"card\" id=\"card_tell_us_more\"><label for=\"tell_us_more\">Anything Else River Should Know? <span>*<\/span><\/label><textarea id=\"tell_us_more\" rows=\"4\" placeholder=\"Describe your situation, favorite foods, specific challenges, or anything else that will help River build your perfect meal plan\" oninput=\"manualFill('tell_us_more')\"><\/textarea><\/div>\r\n\r\n  <button class=\"submit-btn\" onclick=\"submitForm()\">\ud83e\udd57 Build My Meal Plan<\/button>\r\n  <div id=\"form-message\"><\/div>\r\n<\/div>\r\n\r\n<script>\r\nconst questions = [\r\n  { id:'full_name', text:\"What is your full name?\", audio:'https:\/\/myaiagenthub.com\/wp-content\/uploads\/2026\/06\/Q1-18.mp3', inputType:'voice', listenSec:180 },\r\n  { id:'email', text:\"Please type your email address in the box below.\", audio:'https:\/\/myaiagenthub.com\/wp-content\/uploads\/2026\/06\/Q2-21.mp3', inputType:'email', listenSec:0 },\r\n  { id:'primary_goal', text:\"What is your primary goal?\", audio:'https:\/\/myaiagenthub.com\/wp-content\/uploads\/2026\/06\/Q3-16.mp3', inputType:'select', options:['Lose weight','Eat healthier','More energy','Better overall wellness','All of the above'], listenSec:0 },\r\n  { id:'health_considerations', text:\"Do you have any health considerations River should know about?\", audio:'https:\/\/myaiagenthub.com\/wp-content\/uploads\/2026\/06\/Q4-20.mp3', inputType:'select', options:['PCOS','Perimenopause or menopause','Thyroid condition','Prediabetes','None','Prefer not to say'], listenSec:0 },\r\n  { id:'food_preferences', text:\"What are your food preferences?\", audio:'https:\/\/myaiagenthub.com\/wp-content\/uploads\/2026\/06\/Q5-13.mp3', inputType:'select', options:['No restrictions','Vegetarian','Vegan','Gluten-free'], listenSec:0 },\r\n  { id:'foods_dislike', text:\"What foods do you dislike or won't eat?\", audio:'https:\/\/myaiagenthub.com\/wp-content\/uploads\/2026\/06\/Q6-14.mp3', inputType:'voice', listenSec:180 },\r\n  { id:'meals_per_day', text:\"How many meals per day do you prefer?\", audio:'https:\/\/myaiagenthub.com\/wp-content\/uploads\/2026\/06\/Q7-13.mp3', inputType:'select', options:['2 meals','3 meals','3 meals plus snacks'], listenSec:0 },\r\n  { id:'activity_level', text:\"What is your activity level?\", audio:'https:\/\/myaiagenthub.com\/wp-content\/uploads\/2026\/06\/Q8-5.mp3', inputType:'select', options:['Sedentary','Lightly active','Active','Very active'], listenSec:0 },\r\n  { id:'tell_us_more', text:\"Is there anything else River should know to build your perfect meal plan?\", audio:'https:\/\/myaiagenthub.com\/wp-content\/uploads\/2026\/06\/Q9-2.mp3', inputType:'voice', listenSec:180 }\r\n];\r\n\r\nconst welcomeText = \"Hi! I'm River, your Women's Nutrition and Meal Plan Coach. I'm so glad you're here. I'm going to ask you nine quick questions about your health goals, food preferences, and lifestyle. Just tap the mic and speak naturally \u2014 your personalized 7-day meal plan will be delivered straight to your inbox within minutes. Let's get started!\";\r\nconst agentWelcome = new Audio('https:\/\/myaiagenthub.com\/wp-content\/uploads\/2026\/06\/Welocme.mp3');\r\nlet questionAudios = questions.map(q => new Audio(q.audio));\r\nlet currentQ = 0;\r\nlet isListening = false;\r\nlet filledFields = new Set();\r\nlet recognition = null;\r\nlet agentSpeaking = false;\r\nlet currentFinalText = '';\r\nlet listenTimer = null;\r\nlet selectedOption = '';\r\n\r\nconst SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition;\r\nif (SpeechRecognition) {\r\n  recognition = new SpeechRecognition();\r\n  recognition.continuous = true;\r\n  recognition.interimResults = true;\r\n  recognition.lang = 'en-US';\r\n  recognition.onresult = (e) => {\r\n    let interim = '';\r\n    for (let i = e.resultIndex; i < e.results.length; i++) {\r\n      if (e.results[i].isFinal) currentFinalText += e.results[i][0].transcript + ' ';\r\n      else interim = e.results[i][0].transcript;\r\n    }\r\n    const combined = (currentFinalText + interim).trim();\r\n    const box = document.getElementById('transcriptBox');\r\n    box.value = combined;\r\n    box.style.display = 'block';\r\n  };\r\n  recognition.onend = () => { if (isListening) { try { recognition.start(); } catch(e){} } };\r\n  recognition.onerror = () => stopListening();\r\n}\r\n\r\nfunction setAgentSpeaking(speaking) {\r\n  agentSpeaking = speaking;\r\n  const mic = document.getElementById('micBtn');\r\n  if (speaking) {\r\n    mic.classList.add('disabled');\r\n    document.getElementById('micHint').innerText = 'River is speaking \u2014 listen for your question...';\r\n  }\r\n}\r\n\r\nfunction buildDots() {\r\n  const c = document.getElementById('stepDots');\r\n  c.innerHTML = questions.map((_,i)=> `<div class=\"dot ${i===currentQ?'active':filledFields.has(questions[i].id)?'done':''}\"><\/div>`).join('');\r\n}\r\n\r\nfunction hideAllInputs() {\r\n  const emailEl = document.getElementById('inlineEmail');\r\n  const textEl = document.getElementById('inlineText');\r\n  const optionBtns = document.getElementById('optionButtons');\r\n  const transcriptEl = document.getElementById('transcriptBox');\r\n  emailEl.style.display = 'none'; emailEl.value = '';\r\n  textEl.style.display = 'none'; textEl.value = '';\r\n  optionBtns.style.display = 'none'; optionBtns.innerHTML = '';\r\n  transcriptEl.style.display = \"none\"; transcriptEl.value = \"\"; currentFinalText = \"\";\r\n  document.getElementById('voiceNav').style.display = 'none';\r\n  selectedOption = '';\r\n}\r\n\r\nfunction buildOptionButtons(options) {\r\n  const container = document.getElementById('optionButtons');\r\n  container.innerHTML = '';\r\n  selectedOption = '';\r\n  options.forEach(opt => {\r\n    const btn = document.createElement('button');\r\n    btn.className = 'option-btn';\r\n    btn.innerText = opt;\r\n    btn.onclick = () => {\r\n      document.querySelectorAll('.option-btn').forEach(b => b.classList.remove('selected'));\r\n      btn.classList.add('selected');\r\n      selectedOption = opt;\r\n    };\r\n    container.appendChild(btn);\r\n  });\r\n  container.style.display = 'flex';\r\n  document.getElementById('voiceNav').style.display = 'flex';\r\n}\r\n\r\nfunction showQuestion(index) {\r\n  currentQ = index;\r\n  const q = questions[index];\r\n  document.getElementById('qNum').innerText = index + 1;\r\n  document.getElementById('questionText').innerText = q.text;\r\n  currentFinalText = '';\r\n  hideAllInputs();\r\n  buildDots();\r\n\r\n  questions.forEach(qq => {\r\n    const card = document.getElementById('card_' + qq.id);\r\n    if (card) card.classList.remove('active-field');\r\n  });\r\n  const activeCard = document.getElementById('card_' + q.id);\r\n  if (activeCard) activeCard.classList.add('active-field');\r\n\r\n  setAgentSpeaking(true);\r\n  const audio = questionAudios[index];\r\n  audio.currentTime = 0;\r\n  audio.play().catch(()=>{});\r\n  audio.onended = () => {\r\n    setAgentSpeaking(false);\r\n    if (q.inputType === 'email') {\r\n      document.getElementById('micBtn').className = 'mic-btn disabled';\r\n      document.getElementById('micHint').innerText = '\ud83d\udc46 Type your email below then click Confirm.';\r\n      const emailEl = document.getElementById('inlineEmail');\r\n      emailEl.style.display = 'block';\r\n      emailEl.style.backgroundColor = '#ffffff';\r\n      emailEl.style.color = '#0f1e36';\r\n      emailEl.focus();\r\n      document.getElementById('voiceNav').style.display = 'flex';\r\n    } else if (q.inputType === 'select') {\r\n      document.getElementById('micBtn').className = 'mic-btn disabled';\r\n      document.getElementById('micHint').innerText = '\ud83d\udc46 Tap your answer below then click Confirm.';\r\n      buildOptionButtons(q.options);\r\n    } else {\r\n      document.getElementById('micBtn').className = 'mic-btn';\r\n      document.getElementById('micHint').innerText = 'Tap the mic and speak your answer \u2014 or type in the box below';\r\n      document.getElementById('transcriptBox').style.display = 'block';\r\n      document.getElementById('voiceNav').style.display = 'flex';\r\n    }\r\n  };\r\n}\r\n\r\nfunction toggleMic() {\r\n  if (agentSpeaking || document.getElementById('micBtn').classList.contains('disabled')) return;\r\n  if (!SpeechRecognition) {\r\n    document.getElementById('micHint').innerText = 'No mic available \u2014 type your answer in the box above.';\r\n    return;\r\n  }\r\n  isListening ? stopListening() : startListening();\r\n}\r\n\r\nfunction startListening() {\r\n  isListening = true;\r\n  currentFinalText = '';\r\n  const btn = document.getElementById('micBtn');\r\n  btn.classList.add('listening'); btn.innerText = '\u23f9';\r\n  document.getElementById('micHint').innerText = 'Listening... tap again when done';\r\n  const transcriptEl = document.getElementById('transcriptBox');\r\n  transcriptEl.style.display = 'block';\r\n  transcriptEl.style.backgroundColor = '#ffffff';\r\n  transcriptEl.style.color = '#0f1e36';\r\n  transcriptEl.value = '';\r\n  recognition.start();\r\n  clearTimeout(listenTimer);\r\n  listenTimer = setTimeout(() => stopListening(), questions[currentQ].listenSec * 1000);\r\n}\r\n\r\nfunction stopListening() {\r\n  isListening = false;\r\n  clearTimeout(listenTimer);\r\n  if (recognition) { recognition.onend = null; try { recognition.stop(); } catch(e){} }\r\n  const btn = document.getElementById('micBtn');\r\n  btn.classList.remove('listening'); btn.innerText = '\ud83c\udfa4';\r\n  const val = document.getElementById('transcriptBox').value.trim();\r\n  if (val) {\r\n    document.getElementById('micHint').innerText = 'Review your answer above \u2014 edit if needed.';\r\n    document.getElementById('voiceNav').style.display = 'flex';\r\n  } else {\r\n    document.getElementById('micHint').innerText = 'Tap the mic and speak your answer \u2014 or type in the box above';\r\n  }\r\n  if (SpeechRecognition) {\r\n    recognition = new SpeechRecognition();\r\n    recognition.continuous = true;\r\n    recognition.interimResults = true;\r\n    recognition.lang = 'en-US';\r\n    recognition.onresult = (e) => {\r\n      let interim = '';\r\n      for (let i = e.resultIndex; i < e.results.length; i++) {\r\n        if (e.results[i].isFinal) currentFinalText += e.results[i][0].transcript + ' ';\r\n        else interim = e.results[i][0].transcript;\r\n      }\r\n      document.getElementById('transcriptBox').value = (currentFinalText + interim).trim();\r\n    };\r\n    recognition.onend = () => { if (isListening) { try { recognition.start(); } catch(e){} } };\r\n    recognition.onerror = () => stopListening();\r\n  }\r\n}\r\n\r\nfunction confirmAnswer() {\r\n  const q = questions[currentQ];\r\n  let val = '';\r\n  if (q.inputType === 'email') {\r\n    val = document.getElementById('inlineEmail').value.trim().replace(\/\\s\/g,'').toLowerCase();\r\n  } else if (q.inputType === 'select') {\r\n    val = selectedOption;\r\n  } else {\r\n    val = document.getElementById('transcriptBox').value.trim();\r\n  }\r\n  if (!val) {\r\n    document.getElementById('micHint').innerText = 'Please answer the question first.';\r\n    return;\r\n  }\r\n  const field = document.getElementById(q.id);\r\n  if (field) { field.value = val; field.classList.add('filled'); }\r\n  markFilled(q.id);\r\n  hideAllInputs();\r\n  setTimeout(() => {\r\n    const next = currentQ + 1;\r\n    if (next < questions.length) showQuestion(next);\r\n    else allDone();\r\n  }, 600);\r\n}\r\n\r\nfunction redoAnswer() {\r\n  const q = questions[currentQ];\r\n  hideAllInputs();\r\n  currentFinalText = '';\r\n  if (q.inputType === 'email') {\r\n    const emailEl = document.getElementById('inlineEmail');\r\n    emailEl.style.display = 'block';\r\n    emailEl.style.backgroundColor = '#ffffff';\r\n    emailEl.style.color = '#0f1e36';\r\n    emailEl.value = '';\r\n    emailEl.focus();\r\n    document.getElementById('voiceNav').style.display = 'flex';\r\n    document.getElementById('micHint').innerText = '\ud83d\udc46 Type your email below then click Confirm.';\r\n  } else if (q.inputType === 'select') {\r\n    document.getElementById('micHint').innerText = '\ud83d\udc46 Tap your answer below then click Confirm.';\r\n    buildOptionButtons(q.options);\r\n  } else {\r\n    document.getElementById('transcriptBox').style.display = 'block';\r\n    document.getElementById('voiceNav').style.display = 'flex';\r\n    document.getElementById('micHint').innerText = 'Tap the mic and speak your answer \u2014 or type in the box above';\r\n  }\r\n}\r\n\r\nfunction allDone() {\r\n  document.getElementById('questionText').innerText = '\ud83c\udf89 All done! Review your answers below and hit the button to build your meal plan!';\r\n  document.getElementById('micBtn').style.display = 'none';\r\n  document.getElementById('micHint').innerText = '';\r\n  buildDots();\r\n}\r\n\r\nfunction markFilled(fieldId) {\r\n  filledFields.add(fieldId);\r\n  const card = document.getElementById('card_' + fieldId);\r\n  if (card) { card.classList.remove('active-field'); card.classList.add('filled-field'); }\r\n  updateProgress();\r\n}\r\n\r\nfunction manualFill(fieldId) {\r\n  const el = document.getElementById(fieldId);\r\n  if (el && el.value.trim()) markFilled(fieldId);\r\n}\r\n\r\nfunction updateProgress() {\r\n  const req = ['full_name','email','primary_goal','health_considerations','food_preferences','foods_dislike','meals_per_day','activity_level','tell_us_more'];\r\n  const filled = req.filter(id=>{ const el=document.getElementById(id); return el&&el.value.trim()!==''; }).length;\r\n  const pct = Math.round((filled\/req.length)*100);\r\n  document.getElementById('progressFill').style.width = pct+'%';\r\n  document.getElementById('progressLabel').innerText = `${filled} of 9 fields completed`;\r\n}\r\n\r\nasync function submitForm() {\r\n  const full_name = document.getElementById('full_name').value.trim();\r\n  const email = document.getElementById('email').value.trim();\r\n  const primary_goal = document.getElementById('primary_goal').value.trim();\r\n  const health_considerations = document.getElementById('health_considerations').value.trim();\r\n  const food_preferences = document.getElementById('food_preferences').value.trim();\r\n  const foods_dislike = document.getElementById('foods_dislike').value.trim();\r\n  const meals_per_day = document.getElementById('meals_per_day').value.trim();\r\n  const activity_level = document.getElementById('activity_level').value.trim();\r\n  const tell_us_more = document.getElementById('tell_us_more').value.trim();\r\n  const msg = document.getElementById('form-message');\r\n\r\n  if (!full_name || !email || !primary_goal || !health_considerations || !food_preferences || !foods_dislike || !meals_per_day || !activity_level || !tell_us_more) {\r\n    msg.className = 'error'; msg.innerText = '\u26a0\ufe0f Please fill in all required fields before submitting.'; msg.style.display = 'block'; return;\r\n  }\r\n\r\n  msg.className = 'loading'; msg.innerText = '\u23f3 Submitting your information... please wait.'; msg.style.display = 'block';\r\n  document.querySelector('.submit-btn').disabled = true;\r\n\r\n  try {\r\n    await fetch('https:\/\/api-bcbe5a.stack.tryrelevance.com\/latest\/agents\/trigger', {\r\n      method: 'POST',\r\n      headers: {\r\n        'Content-Type': 'application\/json',\r\n        'Authorization': 'b831f1f2-22e3-4067-b1f5-c431251db0cc:sk-OThlMmI2OTEtMjFlMi00NGMzLWFmNjMtNmMwMDE0YmE5N2Y2'\r\n      },\r\n      body: JSON.stringify({\r\n        message: { role: 'user', content: `Women's Nutrition & Meal Plan Agent Request:\\nFull Name: ${full_name}\\nEmail: ${email}\\nPrimary Goal: ${primary_goal}\\nHealth Considerations: ${health_considerations}\\nFood Preferences: ${food_preferences}\\nFoods Disliked: ${foods_dislike}\\nMeals Per Day: ${meals_per_day}\\nActivity Level: ${activity_level}\\nAdditional Info: ${tell_us_more}` },\r\n        agent_id: 'e94ec5ee-693a-4495-bf3f-37bd0d19715a'\r\n      })\r\n    });\r\n    msg.className = 'success'; msg.innerText = '\ud83e\udd57 Success! Your personalized meal plan is being built and will be delivered to your inbox shortly.';\r\n  } catch(err) {\r\n    msg.className = 'error'; msg.innerText = '\u274c Something went wrong. Please try again.'; msg.style.display = 'block';\r\n    document.querySelector('.submit-btn').disabled = false;\r\n  }\r\n}\r\n\r\nwindow.addEventListener('load', () => {\r\n  buildDots();\r\n  const welcomeMsg = document.getElementById('welcomeMsg');\r\n  const words = welcomeText.split(' ');\r\n  let wi = 0;\r\n  agentWelcome.play().catch(()=>{});\r\n  const wInt = setInterval(() => {\r\n    if (wi < words.length) { welcomeMsg.textContent += (wi===0?'':' ') + words[wi++]; }\r\n    else clearInterval(wInt);\r\n  }, 1000\/2.8);\r\n  agentWelcome.onended = () => {\r\n    clearInterval(wInt);\r\n    welcomeMsg.textContent = welcomeText;\r\n    setTimeout(() => showQuestion(0), 1500);\r\n  };\r\n  agentWelcome.onerror = () => {\r\n    welcomeMsg.textContent = welcomeText;\r\n    setTimeout(() => showQuestion(0), 1000);\r\n  };\r\n});\r\n<\/script>\r\n<\/body>\r\n<\/html>\r\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Women&#8217;s Nutrition &#038; Meal Plan Agent \ud83e\udd57 Women&#8217;s Nutrition &#038; Meal Plan Agent River will guide you through 9 quick questions. Just tap the mic and talk naturally \u2014 your personalized 7-day meal plan will be in your inbox within minutes. \ud83e\udd57 River \u2014 Women&#8217;s Nutrition &#038; Meal Plan Coach Question 1 of 9 Getting ready&#8230; \ud83c\udfa4 River is asking your first question&#8230; \u2705 Confirm \ud83d\udd04 Redo 0 of 9 fields completed Full Name * Email Address * Primary Goal * Any Health Considerations * Food Preferences * Foods You Dislike or Won&#8217;t Eat * How Many Meals Per Day * Activity Level * Anything Else River Should Know? * \ud83e\udd57 Build My Meal Plan<\/p>","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"elementor_header_footer","meta":{"footnotes":""},"class_list":["post-5507","page","type-page","status-publish","hentry"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/myaiagenthub.com\/es\/wp-json\/wp\/v2\/pages\/5507","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/myaiagenthub.com\/es\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/myaiagenthub.com\/es\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/myaiagenthub.com\/es\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/myaiagenthub.com\/es\/wp-json\/wp\/v2\/comments?post=5507"}],"version-history":[{"count":11,"href":"https:\/\/myaiagenthub.com\/es\/wp-json\/wp\/v2\/pages\/5507\/revisions"}],"predecessor-version":[{"id":5631,"href":"https:\/\/myaiagenthub.com\/es\/wp-json\/wp\/v2\/pages\/5507\/revisions\/5631"}],"wp:attachment":[{"href":"https:\/\/myaiagenthub.com\/es\/wp-json\/wp\/v2\/media?parent=5507"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}