{"id":86,"date":"2026-03-06T15:10:49","date_gmt":"2026-03-06T23:10:49","guid":{"rendered":"https:\/\/gogoit.com\/video\/?page_id=86"},"modified":"2026-03-06T15:14:24","modified_gmt":"2026-03-06T23:14:24","slug":"free-sample","status":"publish","type":"page","link":"https:\/\/gogoit.com\/video\/free-sample\/","title":{"rendered":"free-sample"},"content":{"rendered":"\n<!DOCTYPE html>\n<html lang=\"en-US\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>Get Your Free Sample Video<\/title>\n    <link rel=\"preconnect\" href=\"https:\/\/fonts.googleapis.com\">\n    <link rel=\"preconnect\" href=\"https:\/\/fonts.gstatic.com\" crossorigin>\n    <link href=\"https:\/\/fonts.googleapis.com\/css2?family=Inter:wght@300;400;500;600;700&display=swap\" rel=\"stylesheet\">\n    <link rel=\"stylesheet\" href=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/cropperjs\/1.6.1\/cropper.min.css\">\n    <style>\n    :root {\n        --gvei-primary: #6366F1;\n        --gvei-primary-soft: rgba(99, 102, 241, 0.08);\n        --gvei-accent: #8B5CF6;\n        --gvei-text: #1a1b2e;\n        --gvei-text-muted: #6b7280;\n        --gvei-text-soft: #9ca3af;\n        --gvei-bg: #fafbfc;\n        --gvei-card: #ffffff;\n        --gvei-success: #10B981;\n        --gvei-success-soft: rgba(16, 185, 129, 0.1);\n        --gvei-error: #EF4444;\n        --gvei-shadow-soft: 0 2px 8px rgba(0,0,0,0.04), 0 4px 24px rgba(0,0,0,0.06);\n        --gvei-shadow-card: 0 1px 3px rgba(0,0,0,0.02), 0 8px 40px rgba(0,0,0,0.04);\n        --gvei-radius: 16px;\n        --gvei-radius-input: 12px;\n        --gvei-font: 'Inter', system-ui, -apple-system, sans-serif;\n    }\n\n    * { box-sizing: border-box; margin: 0; padding: 0; }\n    body { font-family: var(--gvei-font); background: linear-gradient(180deg, #f0f2f5 0%, #fafbfc 100%); min-height: 100vh; color: var(--gvei-text); line-height: 1.6; }\n\n    .gvei-wizard { width: 100%; max-width: 540px !important; margin: 0 auto !important; padding: 16px 24px 60px; }\n\n    .gvei-brand { text-align: center; margin-bottom: 28px; }\n    .gvei-step-label { display: inline-block; background: var(--gvei-primary-soft); color: var(--gvei-primary); padding: 4px 14px; border-radius: 20px; font-size: 13px; font-weight: 600; letter-spacing: 0.3px; margin-bottom: 12px; }\n    .gvei-brand-tagline { font-size: 24px; font-weight: 700; color: var(--gvei-text); line-height: 1.3; margin-bottom: 6px; }\n    .gvei-brand-subtitle { color: var(--gvei-text-muted); font-size: 15px; line-height: 1.5; max-width: 420px; margin: 0 auto; }\n\n    .gvei-steps { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }\n    .gvei-step-dot { width: 32px; height: 4px; border-radius: 2px; background: #e2e4e8; transition: all 0.4s ease; }\n    .gvei-step-dot.active { background: var(--gvei-primary); width: 48px; }\n    .gvei-step-dot.completed { background: var(--gvei-success); }\n\n    .gvei-card { background: var(--gvei-card); border-radius: var(--gvei-radius); box-shadow: var(--gvei-shadow-card); padding: 32px 28px; }\n    @media (max-width: 480px) { .gvei-card { padding: 24px 18px; } }\n\n    .gvei-step-content { display: none; }\n    .gvei-step-content.active { display: block; animation: fadeIn 0.3s ease; }\n    @keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }\n\n    .gvei-step-header { text-align: center; margin-bottom: 24px; }\n    .gvei-step-icon { font-size: 32px; margin-bottom: 8px; }\n    .gvei-step-title { font-size: 22px; font-weight: 700; color: var(--gvei-text); margin-bottom: 6px; }\n    .gvei-step-desc { color: var(--gvei-text-muted); font-size: 15px; max-width: 400px; margin: 0 auto; }\n\n    .gvei-form-group { margin-bottom: 20px; }\n    .gvei-label { display: block; font-size: 14px; font-weight: 600; color: var(--gvei-text); margin-bottom: 6px; }\n    .gvei-input { width: 100%; padding: 13px 16px; border: 1.5px solid #e2e4e8; border-radius: var(--gvei-radius-input); font-size: 16px; font-family: var(--gvei-font); transition: border-color 0.2s; background: #fff; outline: none; }\n    .gvei-input:focus { border-color: var(--gvei-primary); box-shadow: 0 0 0 3px var(--gvei-primary-soft); }\n    .gvei-helper { font-size: 13px; color: #6b7280; margin-top: 5px; line-height: 1.5; }\n\n    .gvei-photo-upload { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 24px; background: linear-gradient(135deg, rgba(99,102,241,0.03) 0%, rgba(139,92,246,0.03) 100%); border-radius: var(--gvei-radius); border: 2px dashed rgba(99,102,241,0.2); cursor: pointer; transition: all 0.25s ease; }\n    .gvei-photo-upload:hover { border-color: var(--gvei-primary); background: var(--gvei-primary-soft); }\n    .gvei-photo-upload .gvei-photo-preview { width: 110px; height: 110px; border-radius: 50%; background: white; box-shadow: var(--gvei-shadow-soft); display: flex; align-items: center; justify-content: center; overflow: hidden; }\n    .gvei-photo-upload .gvei-photo-preview img { width: 100%; height: 100%; object-fit: cover; }\n    .gvei-photo-upload-text { font-size: 14px; color: var(--gvei-text-muted); text-align: center; }\n    .gvei-photo-upload-text strong { color: var(--gvei-primary); }\n\n    .gvei-nav { display: flex; gap: 12px; margin-top: 28px; }\n    .gvei-btn { flex: 1; padding: 15px 20px; border-radius: var(--gvei-radius-input); font-size: 16px; font-weight: 600; font-family: var(--gvei-font); cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 8px; border: none; }\n    .gvei-btn-primary { background: var(--gvei-primary); color: white; }\n    .gvei-btn-primary:hover { background: #5558e6; transform: translateY(-1px); }\n    .gvei-btn-secondary { background: #f3f4f6; color: #4b5563; border: 1px solid #e2e4e8; }\n    .gvei-btn-secondary:hover { background: #e5e7eb; color: #1f2937; }\n\n    .gvei-voice-mode-option { display: flex; gap: 14px; padding: 16px; border: 2px solid #e2e4e8; border-radius: 14px; cursor: pointer; transition: all 0.2s; margin-bottom: 12px; background: #fff; align-items: center; }\n    .gvei-voice-mode-option:hover { border-color: #c7c9cd; }\n    .gvei-voice-mode-option.selected { border-color: var(--gvei-primary); background: var(--gvei-primary-soft); }\n    .gvei-voice-mode-icon { font-size: 24px; flex-shrink: 0; }\n    .gvei-voice-mode-title { font-weight: 600; font-size: 15px; margin-bottom: 2px; }\n    .gvei-voice-mode-desc { font-size: 13px; color: var(--gvei-text-muted); }\n\n    .gvei-voice-detail { display: none; padding: 16px; background: #f9fafb; border-radius: 12px; margin-top: 12px; }\n    .gvei-voice-detail.active { display: block; animation: fadeIn 0.3s ease; }\n\n    .gvei-voice-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: none; border-radius: var(--gvei-radius); cursor: pointer; background: #f5f7fa; transition: all 0.2s; margin-bottom: 6px; }\n    .gvei-voice-card:hover { background: #eef0f4; }\n    .gvei-voice-card.selected { background: linear-gradient(135deg, rgba(99,102,241,0.1) 0%, rgba(139,92,246,0.08) 100%); box-shadow: inset 0 0 0 2px var(--gvei-primary); }\n    .gvei-voice-card .gvei-voice-name { font-weight: 600; font-size: 14px; flex: 1; }\n    .gvei-voice-card .gvei-voice-desc { font-size: 11px; color: var(--gvei-text-muted); }\n    .gvei-voice-play { width: 40px; height: 40px; min-width: 40px; max-width: 40px; min-height: 40px; max-height: 40px; border-radius: 50% !important; background: var(--gvei-primary); color: white; border: none; outline: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 13px; box-shadow: 0 2px 8px rgba(99,102,241,0.3); transition: all 0.2s ease; flex-shrink: 0; flex-grow: 0; padding: 0; margin: 0; -webkit-appearance: none; appearance: none; line-height: 1; position: relative; overflow: hidden; }\n    .gvei-voice-play .play-icon { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-size: 13px; }\n    .gvei-voice-play:hover { transform: scale(1.08); box-shadow: 0 4px 12px rgba(99,102,241,0.4); }\n    .gvei-voice-play:focus { outline: none; box-shadow: 0 0 0 3px rgba(99,102,241,0.3); }\n    .gvei-voice-play:active { transform: scale(0.95); }\n    .gvei-voice-play.playing { background: #10b981; box-shadow: 0 2px 8px rgba(16,185,129,0.3); }\n\n    .gvei-zip-primary { position: relative; }\n    .gvei-zip-primary .gvei-badge-primary { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: var(--gvei-primary); color: #fff; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 6px; letter-spacing: 0.5px; }\n    .gvei-zip-secondary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }\n    .gvei-add-zip-btn { background: none; border: 1px dashed #d1d5db; border-radius: 10px; padding: 12px; width: 100%; margin-top: 8px; font-size: 14px; color: var(--gvei-text-muted); cursor: pointer; font-family: var(--gvei-font); transition: all 0.2s ease; }\n    .gvei-add-zip-btn:hover { border-color: var(--gvei-primary); background: var(--gvei-primary); color: white; border-style: solid; }\n\n    .gvei-success-screen { text-align: center; padding: 20px 0; }\n    .gvei-success-screen .gvei-success-icon { font-size: 48px; margin-bottom: 16px; }\n    .gvei-success-screen h2 { font-size: 24px; font-weight: 700; margin-bottom: 10px; }\n    .gvei-success-screen p { color: var(--gvei-text-muted); font-size: 15px; line-height: 1.6; max-width: 400px; margin: 0 auto; }\n    .gvei-success-bullets { text-align: left; max-width: 380px; margin: 20px auto 0; }\n    .gvei-success-bullets li { font-size: 14px; color: var(--gvei-text-muted); padding: 8px 0; list-style: none; display: flex; align-items: flex-start; gap: 8px; }\n    .gvei-success-bullets li::before { content: '\u2713'; color: var(--gvei-success); font-weight: 700; flex-shrink: 0; }\n\n    .gvei-error-banner { background: #FEF2F2; border: 1px solid #FECACA; border-radius: 12px; padding: 14px 18px; margin-bottom: 20px; display: flex; align-items: center; gap: 8px; font-size: 14px; color: #B91C1C; }\n\n    \/* Validation highlight *\/\n    .gvei-input.gvei-field-missing { border-color: #f97316; box-shadow: 0 0 0 3px rgba(249,115,22,0.15); }\n    .gvei-field-missing-msg { color: #f97316; font-size: 13px; font-weight: 500; margin-top: 4px; display: none; }\n    .gvei-field-missing-msg.show { display: block; animation: fadeIn 0.3s ease; }\n\n    \/* HEIC Converting Spinner *\/\n    .gvei-convert-spinner { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 20px; gap: 16px; }\n    .gvei-convert-spinner .spinner-ring { width: 48px; height: 48px; border: 4px solid rgba(99,102,241,0.15); border-top-color: var(--gvei-primary); border-radius: 50%; animation: gvei-spin 0.8s linear infinite; }\n    .gvei-convert-spinner .spinner-text { color: var(--gvei-text-muted); font-size: 14px; font-weight: 500; }\n    @keyframes gvei-spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }\n\n    \/* Voice input toggle *\/\n    .gvei-voice-input-toggle { display: flex; gap: 0; background: #f0f0f4; border-radius: 12px; padding: 4px; margin-bottom: 20px; }\n    .gvei-toggle-btn { flex: 1; padding: 12px 16px; border: none; border-radius: 10px; font-size: 14px; font-weight: 500; cursor: pointer; background: transparent; color: var(--gvei-text-muted); transition: all 0.2s ease; font-family: var(--gvei-font); display: flex; align-items: center; justify-content: center; gap: 8px; }\n    .gvei-toggle-btn.active { background: white; color: var(--gvei-text); box-shadow: 0 1px 3px rgba(0,0,0,0.08); }\n    .gvei-toggle-btn:hover:not(.active) { color: var(--gvei-text); }\n\n    \/* Record area *\/\n    .gvei-record-visual { text-align: center; padding: 20px 0; }\n    .gvei-record-circle { width: 80px; height: 80px; border-radius: 50%; background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%); display: flex; align-items: center; justify-content: center; margin: 0 auto; font-size: 28px; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 4px 16px rgba(239,68,68,0.15); }\n    .gvei-record-circle.recording { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); animation: recording-pulse 1.5s ease-in-out infinite; }\n    @keyframes recording-pulse { 0%,100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239,68,68,0.4); } 50% { transform: scale(1.05); box-shadow: 0 0 0 12px rgba(239,68,68,0); } }\n    .gvei-pulse-dot { width: 16px; height: 16px; background: white; border-radius: 50%; display: block; }\n    .gvei-record-timer { font-size: 36px; font-weight: 700; color: var(--gvei-text); margin: 12px 0 0; font-variant-numeric: tabular-nums; }\n    .gvei-record-controls { text-align: center; margin-top: 16px; }\n    .gvei-record-btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px; border-radius: 30px; font-size: 15px; font-weight: 600; cursor: pointer; border: none; transition: all 0.2s; font-family: var(--gvei-font); background: linear-gradient(135deg, #ef4444, #dc2626); color: white; box-shadow: 0 4px 12px rgba(239,68,68,0.3); }\n    .gvei-record-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(239,68,68,0.4); }\n    .gvei-record-btn.recording { background: linear-gradient(135deg, #6b7280, #4b5563); box-shadow: 0 4px 12px rgba(107,114,128,0.3); }\n    #countdown-number { animation: countdown-pulse 1s ease-in-out infinite; }\n    @keyframes countdown-pulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.1); opacity: 0.8; } }\n\n    \/* Spinner *\/\n    .gvei-spinner { width: 32px; height: 32px; border: 3px solid rgba(99,102,241,0.2); border-top-color: var(--gvei-primary); border-radius: 50%; animation: gvei-spin 0.8s linear infinite; margin: 0 auto; }\n\n    \/* Pulsating button *\/\n    @keyframes gvei-pulse { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(102,126,234,0.7); } 50% { transform: scale(1.02); box-shadow: 0 0 0 10px rgba(102,126,234,0); } 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(102,126,234,0); } }\n    .gvei-pulse-btn { animation: gvei-pulse 1.5s ease-in-out infinite; }\n\n    \/* Voice filter buttons *\/\n    .gvei-voice-filters { display: flex; gap: 8px; margin-bottom: 16px; }\n    .gvei-filter-btn { padding: 8px 16px; border: none; border-radius: 20px; background: #f0f0f4; color: var(--gvei-text-muted); font-size: 0.875rem; font-weight: 500; cursor: pointer; transition: all 0.2s ease; font-family: var(--gvei-font); }\n    .gvei-filter-btn:hover { background: #e5e5eb; }\n    .gvei-filter-btn.active { background: var(--gvei-primary); color: white; }\n\n    \/* Voice list *\/\n    .gvei-voice-list { display: flex; flex-direction: column; gap: 10px; max-height: 400px; overflow-y: auto; padding-right: 8px; }\n    .gvei-voice-list::-webkit-scrollbar { width: 6px; }\n    .gvei-voice-list::-webkit-scrollbar-track { background: #f0f0f4; border-radius: 3px; }\n    .gvei-voice-list::-webkit-scrollbar-thumb { background: #c0c0c8; border-radius: 3px; }\n\n    \/* Voice avatars *\/\n    .gvei-voice-avatar { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: white; font-weight: 600; font-size: 15px; flex-shrink: 0; }\n    .gvei-voice-avatar.female { background: linear-gradient(135deg, #ec4899, #f472b6); }\n    .gvei-voice-avatar.male { background: linear-gradient(135deg, var(--gvei-primary), var(--gvei-accent)); }\n    .gvei-voice-info { flex: 1; }\n    .gvei-voice-name { font-weight: 600; font-size: 15px; color: var(--gvei-text); }\n    .gvei-voice-desc { font-size: 13px; color: var(--gvei-text-muted); font-weight: 400; margin-top: 2px; }\n\n    \/* Voice play button loading state *\/\n    .gvei-voice-play.loading::before { content: ''; position: absolute; top: -4px; left: -4px; right: -4px; bottom: -4px; border-radius: 50%; border: 3px solid rgba(99,102,241,0.2); border-top-color: var(--gvei-primary); animation: gvei-spin 0.8s linear infinite; }\n\n    \/* Voice tip *\/\n    .gvei-voice-tip { font-size: 13px; color: var(--gvei-text-soft); text-align: center; margin-top: 12px; }\n\n    \/* Upload area *\/\n    .gvei-upload-area { border: 2px dashed #d1d5db; border-radius: var(--gvei-radius); padding: 30px 20px; text-align: center; cursor: pointer; transition: all 0.2s ease; }\n    .gvei-upload-area:hover { border-color: var(--gvei-primary); background: var(--gvei-primary-soft); }\n    .gvei-upload-icon { font-size: 32px; margin-bottom: 8px; }\n    .gvei-upload-text { font-size: 14px; color: var(--gvei-text); margin-bottom: 4px; }\n    .gvei-upload-formats { font-size: 12px; color: var(--gvei-text-soft); }\n\n    \/* Audio preview area *\/\n    .gvei-audio-preview { text-align: center; padding: 16px; background: #f5f7fa; border-radius: 12px; }\n    .gvei-audio-preview audio { width: 100%; max-width: 300px; margin: 8px 0; }\n    .gvei-btn-text { background: none; border: none; color: var(--gvei-text-muted); cursor: pointer; font-size: 13px; font-family: var(--gvei-font); }\n\n    .gvei-saving-indicator { position: fixed; top: 16px; right: 16px; background: var(--gvei-success); color: white; padding: 8px 16px; border-radius: 8px; font-size: 12px; font-weight: 600; opacity: 0; transition: opacity 0.3s; z-index: 100; pointer-events: none; }\n    .gvei-saving-indicator.show { opacity: 1; }\n\n    .gvei-confirm-email-box { background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%); border: 1px solid #C7D2FE; border-radius: 14px; padding: 20px; text-align: center; }\n    .gvei-confirm-email-box .gvei-confirm-email { font-size: 20px; font-weight: 600; color: #4338CA; margin: 12px 0; }\n\n    \/* Crop Modal *\/\n    .gvei-crop-modal { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); z-index: 10000; align-items: center; justify-content: center; padding: 20px; }\n    .gvei-crop-modal.active { display: flex; }\n    .gvei-crop-container { background: white; border-radius: var(--gvei-radius); max-width: 500px; width: 100%; max-height: 90vh; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }\n    .gvei-crop-header { padding: 24px 28px 16px; text-align: center; }\n    .gvei-crop-header h3 { font-size: 1.25rem; font-weight: 600; color: var(--gvei-text); margin-bottom: 6px; }\n    .gvei-crop-header p { font-size: 0.875rem; color: var(--gvei-text-muted); }\n    .gvei-crop-area { padding: 0 28px; display: flex; justify-content: center; align-items: center; min-height: 300px; background: #f5f7fa; }\n    .gvei-crop-area img { max-width: 100%; max-height: 350px; }\n    .gvei-crop-zoom { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 16px 28px; background: white; }\n    .gvei-zoom-btn { width: 44px; height: 44px; border-radius: 50%; border: none; background: #f5f7fa; color: var(--gvei-text); font-size: 1.5rem; font-weight: 300; cursor: pointer; transition: all 0.2s ease; display: flex; align-items: center; justify-content: center; line-height: 1; }\n    .gvei-zoom-btn:hover { background: var(--gvei-primary); color: white; }\n    .gvei-crop-actions { padding: 16px 28px 28px; display: flex; gap: 12px; }\n    .gvei-crop-actions .gvei-btn { flex: 1; }\n    .cropper-view-box, .cropper-face { border-radius: 50%; }\n    .cropper-view-box { outline: 3px solid rgba(255,255,255,0.9); outline-offset: -3px; box-shadow: 0 0 0 9999px rgba(0,0,0,0.5); }\n    .cropper-face { background: transparent; }\n    .cropper-dashed, .cropper-point, .cropper-line { display: none; }\n\n    \/* Vimeo video embed *\/\n    .gvei-vimeo-wrap { margin-top: 24px; border-radius: var(--gvei-radius); overflow: hidden; box-shadow: var(--gvei-shadow-soft); }\n    .gvei-vimeo-wrap iframe { width: 100%; aspect-ratio: 16\/9; border: none; display: block; }\n\n    \/* Dashboard link button *\/\n    .gvei-dashboard-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; padding: 14px 28px; background: var(--gvei-primary); color: white; border-radius: var(--gvei-radius-input); font-size: 15px; font-weight: 600; text-decoration: none; transition: all 0.2s; }\n    .gvei-dashboard-link:hover { background: #5558e6; transform: translateY(-1px); color: white; text-decoration: none; }\n\n    @media (max-width: 480px) {\n        .gvei-wizard { padding: 16px 12px 50px; }\n        .gvei-zip-secondary-grid { grid-template-columns: 1fr; }\n    }\n    <\/style>\n<\/head>\n<body class=\"gvei-onboard-page\">\n\n<!-- ONBOARDING WIZARD -->\n<div class=\"gvei-wizard\">\n    <div class=\"gvei-brand\">\n        <div class=\"gvei-step-label\" id=\"step-label\">Step 1 of 4<\/div>\n        <h1 class=\"gvei-brand-tagline\">Get Your Free Sample Video<\/h1>\n        <p class=\"gvei-brand-subtitle\">We'll create a personalized video so you can see exactly what it looks like with your brand.<\/p>\n        <div class=\"gvei-steps\">\n                            <div class=\"gvei-step-dot active\" data-step=\"1\"><\/div>\n                            <div class=\"gvei-step-dot \" data-step=\"2\"><\/div>\n                            <div class=\"gvei-step-dot \" data-step=\"3\"><\/div>\n                            <div class=\"gvei-step-dot \" data-step=\"4\"><\/div>\n                    <\/div>\n    <\/div>\n\n    <div class=\"gvei-card\">\n        \n        <form id=\"gvei-fs-form\" method=\"post\" enctype=\"multipart\/form-data\" data-ajax-url=\"https:\/\/gogoit.com\/video\/wp-admin\/admin-ajax.php\">\n            <input type=\"hidden\" id=\"gvei_fs_nonce\" name=\"gvei_fs_nonce\" value=\"b3bdc0cd6e\" \/><input type=\"hidden\" name=\"_wp_http_referer\" value=\"\/video\/wp-json\/wp\/v2\/pages\/86\" \/>            <input type=\"hidden\" name=\"client_id\" id=\"client_id\" value=\"0\">\n            <input type=\"hidden\" name=\"token\" value=\"\">\n            <input type=\"hidden\" name=\"current_step\" id=\"current-step-input\" value=\"1\">\n            <input type=\"hidden\" name=\"flow_type\" value=\"free_sample\">\n\n            <!-- STEP 1: About You -->\n            <div class=\"gvei-step-content active\" data-step=\"1\">\n                <div class=\"gvei-step-header\">\n                    <div class=\"gvei-step-icon\">\u2728<\/div>\n                    <h2 class=\"gvei-step-title\">Let's Make Your Free Sample Video<\/h2>\n                    <p class=\"gvei-step-desc\">We'll use these details to personalize your video so it looks and sounds like your brand.<\/p>\n                <\/div>\n\n                <div class=\"gvei-form-group\">\n                    <label class=\"gvei-label\">Full Name *<\/label>\n                    <input type=\"text\" name=\"name\" class=\"gvei-input\" placeholder=\"e.g., Sarah Johnson\" value=\"\" required>\n                    <p class=\"gvei-helper\">Your name may appear in the video.<\/p>\n                <\/div>\n\n                <div class=\"gvei-form-group\">\n                    <label class=\"gvei-label\">Email Address *<\/label>\n                    <input type=\"email\" name=\"email\" id=\"fs-email-input\" class=\"gvei-input\" placeholder=\"sarah@example.com\" value=\"\" required>\n                    <p class=\"gvei-helper\">We'll send your sample video to this email.<\/p>\n                <\/div>\n\n                <div class=\"gvei-form-group\">\n                    <label class=\"gvei-label\">Phone Number *<\/label>\n                    <input type=\"tel\" name=\"phone\" class=\"gvei-input\" placeholder=\"(555) 123-4567\" value=\"\" required>\n                    <p class=\"gvei-helper\">May be added to the video as a call to action.<\/p>\n                <\/div>\n\n                <div class=\"gvei-form-group\">\n                    <label class=\"gvei-label\">Your Headshot<\/label>\n                    <label for=\"fs-photo-input\" class=\"gvei-photo-upload\" id=\"photo-upload-area\">\n                        <div class=\"gvei-photo-preview\" id=\"photo-preview\">\n                                                            <span style=\"font-size: 28px; color: #d1d5db;\">\ud83d\udcf7<\/span>\n                                                    <\/div>\n                        <div class=\"gvei-photo-upload-text\">\n                            <strong>Tap to upload<\/strong> your headshot\n                        <\/div>\n                    <\/label>\n                    <input type=\"file\" id=\"fs-photo-input\" name=\"agent_photo\" accept=\"image\/jpeg,image\/png,image\/gif,image\/webp,image\/heic,image\/heif,.jpg,.jpeg,.png,.gif,.webp,.heic,.heif\" style=\"display:none\" onchange=\"handlePhotoSelect(this)\">\n                    <input type=\"hidden\" name=\"agent_photo_cropped\" id=\"agent-photo-cropped\" value=\"\">\n                    <input type=\"hidden\" name=\"agent_photo_base64\" id=\"agent-photo-base64\" value=\"\">\n                    <p class=\"gvei-helper\">Helps the video feel like you. A clear, professional photo works best.<\/p>\n                <\/div>\n\n                <div class=\"gvei-nav\">\n                    <button type=\"button\" class=\"gvei-btn gvei-btn-primary\" onclick=\"gveiNextStep()\" style=\"flex: 1;\">\n                        Continue <span>\u2192<\/span>\n                    <\/button>\n                <\/div>\n            <\/div>\n\n            <!-- STEP 2: Market -->\n            <div class=\"gvei-step-content \" data-step=\"2\">\n                <div class=\"gvei-step-header\">\n                    <div class=\"gvei-step-icon\">\ud83d\udccd<\/div>\n                    <h2 class=\"gvei-step-title\">Choose Your Market<\/h2>\n                    <p class=\"gvei-step-desc\">We use your ZIP codes to choose a listing and create a more relevant sample video.<\/p>\n                <\/div>\n\n                <div class=\"gvei-form-group\">\n                    <label class=\"gvei-label\">Primary ZIP Code *<\/label>\n                    <div class=\"gvei-zip-primary\">\n                        <input type=\"text\" name=\"primary_zip\" class=\"gvei-input\" placeholder=\"e.g., 90210\" value=\"\" maxlength=\"5\" pattern=\"[0-9]{5}\" inputmode=\"numeric\" required>\n                        <span class=\"gvei-badge-primary\">PRIMARY<\/span>\n                    <\/div>\n                    <p class=\"gvei-helper\">This is the main area we'll use for your sample video.<\/p>\n                <\/div>\n\n                <div class=\"gvei-form-group\" style=\"margin-top: 20px;\">\n                    <label class=\"gvei-label\">Surrounding Markets<\/label>\n                    <p class=\"gvei-helper\" style=\"margin-bottom: 10px;\">Adding at least 2\u20133 nearby ZIP codes helps us find more homes in your area to feature in your videos. The more ZIPs you add, the more video options we have for you.<\/p>\n                    <div class=\"gvei-zip-secondary-grid\" id=\"secondary-zips-container\">\n                                                <div class=\"gvei-zip-secondary-item\">\n                            <input type=\"text\" name=\"secondary_zips[]\" class=\"gvei-input\" placeholder=\"ZIP Code\" value=\"\" maxlength=\"5\" pattern=\"[0-9]{5}\" inputmode=\"numeric\">\n                        <\/div>\n                                            <\/div>\n                    <button type=\"button\" class=\"gvei-add-zip-btn\" onclick=\"addSecondaryZip()\"><span>+<\/span> Add another ZIP<\/button>\n                <\/div>\n\n                <div class=\"gvei-nav\">\n                    <button type=\"button\" class=\"gvei-btn gvei-btn-secondary\" onclick=\"gveiPrevStep()\"><span>\u2190<\/span> Back<\/button>\n                    <button type=\"button\" class=\"gvei-btn gvei-btn-primary\" onclick=\"gveiNextStep()\">Continue <span>\u2192<\/span><\/button>\n                <\/div>\n            <\/div>\n\n            <!-- STEP 3: Voice -->\n            <div class=\"gvei-step-content \" data-step=\"3\">\n                <div class=\"gvei-step-header\">\n                    <div class=\"gvei-step-icon\">\ud83c\udf99\ufe0f<\/div>\n                    <h2 class=\"gvei-step-title\">Choose Your Video Voice<\/h2>\n                    <p class=\"gvei-step-desc\">Your sample can use your real voice or one of ours. Your real voice makes the sample feel more like you.<\/p>\n                <\/div>\n\n                <input type=\"hidden\" name=\"voice_mode\" id=\"voice-mode-input\" value=\"clone\">\n                <input type=\"hidden\" name=\"voice_sample_url\" id=\"voice-sample-url-input\" value=\"\">\n                <input type=\"hidden\" name=\"voice_library_id\" id=\"voice-library-id-input\" value=\"\">\n\n                \n                <!-- OPTION 1: Use My Own Voice -->\n                <div class=\"gvei-own-voice-section\" style=\"background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%); border-radius: 16px; padding: 20px; margin-bottom: 24px; border: 1px solid rgba(99,102,241,0.15); \">\n                                <div class=\"gvei-voice-mode-option selected\" data-mode=\"clone\" style=\"margin-bottom: 16px; background: white;\">\n                    <div class=\"gvei-voice-mode-icon\">\ud83c\udfa4<\/div>\n                    <div class=\"gvei-voice-mode-content\">\n                        <div class=\"gvei-voice-mode-title\">Use My Own Voice <span style=\"background: var(--gvei-primary); color: white; font-size: 10px; padding: 2px 8px; border-radius: 10px; margin-left: 8px; font-weight: 600;\">RECOMMENDED<\/span><\/div>\n                        <div class=\"gvei-voice-mode-desc\">Record or upload a short sample and we'll create a digital version of your voice for your videos.<\/div>\n                    <\/div>\n                    <div class=\"gvei-voice-mode-check\">\u2713<\/div>\n                <\/div>\n\n                <div class=\"gvei-voice-panel\" id=\"custom-voice-panel\" style=\"; margin-bottom: 20px; margin-left: 0;\">\n\n                                        <div id=\"new-voice-options\">\n                    \n                    <p class=\"gvei-helper\" style=\"margin-bottom: 16px; text-align: center;\">We'll clone your voice from a 30\u201360 second sample of you speaking naturally.<\/p>\n\n                    <div class=\"gvei-voice-input-toggle\">\n                        <button type=\"button\" class=\"gvei-toggle-btn active\" data-input=\"record\">\n                            <span>\ud83c\udfa4<\/span> Record Voice\n                        <\/button>\n                        <button type=\"button\" class=\"gvei-toggle-btn\" data-input=\"upload\">\n                            <span>\ud83d\udcc1<\/span> Upload Audio File\n                        <\/button>\n                    <\/div>\n\n                    <!-- RECORD INTERFACE -->\n                    <div class=\"gvei-voice-input-panel\" id=\"record-panel\">\n                        <div class=\"gvei-record-area\" id=\"record-start-area\">\n                            <div class=\"gvei-record-visual\">\n                                <div class=\"gvei-record-circle\" id=\"record-circle\" onclick=\"gveiStartRecordingFlow()\" title=\"Click to start recording\">\n                                    <span id=\"record-icon\">\ud83c\udfa4<\/span>\n                                <\/div>\n                                <p style=\"color: #64748b; margin: 16px 0 8px; font-size: 15px;\">Record yourself reading a short script<\/p>\n                                <p style=\"color: #94a3b8; font-size: 13px; margin: 0;\">We'll provide text for you to read<\/p>\n                            <\/div>\n                            <div class=\"gvei-record-controls\">\n                                <button type=\"button\" class=\"gvei-record-btn\" id=\"record-btn\" onclick=\"gveiStartRecordingFlow()\">\n                                    <span>\ud83c\udf99\ufe0f Start Recording<\/span>\n                                <\/button>\n                            <\/div>\n                        <\/div>\n\n                        <div class=\"gvei-countdown-area\" id=\"countdown-area\" style=\"display: none;\">\n                            <div style=\"text-align: center; padding: 40px 20px;\">\n                                <div id=\"countdown-number\" style=\"font-size: 120px; font-weight: 700; color: #8b5cf6; line-height: 1; margin-bottom: 16px;\">4<\/div>\n                                <p style=\"color: #64748b; font-size: 16px; margin: 0;\">Get ready to read the script...<\/p>\n                            <\/div>\n                        <\/div>\n\n                        <div class=\"gvei-recording-active-area\" id=\"recording-active-area\" style=\"display: none;\">\n                            <div class=\"gvei-record-visual\">\n                                <div class=\"gvei-record-circle recording\" id=\"record-circle-active\" onclick=\"gveiStopRecordingFlow()\" title=\"Click to stop recording\" style=\"cursor: pointer;\">\n                                    <span class=\"gvei-pulse-dot\"><\/span>\n                                <\/div>\n                                <div class=\"gvei-record-timer\" id=\"record-timer\">0:00<\/div>\n\n                                <div style=\"width: 100%; max-width: 280px; margin: 12px auto;\">\n                                    <div style=\"height: 8px; background: #e5e7eb; border-radius: 4px; overflow: hidden;\">\n                                        <div id=\"recording-progress-bar\" style=\"width: 0%; height: 100%; background: linear-gradient(90deg, #ef4444, #f97316); border-radius: 4px; transition: width 0.3s ease;\"><\/div>\n                                    <\/div>\n                                    <div id=\"recording-progress-text\" style=\"font-size: 13px; font-weight: 500; margin-top: 8px; color: #ef4444;\">Keep going! Need at least 10 seconds.<\/div>\n                                    <div style=\"font-size: 11px; color: #9ca3af; margin-top: 6px;\">\n                                        <span style=\"color: #ef4444;\">\u25cf<\/span> 10s min &nbsp;\n                                        <span style=\"color: #f59e0b;\">\u25cf<\/span> 20s good &nbsp;\n                                        <span style=\"color: #22c55e;\">\u25cf<\/span> 30s great &nbsp;\n                                        <span style=\"color: #10b981;\">\u25cf<\/span> 3 min max\n                                    <\/div>\n                                <\/div>\n                            <\/div>\n\n                            <div class=\"gvei-recording-script-live\" style=\"background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%); border: 1px solid #fcd34d; border-radius: 12px; padding: 20px; margin: 20px 0; max-height: 300px; overflow-y: auto;\">\n                                <div style=\"font-weight: 600; color: #92400e; margin-bottom: 12px; font-size: 14px;\">\ud83d\udcdc Read this aloud:<\/div>\n                                <div style=\"font-size: 17px; line-height: 1.9; color: #78350f;\">\n                                    <p style=\"margin-bottom: 16px;\">\"Hi, my name is <strong id=\"script-agent-name\" style=\"background: rgba(180,83,9,0.15); padding: 2px 6px; border-radius: 4px;\">[Your Name]<\/strong>. I'm reading this so you can hear how I normally speak.<\/p>\n                                    <p style=\"margin-bottom: 16px;\">Here's what just got listed in this neighborhood. This home has four bedrooms, three bathrooms, and about two thousand four hundred square feet of space. It feels open, bright, and very welcoming the moment you walk in.<\/p>\n                                    <p style=\"margin-bottom: 16px;\">The kitchen is clean and modern, with a large island, new appliances, and lots of light. It flows right into the living room, which makes the space feel big and comfortable. <em>This looks amazing.<\/em><\/p>\n                                    <p style=\"margin-bottom: 16px;\">The primary bedroom is quiet and spacious. The bathroom has a double sink, a walk-in shower, and a soaking tub. Everything feels simple, fresh, and easy to enjoy.\"<\/p>\n                                <\/div>\n                            <\/div>\n\n                            <div class=\"gvei-record-controls\">\n                                <button type=\"button\" class=\"gvei-record-btn recording\" id=\"stop-record-btn\" onclick=\"gveiStopRecordingFlow()\">\n                                    <span>\u23f9\ufe0f Stop Recording<\/span>\n                                <\/button>\n                            <\/div>\n                        <\/div>\n\n                        <div class=\"gvei-record-review-area\" id=\"record-review-area\" style=\"display: none;\">\n                            <div style=\"text-align: center; padding: 20px 0;\">\n                                <div style=\"font-size: 48px; margin-bottom: 12px;\">\ud83c\udfa7<\/div>\n                                <h4 style=\"margin: 0 0 8px; color: #1e293b; font-size: 18px;\">Listen to Your Recording<\/h4>\n                                <p style=\"color: #64748b; font-size: 14px; margin: 0 0 20px;\">Make sure it sounds good before submitting<\/p>\n                                <audio id=\"recorded-audio-review\" controls style=\"width: 100%; max-width: 350px; margin-bottom: 20px;\"><\/audio>\n                                <div id=\"recording-duration-badge\" style=\"display: inline-block; background: #ecfdf5; color: #059669; padding: 6px 16px; border-radius: 20px; font-size: 13px; font-weight: 500; margin-bottom: 24px;\">\n                                    \u2713 Recording captured\n                                <\/div>\n                                <div style=\"display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;\">\n                                    <button type=\"button\" onclick=\"gveiReRecord()\" style=\"padding: 14px 28px; border: 2px solid #e2e8f0; background: white; border-radius: 30px; font-size: 15px; font-weight: 500; color: #64748b; cursor: pointer; transition: all 0.2s;\">\n                                        \ud83d\udd04 Re-record\n                                    <\/button>\n                                    <button type=\"button\" id=\"use-this-voice-btn\" onclick=\"gveiSubmitVoice()\" class=\"gvei-pulse-btn\" style=\"padding: 14px 28px; border: none; background: linear-gradient(135deg, #8b5cf6, #6366f1); border-radius: 30px; font-size: 15px; font-weight: 600; color: white; cursor: pointer; box-shadow: 0 4px 16px rgba(99,102,241,0.3); transition: all 0.2s;\">\n                                        \u2713 Use This Voice\n                                    <\/button>\n                                <\/div>\n                            <\/div>\n                        <\/div>\n\n                        <div class=\"gvei-record-success-area\" id=\"record-success-area\" style=\"display: none;\">\n                            <div style=\"text-align: center; padding: 30px 20px; background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%); border-radius: 12px; border: 1px solid #86efac;\">\n                                <div style=\"font-size: 48px; margin-bottom: 12px;\">\u2705<\/div>\n                                <h4 style=\"margin: 0 0 8px; color: #166534; font-size: 18px;\">Voice Sample Saved!<\/h4>\n                                <p style=\"color: #15803d; font-size: 14px; margin: 0 0 20px;\">Your custom voice is ready for your videos<\/p>\n                                <p style=\"color: #166534; font-size: 15px; font-weight: 500; margin: 0 0 16px;\">\ud83d\udc47 Click \"Continue\" below to proceed<\/p>\n                                <button type=\"button\" onclick=\"gveiResetToRecordStart()\" style=\"padding: 10px 20px; border: 1px solid #86efac; background: white; border-radius: 20px; font-size: 13px; color: #166534; cursor: pointer;\">\n                                    Record Different Voice\n                                <\/button>\n                            <\/div>\n                        <\/div>\n                    <\/div>\n\n                    <!-- UPLOAD INTERFACE -->\n                    <div class=\"gvei-voice-input-panel\" id=\"upload-panel\" style=\"display:none;\">\n                        <div class=\"gvei-upload-area\" id=\"voice-upload-area\">\n                            <input type=\"file\" id=\"voice-file-input\" accept=\"audio\/mp3,audio\/wav,audio\/m4a,audio\/mpeg,audio\/x-m4a,.mp3,.wav,.m4a\" style=\"display:none;\">\n                            <div class=\"gvei-upload-icon\">\ud83d\udcc1<\/div>\n                            <div class=\"gvei-upload-text\">\n                                <strong>Tap to upload<\/strong> or drag and drop\n                            <\/div>\n                            <div class=\"gvei-upload-formats\">MP3, WAV, or M4A &bull; Max 40MB<\/div>\n                        <\/div>\n                        <div class=\"gvei-audio-preview\" id=\"upload-preview\" style=\"display:none;\">\n                            <div class=\"gvei-audio-preview-label\" style=\"color: #16A34A;\">\u2713 Voice sample uploaded!<\/div>\n                            <div class=\"gvei-audio-filename\" id=\"uploaded-filename\"><\/div>\n                            <audio id=\"uploaded-audio\" controls><\/audio>\n                            <button type=\"button\" class=\"gvei-btn-text\" onclick=\"gveiDiscardUpload()\">\n                                \ud83d\uddd1\ufe0f Remove and upload different file\n                            <\/button>\n                        <\/div>\n                    <\/div>\n\n                    <div class=\"gvei-voice-tip\" style=\"margin-top: 16px;\">\n                        \ud83d\udca1 <strong>Tips for best results:<\/strong> Speak naturally in a quiet room. Record for at least 10 seconds, but 30 seconds or more gives the best quality voice clone.\n                    <\/div>\n\n                    <\/div>\n                <\/div>\n                <\/div>\n\n                <!-- Divider -->\n                <div style=\"display: flex; align-items: center; gap: 16px; margin: 24px 0;\">\n                    <div style=\"flex: 1; height: 2px; background: linear-gradient(to right, transparent, #d1d5db, #d1d5db);\"><\/div>\n                    <span style=\"color: #6b7280; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px;\">Or choose a preset<\/span>\n                    <div style=\"flex: 1; height: 2px; background: linear-gradient(to left, transparent, #d1d5db, #d1d5db);\"><\/div>\n                <\/div>\n\n                <!-- OPTION 2: Use a Ready-Made Voice -->\n                <div class=\"gvei-voice-mode-option \" data-mode=\"preset\" style=\"margin-bottom: 16px; \">\n                    <div class=\"gvei-voice-mode-icon\">\ud83c\udfad<\/div>\n                    <div class=\"gvei-voice-mode-content\">\n                        <div class=\"gvei-voice-mode-title\">Use a Ready-Made Voice<\/div>\n                        <div class=\"gvei-voice-mode-desc\">Choose from our curated voices. You can switch to your own voice anytime.<\/div>\n                    <\/div>\n                    <div class=\"gvei-voice-mode-check\">\u2713<\/div>\n                <\/div>\n\n                <div class=\"gvei-voice-panel\" id=\"preset-voice-panel\" style=\"display:none;; margin-left: 0;\">\n                    <div class=\"gvei-voice-filters\">\n                        <button type=\"button\" class=\"gvei-filter-btn active\" data-filter=\"all\">All<\/button>\n                        <button type=\"button\" class=\"gvei-filter-btn\" data-filter=\"female\">Female<\/button>\n                        <button type=\"button\" class=\"gvei-filter-btn\" data-filter=\"male\">Male<\/button>\n                    <\/div>\n\n                    <div class=\"gvei-voice-list\">\n                                                                                    <div class=\"gvei-voice-card \"\n                                     data-voice-id=\"1\"\n                                     data-gender=\"female\"\n                                     data-sample=\"https:\/\/pub-7d3daa68356249ae95e7ad771cd1345a.r2.dev\/voice-library\/voice-6982974f6021b-1770166095.mp3\">\n                                    <div class=\"gvei-voice-avatar female\">\n                                        B                                    <\/div>\n                                    <div class=\"gvei-voice-info\">\n                                        <div class=\"gvei-voice-name\">Bella<\/div>\n                                        <div class=\"gvei-voice-desc\">Professional (Female)<\/div>\n                                    <\/div>\n                                    <button type=\"button\" class=\"gvei-voice-play\" title=\"Preview voice\">\n                                        <span class=\"play-icon\">\u25b6<\/span>\n                                    <\/button>\n                                <\/div>\n                                                            <div class=\"gvei-voice-card \"\n                                     data-voice-id=\"2\"\n                                     data-gender=\"male\"\n                                     data-sample=\"https:\/\/pub-7d3daa68356249ae95e7ad771cd1345a.r2.dev\/voice-library\/voice-69829b5b20dcc-1770167131.mp3\">\n                                    <div class=\"gvei-voice-avatar male\">\n                                        R                                    <\/div>\n                                    <div class=\"gvei-voice-info\">\n                                        <div class=\"gvei-voice-name\">Roger<\/div>\n                                        <div class=\"gvei-voice-desc\">Confident (Male)<\/div>\n                                    <\/div>\n                                    <button type=\"button\" class=\"gvei-voice-play\" title=\"Preview voice\">\n                                        <span class=\"play-icon\">\u25b6<\/span>\n                                    <\/button>\n                                <\/div>\n                                                            <div class=\"gvei-voice-card \"\n                                     data-voice-id=\"3\"\n                                     data-gender=\"female\"\n                                     data-sample=\"https:\/\/pub-7d3daa68356249ae95e7ad771cd1345a.r2.dev\/voice-library\/voice-69829ba061f9a-1770167200.mp3\">\n                                    <div class=\"gvei-voice-avatar female\">\n                                        S                                    <\/div>\n                                    <div class=\"gvei-voice-info\">\n                                        <div class=\"gvei-voice-name\">Sarah<\/div>\n                                        <div class=\"gvei-voice-desc\">Professional (Female)<\/div>\n                                    <\/div>\n                                    <button type=\"button\" class=\"gvei-voice-play\" title=\"Preview voice\">\n                                        <span class=\"play-icon\">\u25b6<\/span>\n                                    <\/button>\n                                <\/div>\n                                                            <div class=\"gvei-voice-card \"\n                                     data-voice-id=\"4\"\n                                     data-gender=\"male\"\n                                     data-sample=\"https:\/\/pub-7d3daa68356249ae95e7ad771cd1345a.r2.dev\/voice-library\/voice-69829c3f67930-1770167359.mp3\">\n                                    <div class=\"gvei-voice-avatar male\">\n                                        G                                    <\/div>\n                                    <div class=\"gvei-voice-info\">\n                                        <div class=\"gvei-voice-name\">George<\/div>\n                                        <div class=\"gvei-voice-desc\">Warm (Male)<\/div>\n                                    <\/div>\n                                    <button type=\"button\" class=\"gvei-voice-play\" title=\"Preview voice\">\n                                        <span class=\"play-icon\">\u25b6<\/span>\n                                    <\/button>\n                                <\/div>\n                                                            <div class=\"gvei-voice-card \"\n                                     data-voice-id=\"5\"\n                                     data-gender=\"female\"\n                                     data-sample=\"https:\/\/pub-7d3daa68356249ae95e7ad771cd1345a.r2.dev\/voice-library\/voice-69829c7b94047-1770167419.mp3\">\n                                    <div class=\"gvei-voice-avatar female\">\n                                        B                                    <\/div>\n                                    <div class=\"gvei-voice-info\">\n                                        <div class=\"gvei-voice-name\">Barbra<\/div>\n                                        <div class=\"gvei-voice-desc\">Professional (Female)<\/div>\n                                    <\/div>\n                                    <button type=\"button\" class=\"gvei-voice-play\" title=\"Preview voice\">\n                                        <span class=\"play-icon\">\u25b6<\/span>\n                                    <\/button>\n                                <\/div>\n                                                            <div class=\"gvei-voice-card \"\n                                     data-voice-id=\"6\"\n                                     data-gender=\"male\"\n                                     data-sample=\"https:\/\/pub-7d3daa68356249ae95e7ad771cd1345a.r2.dev\/voice-library\/voice-69829d052887b-1770167557.mp3\">\n                                    <div class=\"gvei-voice-avatar male\">\n                                        C                                    <\/div>\n                                    <div class=\"gvei-voice-info\">\n                                        <div class=\"gvei-voice-name\">Callun<\/div>\n                                        <div class=\"gvei-voice-desc\">Confident (Male)<\/div>\n                                    <\/div>\n                                    <button type=\"button\" class=\"gvei-voice-play\" title=\"Preview voice\">\n                                        <span class=\"play-icon\">\u25b6<\/span>\n                                    <\/button>\n                                <\/div>\n                                                            <div class=\"gvei-voice-card \"\n                                     data-voice-id=\"7\"\n                                     data-gender=\"female\"\n                                     data-sample=\"https:\/\/pub-7d3daa68356249ae95e7ad771cd1345a.r2.dev\/voice-library\/voice-69829d3b736ef-1770167611.mp3\">\n                                    <div class=\"gvei-voice-avatar female\">\n                                        L                                    <\/div>\n                                    <div class=\"gvei-voice-info\">\n                                        <div class=\"gvei-voice-name\">Laura<\/div>\n                                        <div class=\"gvei-voice-desc\">Confident (Female)<\/div>\n                                    <\/div>\n                                    <button type=\"button\" class=\"gvei-voice-play\" title=\"Preview voice\">\n                                        <span class=\"play-icon\">\u25b6<\/span>\n                                    <\/button>\n                                <\/div>\n                                                            <div class=\"gvei-voice-card \"\n                                     data-voice-id=\"8\"\n                                     data-gender=\"male\"\n                                     data-sample=\"https:\/\/pub-7d3daa68356249ae95e7ad771cd1345a.r2.dev\/voice-library\/voice-69829d6e57b7d-1770167662.mp3\">\n                                    <div class=\"gvei-voice-avatar male\">\n                                        C                                    <\/div>\n                                    <div class=\"gvei-voice-info\">\n                                        <div class=\"gvei-voice-name\">Charlie<\/div>\n                                        <div class=\"gvei-voice-desc\">Friendly (Male)<\/div>\n                                    <\/div>\n                                    <button type=\"button\" class=\"gvei-voice-play\" title=\"Preview voice\">\n                                        <span class=\"play-icon\">\u25b6<\/span>\n                                    <\/button>\n                                <\/div>\n                                                                        <\/div>\n\n                    <p class=\"gvei-voice-tip\">\ud83c\udfa7 Click the play button to preview how each voice sounds.<\/p>\n                <\/div>\n\n                <div class=\"gvei-nav\">\n                    <button type=\"button\" class=\"gvei-btn gvei-btn-secondary\" onclick=\"gveiPrevStep()\"><span>\u2190<\/span> Back<\/button>\n                    <button type=\"button\" class=\"gvei-btn gvei-btn-primary\" onclick=\"gveiNextStep()\">Continue <span>\u2192<\/span><\/button>\n                <\/div>\n            <\/div>\n\n            <!-- STEP 4: Confirm & Submit -->\n            <div class=\"gvei-step-content \" data-step=\"4\">\n                <div class=\"gvei-step-header\">\n                    <div class=\"gvei-step-icon\">\u2709\ufe0f<\/div>\n                    <h2 class=\"gvei-step-title\">Confirm Where to Send Your Video<\/h2>\n                    <p class=\"gvei-step-desc\">We'll send your free sample here once it's ready.<\/p>\n                <\/div>\n\n                <div class=\"gvei-confirm-email-box\">\n                    <p style=\"font-size: 13px; color: #6366F1;\">Your sample will be sent to:<\/p>\n                    <p class=\"gvei-confirm-email\" id=\"confirm-email-display\"><\/p>\n                    <button type=\"button\" onclick=\"editConfirmEmail()\" style=\"background: none; border: none; color: var(--gvei-primary); font-size: 12px; cursor: pointer; text-decoration: underline;\">Change email<\/button>\n                    <div id=\"edit-email-area\" style=\"display: none; margin-top: 12px;\">\n                        <input type=\"email\" id=\"confirm-email-input\" class=\"gvei-input\" value=\"\" style=\"text-align: center;\">\n                        <button type=\"button\" onclick=\"saveConfirmEmail()\" class=\"gvei-btn gvei-btn-primary\" style=\"margin-top: 8px; padding: 10px;\">Save<\/button>\n                    <\/div>\n                <\/div>\n\n                <p style=\"text-align: center; margin-top: 16px; font-size: 12px; color: var(--gvei-text-soft);\">After you confirm, we'll review your request and start building your custom sample.<\/p>\n\n                <div class=\"gvei-nav\" style=\"margin-top: 24px;\">\n                    <button type=\"button\" class=\"gvei-btn gvei-btn-secondary\" onclick=\"gveiPrevStep()\"><span>\u2190<\/span> Back<\/button>\n                    <button type=\"button\" class=\"gvei-btn gvei-btn-primary\" id=\"submit-request-btn\" onclick=\"submitFreeSampleRequest()\">\n                        Submit My Request <span>\u2192<\/span>\n                    <\/button>\n                <\/div>\n            <\/div>\n\n            <!-- VERIFICATION SENT SCREEN -->\n            <div class=\"gvei-step-content\" data-step=\"5\" id=\"verification-sent-screen\">\n                <div class=\"gvei-success-screen\">\n                    <div class=\"gvei-success-icon\">\ud83d\udcec<\/div>\n                    <h2>Check Your Email<\/h2>\n                    <p>We sent a verification link to <strong id=\"verify-email-display\"><\/strong>. Click the link to confirm your request.<\/p>\n                    <p style=\"margin-top: 16px; font-size: 13px; color: var(--gvei-text-soft);\">Didn't get it? Check spam or <a href=\"#\" onclick=\"resendVerification(); return false;\" style=\"color: var(--gvei-primary);\">resend the email<\/a>.<\/p>\n                                    <\/div>\n            <\/div>\n        <\/form>\n    <\/div>\n<\/div>\n\n<!-- Crop Modal -->\n<div class=\"gvei-crop-modal\" id=\"crop-modal\">\n    <div class=\"gvei-crop-container\">\n        <div class=\"gvei-crop-header\">\n            <h3>Crop Your Photo<\/h3>\n            <p>Drag to position, pinch or use buttons to zoom<\/p>\n        <\/div>\n        <div class=\"gvei-crop-area\">\n            <img decoding=\"async\" id=\"crop-image\" src=\"\" alt=\"Crop preview\">\n        <\/div>\n        <div class=\"gvei-crop-zoom\">\n            <button type=\"button\" class=\"gvei-zoom-btn\" id=\"zoom-out\" title=\"Zoom out\">\u2212<\/button>\n            <div class=\"gvei-zoom-label\">Zoom<\/div>\n            <button type=\"button\" class=\"gvei-zoom-btn\" id=\"zoom-in\" title=\"Zoom in\">+<\/button>\n        <\/div>\n        <div class=\"gvei-crop-actions\">\n            <button type=\"button\" class=\"gvei-btn gvei-btn-secondary\" id=\"crop-cancel\">Cancel<\/button>\n            <button type=\"button\" class=\"gvei-btn gvei-btn-primary\" id=\"crop-save\">Use This Photo<\/button>\n        <\/div>\n    <\/div>\n<\/div>\n\n<div class=\"gvei-saving-indicator\" id=\"saving-indicator\">Saved \u2713<\/div>\n\n<script>\n(function() {\n    var currentStep = 1;\n    var ajaxUrl = 'https:\/\/gogoit.com\/video\/wp-admin\/admin-ajax.php';\n    var nonce = document.querySelector('[name=\"gvei_fs_nonce\"]') ? document.querySelector('[name=\"gvei_fs_nonce\"]').value : '';\n\n    \/\/ === NAVIGATION ===\n    window.gveiNextStep = function() {\n        if (!validateCurrentStep()) return;\n        goToStep(currentStep + 1);\n        saveStep();\n    };\n\n    window.gveiPrevStep = function() {\n        goToStep(currentStep - 1);\n    };\n\n    function goToStep(step) {\n        if (step < 1 || step > 5) return;\n        document.querySelectorAll('.gvei-step-content').forEach(function(el) { el.classList.remove('active'); });\n        var target = document.querySelector('.gvei-step-content[data-step=\"' + step + '\"]');\n        if (target) target.classList.add('active');\n\n        document.querySelectorAll('.gvei-step-dot').forEach(function(dot, idx) {\n            dot.classList.remove('active', 'completed');\n            if (idx + 1 === step) dot.classList.add('active');\n            else if (idx + 1 < step) dot.classList.add('completed');\n        });\n\n        var label = document.getElementById('step-label');\n        if (label && step <= 4) label.textContent = 'Step ' + step + ' of 4';\n\n        currentStep = step;\n        document.getElementById('current-step-input').value = step;\n\n        if (step === 4) {\n            var emailInput = document.getElementById('fs-email-input');\n            if (emailInput) {\n                document.getElementById('confirm-email-display').textContent = emailInput.value;\n                document.getElementById('confirm-email-input').value = emailInput.value;\n            }\n        }\n\n        window.scrollTo({ top: 0, behavior: 'smooth' });\n    }\n\n    \/\/ === VALIDATION WITH GENTLE HIGHLIGHTING ===\n    function clearValidation() {\n        document.querySelectorAll('.gvei-field-missing').forEach(function(el) { el.classList.remove('gvei-field-missing'); });\n        document.querySelectorAll('.gvei-field-missing-msg.show').forEach(function(el) { el.classList.remove('show'); });\n    }\n\n    function highlightField(input) {\n        input.classList.add('gvei-field-missing');\n        var msg = input.parentElement.querySelector('.gvei-field-missing-msg');\n        if (!msg) {\n            msg = document.createElement('div');\n            msg.className = 'gvei-field-missing-msg';\n            msg.textContent = 'This field is required';\n            input.parentElement.appendChild(msg);\n        }\n        msg.classList.add('show');\n        input.addEventListener('input', function handler() {\n            input.classList.remove('gvei-field-missing');\n            if (msg) msg.classList.remove('show');\n            input.removeEventListener('input', handler);\n        });\n    }\n\n    function validateCurrentStep() {\n        clearValidation();\n        var firstMissing = null;\n\n        if (currentStep === 1) {\n            var name = document.querySelector('[name=\"name\"]');\n            var email = document.querySelector('[name=\"email\"]');\n            var phone = document.querySelector('[name=\"phone\"]');\n            if (!name.value.trim()) { highlightField(name); if (!firstMissing) firstMissing = name; }\n            if (!email.value.trim() || !email.validity.valid) { highlightField(email); if (!firstMissing) firstMissing = email; }\n            if (!phone.value.trim()) { highlightField(phone); if (!firstMissing) firstMissing = phone; }\n        }\n        if (currentStep === 2) {\n            var zip = document.querySelector('[name=\"primary_zip\"]');\n            if (!zip.value.trim() || zip.value.length < 5) { highlightField(zip); if (!firstMissing) firstMissing = zip; }\n        }\n\n        if (firstMissing) {\n            firstMissing.focus();\n            return false;\n        }\n        return true;\n    }\n\n    \/\/ === SAVE \/ CLIENT ===\n    function saveStep(callback) {\n        var form = document.getElementById('gvei-fs-form');\n        var formData = new FormData(form);\n        formData.set('action', 'gvei_free_sample_autosave');\n        formData.set('step', currentStep);\n        formData.set('_wpnonce', nonce);\n\n        fetch(ajaxUrl, { method: 'POST', body: formData })\n            .then(function(r) { return r.json(); })\n            .then(function(data) {\n                if (data.success) {\n                    if (data.data && data.data.client_id) {\n                        document.getElementById('client_id').value = data.data.client_id;\n                    }\n                    if (data.data && data.data.existing_account && !window._existingNoticeShown) {\n                        window._existingNoticeShown = true;\n                    }\n                    showSaved();\n                }\n                if (callback) callback();\n            })\n            .catch(function() { if (callback) callback(); });\n    }\n\n    function showSmartBanner(icon, message, extraHtml) {\n        removeBanner();\n        var banner = document.createElement('div');\n        banner.id = 'gvei-smart-banner';\n        banner.style.cssText = 'background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%); border: 1px solid #C7D2FE; border-radius: 12px; padding: 16px 18px; margin-bottom: 16px; font-size: 14px; color: #4338CA; animation: fadeIn 0.3s ease;';\n        var html = '<div style=\"display: flex; align-items: center; gap: 10px;\"><span style=\"font-size: 20px;\">' + icon + '<\/span><span>' + message + '<\/span><\/div>';\n        if (extraHtml) html += '<div style=\"margin-top: 10px;\">' + extraHtml + '<\/div>';\n        banner.innerHTML = html;\n        var card = document.querySelector('.gvei-card');\n        if (card) card.insertBefore(banner, card.firstChild);\n    }\n\n    function removeBanner() {\n        var old = document.getElementById('gvei-smart-banner');\n        if (old) old.remove();\n    }\n\n    \/\/ Email field blur handler for smart resume\n    var emailCheckTimer = null;\n    var emailField = document.querySelector('[name=\"email\"]');\n    if (emailField) {\n        emailField.addEventListener('blur', function() {\n            var email = emailField.value.trim();\n            if (!email || !emailField.validity.valid) return;\n            clearTimeout(emailCheckTimer);\n            emailCheckTimer = setTimeout(function() { checkEmailStatus(email); }, 300);\n        });\n    }\n\n    function checkEmailStatus(email) {\n        var formData = new FormData();\n        formData.set('action', 'gvei_check_email_status');\n        formData.set('email', email);\n\n        fetch(ajaxUrl, { method: 'POST', body: formData })\n            .then(function(r) { return r.json(); })\n            .then(function(data) {\n                if (!data.success || !data.data || !data.data.exists) {\n                    removeBanner();\n                    return;\n                }\n\n                var d = data.data;\n                document.getElementById('client_id').value = d.client_id;\n\n                \/\/ Active\/paying customer \u2014 redirect to dashboard\n                if (d.status === 'active' || d.status === 'paused') {\n                    var dashLink = d.dashboard_url || '#';\n                    showSmartBanner('\ud83c\udf89', 'You already have an account with us!',\n                        '<a href=\"' + dashLink + '\" style=\"display: inline-block; margin-top: 4px; padding: 10px 20px; background: #6366F1; color: white; border-radius: 10px; font-weight: 600; text-decoration: none; font-size: 14px;\">Go to Your Dashboard \u2192<\/a>' +\n                        '<p style=\"margin-top: 8px; font-size: 13px; color: #6b7280;\">If you\\'d still like a new sample video, just continue below.<\/p>'\n                    );\n                    prefillForm(d);\n                    return;\n                }\n\n                \/\/ Already requested\/delivered \u2014 let them know\n                if (d.free_sample_status === 'delivered') {\n                    showSmartBanner('\u2705', 'Your free sample video has already been sent! Check your email for the delivery.');\n                    return;\n                }\n                if (d.free_sample_status === 'requested') {\n                    showSmartBanner('\u23f3', 'Your free sample is being created! Our team is working on your personalized video. You\\'ll receive it by email.');\n                    return;\n                }\n\n                \/\/ Pending verification \u2014 they filled everything but didn't verify\n                if (d.status === 'pending_verification' && d.onboarding_step >= 4) {\n                    showSmartBanner('\ud83d\udc4b', 'Welcome back! You\\'re almost done \u2014 just verify your email.',\n                        '<button type=\"button\" onclick=\"gveiSkipToVerification()\" style=\"margin-top: 4px; padding: 10px 20px; background: #6366F1; color: white; border: none; border-radius: 10px; font-weight: 600; cursor: pointer; font-size: 14px;\">Resend Verification Email \u2192<\/button>' +\n                        '<p style=\"margin-top: 8px; font-size: 13px; color: #6b7280;\">Or continue below to update your details first.<\/p>'\n                    );\n                    prefillForm(d);\n                    return;\n                }\n\n                \/\/ Lead that started but didn't finish \u2014 pre-fill and let them continue\n                if (d.onboarding_step > 1) {\n                    showSmartBanner('\ud83d\udc4b', 'Welcome back! We saved your progress. You can pick up where you left off.',\n                        '<button type=\"button\" onclick=\"gveiResumeFromStep(' + Math.min(d.onboarding_step, 4) + ')\" style=\"margin-top: 4px; padding: 10px 20px; background: #6366F1; color: white; border: none; border-radius: 10px; font-weight: 600; cursor: pointer; font-size: 14px;\">Continue Where I Left Off \u2192<\/button>'\n                    );\n                    prefillForm(d);\n                    return;\n                }\n\n                \/\/ Existing lead at step 1 \u2014 just pre-fill\n                showSmartBanner('\ud83d\udc4b', 'Welcome back! We found your info and filled it in for you.');\n                prefillForm(d);\n            })\n            .catch(function() { \/* fail silently *\/ });\n    }\n\n    function prefillForm(d) {\n        if (d.name) { var n = document.querySelector('[name=\"name\"]'); if (n) n.value = d.name; }\n        if (d.phone) { var p = document.querySelector('[name=\"phone\"]'); if (p) p.value = d.phone; }\n        if (d.primary_zip) { var z = document.querySelector('[name=\"primary_zip\"]'); if (z) z.value = d.primary_zip; }\n        if (d.secondary_zip) {\n            var secInputs = document.querySelectorAll('[name=\"secondary_zips[]\"]');\n            if (secInputs.length > 0) secInputs[0].value = d.secondary_zip;\n        }\n        if (d.tertiary_zip) {\n            var secInputs2 = document.querySelectorAll('[name=\"secondary_zips[]\"]');\n            if (secInputs2.length < 2) {\n                window.addSecondaryZip && window.addSecondaryZip();\n            }\n            secInputs2 = document.querySelectorAll('[name=\"secondary_zips[]\"]');\n            if (secInputs2.length > 1) secInputs2[1].value = d.tertiary_zip;\n        }\n        if (d.photo_url) {\n            var preview = document.querySelector('.gvei-photo-preview img');\n            var placeholder = document.querySelector('.gvei-photo-placeholder');\n            if (preview) { preview.src = d.photo_url; preview.style.display = 'block'; }\n            if (placeholder) placeholder.style.display = 'none';\n        }\n        if (d.voice_mode && d.voice_library_id) {\n            var card = document.querySelector('.gvei-voice-card[data-voice-id=\"' + d.voice_library_id + '\"]');\n            if (card) card.click();\n        }\n    }\n\n    window.gveiSkipToVerification = function() {\n        goToStep(4);\n    };\n\n    window.gveiResumeFromStep = function(step) {\n        goToStep(step);\n    };\n\n    function ensureClientExists(callback) {\n        var clientId = document.getElementById('client_id').value;\n        if (clientId && clientId !== '0') {\n            callback(clientId);\n            return;\n        }\n        var form = document.getElementById('gvei-fs-form');\n        var formData = new FormData(form);\n        formData.set('action', 'gvei_free_sample_autosave');\n        formData.set('step', 1);\n        formData.set('_wpnonce', nonce);\n\n        fetch(ajaxUrl, { method: 'POST', body: formData })\n            .then(function(r) { return r.json(); })\n            .then(function(data) {\n                if (data.success && data.data && data.data.client_id) {\n                    document.getElementById('client_id').value = data.data.client_id;\n                    callback(data.data.client_id);\n                } else {\n                    alert('Please fill in your name and email first (Step 1).');\n                }\n            })\n            .catch(function() {\n                alert('Connection error. Please try again.');\n            });\n    }\n\n    function showSaved() {\n        var el = document.getElementById('saving-indicator');\n        el.classList.add('show');\n        setTimeout(function() { el.classList.remove('show'); }, 1500);\n    }\n\n    \/\/ === SUBMIT \/ VERIFY ===\n    window.submitFreeSampleRequest = function() {\n        var btn = document.getElementById('submit-request-btn');\n        btn.disabled = true;\n        btn.innerHTML = 'Sending verification...';\n\n        var formData = new FormData(document.getElementById('gvei-fs-form'));\n        formData.set('action', 'gvei_free_sample_send_verification');\n        formData.set('_wpnonce', nonce);\n        var emailEl = document.getElementById('confirm-email-input');\n        if (emailEl) formData.set('email', emailEl.value);\n\n        fetch(ajaxUrl, { method: 'POST', body: formData })\n            .then(function(r) { return r.json(); })\n            .then(function(data) {\n                if (data.success) {\n                    document.getElementById('verify-email-display').textContent = emailEl ? emailEl.value : '';\n                    goToStep(5);\n                } else {\n                    alert(data.data && data.data.message ? data.data.message : 'Something went wrong. Please try again.');\n                    btn.disabled = false;\n                    btn.innerHTML = 'Submit My Request <span>\u2192<\/span>';\n                }\n            })\n            .catch(function() {\n                alert('Network error. Please try again.');\n                btn.disabled = false;\n                btn.innerHTML = 'Submit My Request <span>\u2192<\/span>';\n            });\n    };\n\n    window.resendVerification = function() {\n        submitFreeSampleRequest();\n    };\n\n    \/\/ === PHOTO CROP + HEIC ===\n    var photoCropper = null;\n    var cropModal = null;\n    var cropImage = null;\n\n    document.addEventListener('DOMContentLoaded', function() {\n        cropModal = document.getElementById('crop-modal');\n        cropImage = document.getElementById('crop-image');\n        var cropCancel = document.getElementById('crop-cancel');\n        var cropSave = document.getElementById('crop-save');\n        var zoomInBtn = document.getElementById('zoom-in');\n        var zoomOutBtn = document.getElementById('zoom-out');\n\n        if (zoomInBtn) zoomInBtn.onclick = function() { if (photoCropper) photoCropper.zoom(0.1); };\n        if (zoomOutBtn) zoomOutBtn.onclick = function() { if (photoCropper) photoCropper.zoom(-0.1); };\n\n        if (cropCancel) {\n            cropCancel.onclick = function() {\n                if (cropModal) cropModal.classList.remove('active');\n                if (photoCropper) { photoCropper.destroy(); photoCropper = null; }\n                var photoInput = document.getElementById('fs-photo-input');\n                if (photoInput) photoInput.value = '';\n            };\n        }\n\n        if (cropSave) {\n            cropSave.onclick = function() {\n                if (photoCropper) {\n                    var canvas = photoCropper.getCroppedCanvas({ width: 400, height: 400, imageSmoothingEnabled: true, imageSmoothingQuality: 'high' });\n                    var croppedDataUrl = canvas.toDataURL('image\/jpeg', 0.9);\n                    var preview = document.getElementById('photo-preview');\n                    if (preview) preview.innerHTML = '<img decoding=\"async\" src=\"' + croppedDataUrl + '\" alt=\"Profile\">';\n                    var croppedInput = document.getElementById('agent-photo-cropped');\n                    if (croppedInput) croppedInput.value = croppedDataUrl;\n                    document.getElementById('agent-photo-base64').value = croppedDataUrl;\n                    if (cropModal) cropModal.classList.remove('active');\n                    photoCropper.destroy();\n                    photoCropper = null;\n                }\n            };\n        }\n\n        if (cropModal) {\n            cropModal.onclick = function(e) {\n                if (e.target === cropModal && cropCancel) cropCancel.onclick();\n            };\n        }\n\n        \/\/ === VOICE INPUT TOGGLE (Record \/ Upload tabs) ===\n        var toggleBtns = document.querySelectorAll('.gvei-toggle-btn');\n        toggleBtns.forEach(function(btn) {\n            btn.addEventListener('click', function() {\n                var inputType = this.getAttribute('data-input');\n                toggleBtns.forEach(function(b) { b.classList.remove('active'); });\n                this.classList.add('active');\n                var recordPanel = document.getElementById('record-panel');\n                var uploadPanel = document.getElementById('upload-panel');\n                if (recordPanel) recordPanel.style.display = (inputType === 'record') ? 'block' : 'none';\n                if (uploadPanel) uploadPanel.style.display = (inputType === 'upload') ? 'block' : 'none';\n            });\n        });\n\n        \/\/ === VOICE MODE SELECTION (Own vs Preset) ===\n        document.querySelectorAll('.gvei-voice-mode-option').forEach(function(option) {\n            option.addEventListener('click', function() {\n                var mode = this.getAttribute('data-mode');\n                if (!mode) return;\n                document.getElementById('voice-mode-input').value = mode;\n                document.querySelectorAll('.gvei-voice-mode-option').forEach(function(o) { o.classList.remove('selected'); });\n                this.classList.add('selected');\n\n                var customPanel = document.getElementById('custom-voice-panel');\n                var presetPanel = document.getElementById('preset-voice-panel');\n\n                if (mode === 'clone') {\n                    if (customPanel) customPanel.style.display = '';\n                    if (presetPanel) presetPanel.style.display = 'none';\n                } else if (mode === 'preset') {\n                    if (customPanel) customPanel.style.display = 'none';\n                    if (presetPanel) presetPanel.style.display = '';\n                }\n            });\n        });\n\n        \/\/ === VOICE FILTER (All \/ Female \/ Male) ===\n        document.querySelectorAll('.gvei-filter-btn').forEach(function(btn) {\n            btn.addEventListener('click', function() {\n                var filter = this.getAttribute('data-filter');\n                document.querySelectorAll('.gvei-filter-btn').forEach(function(b) { b.classList.remove('active'); });\n                this.classList.add('active');\n                filterVoices(filter);\n            });\n        });\n\n        \/\/ === VOICE CARD CLICK (select) + PLAY BUTTON ===\n        document.querySelectorAll('.gvei-voice-card').forEach(function(card) {\n            card.addEventListener('click', function(e) {\n                if (e.target.closest('.gvei-voice-play')) return;\n                var voiceId = this.getAttribute('data-voice-id');\n                if (voiceId) selectVoicePreset(voiceId);\n            });\n\n            var playBtn = card.querySelector('.gvei-voice-play');\n            if (playBtn) {\n                playBtn.addEventListener('click', function(e) {\n                    e.stopPropagation();\n                    var voiceId = card.getAttribute('data-voice-id');\n                    if (voiceId) previewVoice(voiceId);\n                });\n            }\n        });\n\n        \/\/ === UPLOAD AREA CLICK\/DRAG HANDLERS ===\n        var uploadArea = document.getElementById('voice-upload-area');\n        var voiceFileInput = document.getElementById('voice-file-input');\n        if (uploadArea && voiceFileInput) {\n            uploadArea.addEventListener('click', function() { voiceFileInput.click(); });\n            uploadArea.addEventListener('dragover', function(e) { e.preventDefault(); uploadArea.style.borderColor = 'var(--gvei-primary)'; uploadArea.style.background = 'var(--gvei-primary-soft)'; });\n            uploadArea.addEventListener('dragleave', function() { uploadArea.style.borderColor = '#d1d5db'; uploadArea.style.background = ''; });\n            uploadArea.addEventListener('drop', function(e) {\n                e.preventDefault();\n                uploadArea.style.borderColor = '#d1d5db';\n                uploadArea.style.background = '';\n                if (e.dataTransfer.files.length > 0) {\n                    voiceFileInput.files = e.dataTransfer.files;\n                    gveiHandleUploadFile(e.dataTransfer.files[0]);\n                }\n            });\n            voiceFileInput.addEventListener('change', function() {\n                if (this.files && this.files[0]) gveiHandleUploadFile(this.files[0]);\n            });\n        }\n    });\n\n    \/\/ === PHOTO CROPPER HELPERS ===\n    function loadImageIntoCropper(imageFile) {\n        var reader = new FileReader();\n        reader.onload = function(ev) {\n            if (cropImage && cropModal) {\n                cropImage.src = ev.target.result;\n                cropModal.classList.add('active');\n                cropImage.onload = function() {\n                    if (photoCropper) photoCropper.destroy();\n                    if (typeof Cropper !== 'undefined') {\n                        photoCropper = new Cropper(cropImage, {\n                            aspectRatio: 1, viewMode: 1, dragMode: 'move', autoCropArea: 0.8,\n                            cropBoxMovable: false, cropBoxResizable: false, background: false,\n                            guides: false, center: true, highlight: false, responsive: true,\n                            zoomOnWheel: true, zoomOnTouch: true, wheelZoomRatio: 0.1,\n                            minCropBoxWidth: 100, minCropBoxHeight: 100\n                        });\n                    }\n                };\n            }\n        };\n        reader.readAsDataURL(imageFile);\n    }\n\n    function loadBase64IntoCropper(base64) {\n        if (cropImage && cropModal) {\n            cropImage.src = base64;\n            cropModal.classList.add('active');\n            cropImage.onload = function() {\n                if (photoCropper) photoCropper.destroy();\n                if (typeof Cropper !== 'undefined') {\n                    photoCropper = new Cropper(cropImage, {\n                        aspectRatio: 1, viewMode: 1, dragMode: 'move', autoCropArea: 0.8,\n                        cropBoxMovable: false, cropBoxResizable: false, background: false,\n                        guides: false, center: true, highlight: false, responsive: true,\n                        zoomOnWheel: true, zoomOnTouch: true, wheelZoomRatio: 0.1,\n                        minCropBoxWidth: 100, minCropBoxHeight: 100\n                    });\n                }\n            };\n        }\n    }\n\n    window.handlePhotoSelect = function(input) {\n        if (!input.files || !input.files[0]) return;\n        var file = input.files[0];\n        var fileName = file.name.toLowerCase();\n        var isHeic = fileName.endsWith('.heic') || fileName.endsWith('.heif') || file.type === 'image\/heic' || file.type === 'image\/heif';\n\n        if (isHeic) {\n            if (cropModal) {\n                cropModal.classList.add('active');\n                var cropArea = cropModal.querySelector('.gvei-crop-area');\n                if (cropArea) {\n                    cropArea.innerHTML = '<div class=\"gvei-convert-spinner\"><div class=\"spinner-ring\"><\/div><div class=\"spinner-text\">Converting image...<\/div><\/div>';\n                }\n            }\n            var formData = new FormData();\n            formData.append('action', 'gvei_convert_heic');\n            formData.append('image', file);\n            fetch(ajaxUrl, { method: 'POST', body: formData })\n                .then(function(r) { return r.json(); })\n                .then(function(data) {\n                    var cropArea = cropModal ? cropModal.querySelector('.gvei-crop-area') : null;\n                    if (cropArea) cropArea.innerHTML = '<img decoding=\"async\" id=\"crop-image\" src=\"\" alt=\"Crop preview\" style=\"max-width:100%;max-height:350px;\">';\n                    cropImage = document.getElementById('crop-image');\n                    if (data.success && data.data && data.data.jpeg_data) {\n                        loadBase64IntoCropper('data:image\/jpeg;base64,' + data.data.jpeg_data);\n                    } else {\n                        var msg = (data.data && data.data.message) ? data.data.message : 'Could not convert this image format. Please try a JPG or PNG file.';\n                        alert(msg);\n                        if (cropModal) cropModal.classList.remove('active');\n                    }\n                })\n                .catch(function() {\n                    alert('Could not convert this image format. Please try a JPG or PNG file.');\n                    if (cropModal) cropModal.classList.remove('active');\n                });\n        } else {\n            loadImageIntoCropper(file);\n        }\n    };\n\n    \/\/ === ZIP HELPERS ===\n    window.addSecondaryZip = function() {\n        var container = document.getElementById('secondary-zips-container');\n        var div = document.createElement('div');\n        div.className = 'gvei-zip-secondary-item';\n        div.innerHTML = '<input type=\"text\" name=\"secondary_zips[]\" class=\"gvei-input\" placeholder=\"ZIP Code\" maxlength=\"5\" pattern=\"[0-9]{5}\" inputmode=\"numeric\">';\n        container.appendChild(div);\n    };\n\n    \/\/ === EMAIL CONFIRM ===\n    window.editConfirmEmail = function() {\n        document.getElementById('edit-email-area').style.display = 'block';\n    };\n    window.saveConfirmEmail = function() {\n        var val = document.getElementById('confirm-email-input').value;\n        document.getElementById('confirm-email-display').textContent = val;\n        document.getElementById('edit-email-area').style.display = 'none';\n        document.getElementById('fs-email-input').value = val;\n    };\n\n    \/\/ === VOICE RECORDING (Full flow with countdown, timer, progress, review) ===\n    var gveiMediaRecorder = null;\n    var gveiAudioChunks = [];\n    var gveiRecordingTimer = null;\n    var gveiRecordingSeconds = 0;\n    var gveiIsRecording = false;\n    var gveiPendingAudioBlob = null;\n    var gveiMediaStream = null;\n\n    window.gveiStartRecordingFlow = function() {\n        ensureClientExists(function() {\n            if (!navigator.mediaDevices) {\n                alert('Your browser does not support audio recording. Please use a modern browser or upload an audio file instead.');\n                return;\n            }\n\n            navigator.mediaDevices.getUserMedia({\n                audio: { echoCancellation: true, noiseSuppression: true, sampleRate: 44100 }\n            })\n            .then(function(stream) {\n                gveiMediaStream = stream;\n\n                var options = {};\n                if (MediaRecorder.isTypeSupported('audio\/webm;codecs=opus')) {\n                    options.mimeType = 'audio\/webm;codecs=opus';\n                } else if (MediaRecorder.isTypeSupported('audio\/webm')) {\n                    options.mimeType = 'audio\/webm';\n                } else if (MediaRecorder.isTypeSupported('audio\/mp4')) {\n                    options.mimeType = 'audio\/mp4';\n                }\n\n                gveiMediaRecorder = new MediaRecorder(stream, options);\n                gveiAudioChunks = [];\n\n                gveiMediaRecorder.ondataavailable = function(e) {\n                    gveiAudioChunks.push(e.data);\n                };\n\n                gveiMediaRecorder.onstop = function() {\n                    var actualMimeType = gveiMediaRecorder.mimeType || 'audio\/webm';\n                    gveiPendingAudioBlob = new Blob(gveiAudioChunks, { type: actualMimeType });\n                    gveiShowReviewScreen();\n                };\n\n                var nameInput = document.querySelector('input[name=\"name\"]');\n                var scriptName = document.getElementById('script-agent-name');\n                if (nameInput && scriptName) {\n                    var enteredName = nameInput.value.trim();\n                    if (enteredName) {\n                        scriptName.textContent = enteredName.split(' ')[0];\n                    }\n                }\n\n                var startArea = document.getElementById('record-start-area');\n                var countdownArea = document.getElementById('countdown-area');\n                if (startArea) startArea.style.display = 'none';\n                if (countdownArea) countdownArea.style.display = 'block';\n\n                var countdownNum = 4;\n                var countdownEl = document.getElementById('countdown-number');\n                gveiIsRecording = false;\n                gveiRecordingSeconds = 0;\n\n                var countdownInterval = setInterval(function() {\n                    countdownNum--;\n                    if (countdownNum === 1) {\n                        gveiMediaRecorder.start();\n                        gveiIsRecording = true;\n                    }\n                    if (countdownNum > 0) {\n                        if (countdownEl) countdownEl.textContent = countdownNum;\n                    } else {\n                        clearInterval(countdownInterval);\n                        if (countdownArea) countdownArea.style.display = 'none';\n                        var activeArea = document.getElementById('recording-active-area');\n                        if (activeArea) activeArea.style.display = 'block';\n\n                        var maxRecordingSeconds = 180;\n                        gveiRecordingTimer = setInterval(function() {\n                            gveiRecordingSeconds++;\n                            gveiUpdateRecordingTime();\n                            gveiUpdateRecordingProgress(gveiRecordingSeconds, maxRecordingSeconds);\n                            if (gveiRecordingSeconds >= maxRecordingSeconds) {\n                                gveiStopRecordingFlow();\n                            }\n                        }, 1000);\n                    }\n                }, 1000);\n            })\n            .catch(function() {\n                alert('Could not access microphone. Please check permissions or upload an audio file instead.');\n            });\n        });\n    };\n\n    window.gveiStopRecordingFlow = function() {\n        if (gveiMediaRecorder) {\n            if (gveiMediaRecorder.state === 'recording') {\n                gveiMediaRecorder.stop();\n            }\n        }\n        if (gveiRecordingTimer) {\n            clearInterval(gveiRecordingTimer);\n            gveiRecordingTimer = null;\n        }\n        if (gveiMediaStream) {\n            gveiMediaStream.getTracks().forEach(function(track) { track.stop(); });\n            gveiMediaStream = null;\n        }\n        gveiIsRecording = false;\n    };\n\n    function gveiShowReviewScreen() {\n        var activeArea = document.getElementById('recording-active-area');\n        var reviewArea = document.getElementById('record-review-area');\n        var audioPlayer = document.getElementById('recorded-audio-review');\n        var durationBadge = document.getElementById('recording-duration-badge');\n\n        if (activeArea) activeArea.style.display = 'none';\n        if (reviewArea) reviewArea.style.display = 'block';\n\n        if (audioPlayer) {\n            audioPlayer.src = URL.createObjectURL(gveiPendingAudioBlob);\n        }\n\n        if (durationBadge) {\n            var mins = Math.floor(gveiRecordingSeconds \/ 60);\n            var secs = gveiRecordingSeconds % 60;\n            var quality = '';\n            if (gveiRecordingSeconds >= 90) {\n                quality = '\u2713\u2713\u2713 Excellent'; durationBadge.style.background = '#dcfce7'; durationBadge.style.color = '#166534';\n            } else if (gveiRecordingSeconds >= 60) {\n                quality = '\u2713\u2713 Great'; durationBadge.style.background = '#dcfce7'; durationBadge.style.color = '#166534';\n            } else if (gveiRecordingSeconds >= 30) {\n                quality = '\u2713 Good'; durationBadge.style.background = '#fef3c7'; durationBadge.style.color = '#92400e';\n            } else {\n                quality = '\u26a0\ufe0f Short'; durationBadge.style.background = '#fee2e2'; durationBadge.style.color = '#991b1b';\n            }\n            durationBadge.textContent = quality + ' \u2022 ' + mins + ':' + (secs < 10 ? '0' : '') + secs;\n        }\n    }\n\n    window.gveiReRecord = function() {\n        gveiPendingAudioBlob = null;\n        gveiRecordingSeconds = 0;\n\n        var timerEl = document.getElementById('record-timer');\n        if (timerEl) timerEl.textContent = '0:00';\n\n        var countdownEl = document.getElementById('countdown-number');\n        if (countdownEl) countdownEl.textContent = '4';\n\n        var progressBar = document.getElementById('recording-progress-bar');\n        var progressText = document.getElementById('recording-progress-text');\n        if (progressBar) { progressBar.style.width = '0%'; progressBar.style.background = 'linear-gradient(90deg, #ef4444, #f97316)'; }\n        if (progressText) { progressText.textContent = 'Keep going! Need at least 10 seconds.'; progressText.style.color = '#ef4444'; }\n\n        var startArea = document.getElementById('record-start-area');\n        var countdownArea = document.getElementById('countdown-area');\n        var activeArea = document.getElementById('recording-active-area');\n        var reviewArea = document.getElementById('record-review-area');\n        if (startArea) startArea.style.display = 'block';\n        if (countdownArea) countdownArea.style.display = 'none';\n        if (activeArea) activeArea.style.display = 'none';\n        if (reviewArea) reviewArea.style.display = 'none';\n    };\n\n    window.gveiSubmitVoice = function() {\n        if (!gveiPendingAudioBlob) {\n            alert('No recording found. Please try again.');\n            return;\n        }\n\n        var reviewArea = document.getElementById('record-review-area');\n        if (reviewArea) {\n            reviewArea.innerHTML = '<div style=\"text-align: center; padding: 40px 20px;\">' +\n                '<div class=\"gvei-spinner\" style=\"margin: 0 auto 16px;\"><\/div>' +\n                '<p style=\"color: #64748b;\">Saving your voice...<\/p>' +\n            '<\/div>';\n        }\n\n        var clientId = document.getElementById('client_id').value;\n        if (!clientId || clientId === '' || clientId === '0') {\n            gveiReRecord();\n            alert('Please fill in your details first (Step 1).');\n            return;\n        }\n\n        var nameInput = document.querySelector('input[name=\"name\"]');\n        var agentName = nameInput ? (nameInput.value.trim().split(' ')[0] || 'your name') : 'your name';\n\n        var transcriptText = \"Hi, my name is \" + agentName + \". I'm reading this so you can hear how I normally speak. \" +\n            \"Here's what just got listed in this neighborhood. This home has four bedrooms, three bathrooms, and about two thousand four hundred square feet of space. It feels open, bright, and very welcoming the moment you walk in. \" +\n            \"The kitchen is clean and modern, with a large island, new appliances, and lots of light. It flows right into the living room, which makes the space feel big and comfortable. This looks amazing. \" +\n            \"The primary bedroom is quiet and spacious. The bathroom has a double sink, a walk-in shower, and a soaking tub. Everything feels simple, fresh, and easy to enjoy.\";\n\n        var formData = new FormData();\n        formData.append('action', 'gvei_free_sample_upload_voice');\n        formData.append('_wpnonce', nonce);\n        formData.append('client_id', clientId);\n        formData.append('duration', gveiRecordingSeconds);\n        formData.append('voice_sample_text', transcriptText);\n\n        var ext = 'webm';\n        if (gveiPendingAudioBlob.type.indexOf('mp4') !== -1) ext = 'm4a';\n        if (gveiPendingAudioBlob.type.indexOf('mpeg') !== -1) ext = 'mp3';\n\n        formData.append('voice_file', gveiPendingAudioBlob, 'voice-sample.' + ext);\n\n        var xhr = new XMLHttpRequest();\n        xhr.open('POST', ajaxUrl, true);\n        xhr.onreadystatechange = function() {\n            if (xhr.readyState === 4) {\n                if (xhr.status === 200) {\n                    var response = null;\n                    try { response = JSON.parse(xhr.responseText); } catch(e) {\n                        alert('Server returned invalid response.');\n                        gveiReRecord();\n                        return;\n                    }\n                    if (response.success) {\n                        var voiceUrl = response.data ? response.data.url : '';\n                        document.getElementById('voice-sample-url-input').value = voiceUrl;\n                        gveiPendingAudioBlob = null;\n                        gveiShowVoiceSuccess(voiceUrl);\n                    } else {\n                        var errMsg = response.data ? (typeof response.data === 'string' ? response.data : JSON.stringify(response.data)) : 'Unknown error';\n                        alert('Error saving voice: ' + errMsg);\n                        gveiReRecord();\n                    }\n                } else {\n                    alert('Server error. Please try again.');\n                    gveiReRecord();\n                }\n            }\n        };\n        xhr.send(formData);\n    };\n\n    function gveiShowVoiceSuccess(audioUrl) {\n        var reviewArea = document.getElementById('record-review-area');\n        if (reviewArea) reviewArea.style.display = 'none';\n        var activeArea = document.getElementById('recording-active-area');\n        if (activeArea) activeArea.style.display = 'none';\n        var startArea = document.getElementById('record-start-area');\n        if (startArea) startArea.style.display = 'none';\n\n        var successArea = document.getElementById('record-success-area');\n        if (successArea) successArea.style.display = 'block';\n\n        var voiceModeInput = document.getElementById('voice-mode-input');\n        if (voiceModeInput) voiceModeInput.value = 'clone';\n    }\n\n    window.gveiResetToRecordStart = function() {\n        gveiPendingAudioBlob = null;\n        gveiRecordingSeconds = 0;\n        var timerEl = document.getElementById('record-timer');\n        if (timerEl) timerEl.textContent = '0:00';\n        var countdownEl = document.getElementById('countdown-number');\n        if (countdownEl) countdownEl.textContent = '4';\n        var startArea = document.getElementById('record-start-area');\n        var countdownArea = document.getElementById('countdown-area');\n        var activeArea = document.getElementById('recording-active-area');\n        var reviewArea = document.getElementById('record-review-area');\n        var successArea = document.getElementById('record-success-area');\n        if (startArea) startArea.style.display = 'block';\n        if (countdownArea) countdownArea.style.display = 'none';\n        if (activeArea) activeArea.style.display = 'none';\n        if (reviewArea) reviewArea.style.display = 'none';\n        if (successArea) successArea.style.display = 'none';\n    };\n\n    window.gveiShowRecordNewVoice = function() {\n        var savedSection = document.getElementById('saved-voice-section');\n        var newOptions = document.getElementById('new-voice-options');\n        if (savedSection) savedSection.style.display = 'none';\n        if (newOptions) newOptions.style.display = 'block';\n    };\n\n    function gveiUpdateRecordingTime() {\n        var timerEl = document.getElementById('record-timer');\n        if (!timerEl) return;\n        var mins = Math.floor(gveiRecordingSeconds \/ 60);\n        var secs = gveiRecordingSeconds % 60;\n        timerEl.textContent = mins + ':' + (secs < 10 ? '0' : '') + secs;\n    }\n\n    function gveiUpdateRecordingProgress(current, max) {\n        var progressBar = document.getElementById('recording-progress-bar');\n        var progressText = document.getElementById('recording-progress-text');\n        current = current || gveiRecordingSeconds;\n        max = max || 180;\n\n        if (progressText) {\n            if (current < 10) {\n                progressText.textContent = 'Keep going! Need at least 10 seconds. (' + (10 - current) + 's to go)';\n                progressText.style.color = '#ef4444';\n            } else if (current < 20) {\n                progressText.textContent = '\u2713 Good start! A few more seconds makes it even better.';\n                progressText.style.color = '#f59e0b';\n            } else if (current < 30) {\n                progressText.textContent = '\u2713\u2713 Great sample! You can stop or keep going.';\n                progressText.style.color = '#22c55e';\n            } else {\n                progressText.textContent = '\u2713\u2713\u2713 Excellent! Perfect voice sample.';\n                progressText.style.color = '#10b981';\n            }\n        }\n\n        if (progressBar) {\n            var percent = Math.min((current \/ max) * 100, 100);\n            progressBar.style.width = percent + '%';\n            if (current < 10) { progressBar.style.background = 'linear-gradient(90deg, #ef4444, #f97316)'; }\n            else if (current < 20) { progressBar.style.background = 'linear-gradient(90deg, #f97316, #eab308)'; }\n            else if (current < 30) { progressBar.style.background = 'linear-gradient(90deg, #eab308, #22c55e)'; }\n            else { progressBar.style.background = 'linear-gradient(90deg, #22c55e, #10b981)'; }\n        }\n    }\n\n    \/\/ === UPLOAD VOICE FILE ===\n    function gveiHandleUploadFile(file) {\n        if (!file) return;\n        var maxSize = 40 * 1024 * 1024;\n        if (file.size > maxSize) {\n            alert('File is too large. Maximum size is 40MB.');\n            return;\n        }\n\n        window.gveiPendingUploadFile = file;\n        var uploadArea = document.getElementById('voice-upload-area');\n        var uploadPreview = document.getElementById('upload-preview');\n        var filenameEl = document.getElementById('uploaded-filename');\n        var audioEl = document.getElementById('uploaded-audio');\n\n        if (uploadArea) uploadArea.style.display = 'none';\n        if (uploadPreview) uploadPreview.style.display = 'block';\n        if (filenameEl) filenameEl.textContent = file.name;\n        if (audioEl) audioEl.src = URL.createObjectURL(file);\n    }\n\n    window.gveiDiscardUpload = function() {\n        window.gveiPendingUploadFile = null;\n        var uploadArea = document.getElementById('voice-upload-area');\n        var uploadPreview = document.getElementById('upload-preview');\n        var voiceFileInput = document.getElementById('voice-file-input');\n        if (uploadArea) uploadArea.style.display = '';\n        if (uploadPreview) uploadPreview.style.display = 'none';\n        if (voiceFileInput) voiceFileInput.value = '';\n    };\n\n    window.gveiConfirmUpload = function() {\n        var file = window.gveiPendingUploadFile;\n        if (!file) { alert('No file selected.'); return; }\n\n        ensureClientExists(function(clientId) {\n            var formData = new FormData();\n            formData.append('action', 'gvei_free_sample_upload_voice');\n            formData.append('_wpnonce', nonce);\n            formData.append('client_id', clientId);\n            formData.append('voice_file', file, file.name || 'voice-upload.webm');\n\n            var uploadPreview = document.getElementById('upload-preview');\n            if (uploadPreview) {\n                uploadPreview.innerHTML = '<div style=\"text-align:center;padding:20px;\"><div class=\"gvei-spinner\" style=\"margin:0 auto 12px;\"><\/div><p style=\"color:#64748b;font-size:14px;\">Uploading voice...<\/p><\/div>';\n            }\n\n            fetch(ajaxUrl, { method: 'POST', body: formData })\n                .then(function(r) { return r.json(); })\n                .then(function(data) {\n                    if (data.success && data.data && data.data.url) {\n                        document.getElementById('voice-sample-url-input').value = data.data.url;\n                        window.gveiPendingUploadFile = null;\n                        gveiShowVoiceSuccess(data.data.url);\n                        var toggleBtns = document.querySelectorAll('.gvei-toggle-btn');\n                        toggleBtns.forEach(function(b) { b.classList.remove('active'); });\n                        toggleBtns[0].classList.add('active');\n                        var uploadPanel = document.getElementById('upload-panel');\n                        if (uploadPanel) uploadPanel.style.display = 'none';\n                        var recordPanel = document.getElementById('record-panel');\n                        if (recordPanel) recordPanel.style.display = 'block';\n                    } else {\n                        var msg = (data.data && data.data.message) ? data.data.message : 'Upload failed. Try again.';\n                        alert(msg);\n                        gveiDiscardUpload();\n                    }\n                })\n                .catch(function() {\n                    alert('Upload failed. Check connection and try again.');\n                    gveiDiscardUpload();\n                });\n        });\n    };\n\n    \/\/ Auto-upload when file is previewed and confirmed via the preview area\n    \/\/ Override the upload preview to include a submit button\n    var origHandleUpload = gveiHandleUploadFile;\n    gveiHandleUploadFile = function(file) {\n        origHandleUpload(file);\n        var uploadPreview = document.getElementById('upload-preview');\n        if (uploadPreview && !uploadPreview.querySelector('.gvei-confirm-upload-btn')) {\n            var confirmBtn = document.createElement('button');\n            confirmBtn.type = 'button';\n            confirmBtn.className = 'gvei-confirm-upload-btn';\n            confirmBtn.style.cssText = 'margin-top:12px;padding:12px 24px;border:none;background:linear-gradient(135deg,#8b5cf6,#6366f1);border-radius:30px;font-size:14px;font-weight:600;color:white;cursor:pointer;box-shadow:0 4px 12px rgba(99,102,241,0.3);';\n            confirmBtn.textContent = '\u2713 Use This Voice';\n            confirmBtn.onclick = function() { gveiConfirmUpload(); };\n            uploadPreview.appendChild(confirmBtn);\n        }\n    };\n\n    \/\/ === PRESET VOICE FUNCTIONS ===\n    var selectedVoicePreset = '';\n    var voiceAudio = null;\n    var currentPlayingVoiceId = null;\n\n    function selectVoicePreset(voiceId) {\n        selectedVoicePreset = voiceId;\n        document.querySelectorAll('.gvei-voice-card').forEach(function(card) {\n            card.classList.remove('selected');\n            if (card.getAttribute('data-voice-id') === voiceId) {\n                card.classList.add('selected');\n            }\n        });\n        var libraryIdInput = document.getElementById('voice-library-id-input');\n        if (libraryIdInput) libraryIdInput.value = voiceId;\n        var voiceModeInput = document.getElementById('voice-mode-input');\n        if (voiceModeInput) voiceModeInput.value = 'preset';\n    }\n\n    function previewVoice(voiceId) {\n        var card = document.querySelector('.gvei-voice-card[data-voice-id=\"' + voiceId + '\"]');\n        var btn = card ? card.querySelector('.gvei-voice-play') : null;\n        var sampleUrl = card ? card.getAttribute('data-sample') : null;\n\n        var isSameVoice = voiceAudio ? (currentPlayingVoiceId === voiceId) : false;\n        if (isSameVoice) {\n            if (voiceAudio.paused) {\n                voiceAudio.play();\n                if (btn) { btn.querySelector('.play-icon').textContent = '\u23f8'; btn.classList.add('playing'); }\n            } else {\n                voiceAudio.pause();\n                if (btn) { btn.querySelector('.play-icon').textContent = '\u25b6'; btn.classList.remove('playing'); }\n            }\n            return;\n        }\n\n        if (voiceAudio) { voiceAudio.pause(); voiceAudio = null; }\n        currentPlayingVoiceId = null;\n        document.querySelectorAll('.gvei-voice-play').forEach(function(b) {\n            b.querySelector('.play-icon').textContent = '\u25b6';\n            b.classList.remove('playing', 'loading');\n        });\n\n        if (!sampleUrl) { alert('No audio sample available for this voice.'); return; }\n\n        if (btn) btn.classList.add('loading');\n\n        voiceAudio = new Audio(sampleUrl);\n        currentPlayingVoiceId = voiceId;\n\n        voiceAudio.oncanplaythrough = function() {\n            voiceAudio.play();\n            if (btn) { btn.querySelector('.play-icon').textContent = '\u23f8'; btn.classList.remove('loading'); btn.classList.add('playing'); }\n        };\n\n        voiceAudio.onended = function() {\n            if (btn) { btn.querySelector('.play-icon').textContent = '\u25b6'; btn.classList.remove('playing'); }\n            currentPlayingVoiceId = null;\n        };\n\n        voiceAudio.onerror = function() {\n            if (btn) { btn.querySelector('.play-icon').textContent = '\u25b6'; btn.classList.remove('loading'); }\n            alert('Could not play voice sample. Please try again.');\n        };\n\n        voiceAudio.load();\n    }\n\n    function filterVoices(filter) {\n        document.querySelectorAll('.gvei-voice-card').forEach(function(card) {\n            if (filter === 'all') {\n                card.classList.remove('hidden');\n                card.style.display = '';\n            } else {\n                var gender = card.getAttribute('data-gender');\n                if (gender === filter) {\n                    card.classList.remove('hidden');\n                    card.style.display = '';\n                } else {\n                    card.classList.add('hidden');\n                    card.style.display = 'none';\n                }\n            }\n        });\n    }\n\n})();\n<\/script>\n<script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/cropperjs\/1.6.1\/cropper.min.js\"><\/script>\n<\/body>\n<\/html>\n\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"disabled","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"class_list":["post-86","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/gogoit.com\/video\/wp-json\/wp\/v2\/pages\/86","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gogoit.com\/video\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/gogoit.com\/video\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/gogoit.com\/video\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gogoit.com\/video\/wp-json\/wp\/v2\/comments?post=86"}],"version-history":[{"count":2,"href":"https:\/\/gogoit.com\/video\/wp-json\/wp\/v2\/pages\/86\/revisions"}],"predecessor-version":[{"id":88,"href":"https:\/\/gogoit.com\/video\/wp-json\/wp\/v2\/pages\/86\/revisions\/88"}],"wp:attachment":[{"href":"https:\/\/gogoit.com\/video\/wp-json\/wp\/v2\/media?parent=86"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}