﻿{"id":24168,"date":"2024-09-10T12:10:27","date_gmt":"2024-09-10T18:10:27","guid":{"rendered":"https:\/\/runnymedesociety.ca\/?page_id=24168"},"modified":"2026-01-27T20:30:29","modified_gmt":"2026-01-28T03:30:29","slug":"member-registration","status":"publish","type":"page","link":"https:\/\/runnymedesociety.ca\/fr\/member-registration\/","title":{"rendered":"Member Registration"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"24168\" class=\"elementor elementor-24168\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-d82a73e e-flex e-con-boxed e-con e-parent\" data-id=\"d82a73e\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;jet_parallax_layout_list&quot;:[]}\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-6e5ac41 elementor-widget elementor-widget-heading\" data-id=\"6e5ac41\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\"><div><span data-canva-clipboard=\"ewAiAGEAIgA6ADUALAAiAGgAIgA6ACIAdwB3AHcALgBjAGEAbgB2AGEALgBjAG8AbQAiACwAIgBjACIAOgAiAEQAQQBHAGQAbgBnAHkAMQBqAEYASQAiACwAIgBpACIAOgAiAG0AVQByAGUAMABzAHMANgA5ADIAVABHAE0ANgBFAGYAbQBrADQAaQBnAEEAIgAsACIAYgAiADoAMQA3ADMAOAA2ADkAMwAyADkAMAA3ADgANQAsACIAQQA\/ACIAOgAiAEIAIgAsACIAQQAiADoAWwB7ACIAMgAiADoAewAiAEEAIgA6ACIAIgB9ACwAIgBBACIAOgAyADMAMAAuADUANwA0ADgANQA0ADgANgA1ADgAMAAwADgAMwAsACIAQgAiADoAOAAxAC4ANgAwADAAMAAwADAAMAAwADAAMAAwADAAMAA4ACwAIgBEACIAOgA2ADUAMgAuADgALAAiAEMAIgA6ADcAMwAuADkAMQA5ADkAOAAyACwAIgBBAD8AIgA6ACIASwAiACwAIgBhACIAOgB7ACIAQQAiADoAWwB7ACIAQQA\/ACIAOgAiAEEAIgAsACIAQQAiADoAIgBUAGgAZQAgAG8AbgBsAHkAIABvAGYAZgBpAGMAaQBhAGwAIAB3AGEAeQAgAHQAbwAgAGoAbwBpAG4AIAB0AGgAZQAgAFIAdQBuAG4AeQBtAGUAZABlACAAbgBlAHQAdwBvAHIAawAiAH0ALAB7ACIAQQA\/ACIAOgAiAEIAIgAsACIAQQAiADoAMwA0ADcAfQAsAHsAIgBBAD8AIgA6ACIAQQAiACwAIgBBACIAOgAiAFwAbgAiAH0AXQAsACIAQgAiADoAWwB7ACIAQQA\/ACIAOgAiAEEAIgAsACIAQQAiADoAewAiAGYAbwBuAHQALQBmAGEAbQBpAGwAeQAiADoAewAiAEIAIgA6ACIAWQBBAEUAMwA0AHUATABYADgASQBFACwAMAAiAH0ALAAiAHQAZQB4AHQALQBhAGwAaQBnAG4AIgA6AHsAIgBCACIAOgAiAGMAZQBuAHQAZQByACIAfQAsACIAYwBvAGwAbwByACIAOgB7ACIAQgAiADoAIgAjAGYAMgAwADAAMAAwACIAfQAsACIAbABlAGEAZABpAG4AZwAiADoAewAiAEIAIgA6ACIAMQAxADQAMAAuADAAIgB9ACwAIgBsAGkAcwB0AC0AbABlAHYAZQBsACIAOgB7ACIAQgAiADoAIgAxAC4AMAAiAH0ALAAiAGYAbwBuAHQALQBzAGkAegBlACIAOgB7ACIAQgAiADoAIgAzADEALgA5ADkAOQA3ACIAfQB9AH0ALAB7ACIAQQA\/ACIAOgAiAEIAIgAsACIAQQAiADoANQAxAH0ALAB7ACIAQQA\/ACIAOgAiAEEAIgAsACIAQQAiADoAewAiAGwAaQBzAHQALQBsAGUAdgBlAGwAIgA6AHsAfQB9AH0ALAB7ACIAQQA\/ACIAOgAiAEIAIgAsACIAQQAiADoAMQB9ACwAewAiAEEAPwAiADoAIgBBACIALAAiAEEAIgA6AHsAIgBsAGkAcwB0AC0AbABlAHYAZQBsACIAOgB7ACIAQgAiADoAIgAxAC4AMAAiAH0ALAAiAGMAbwBsAG8AcgAiADoAewAiAEIAIgA6ACIAIwAwADAAMAAwADAAMAAiAH0ALAAiAGYAbwBuAHQALQB3AGUAaQBnAGgAdAAiADoAewAiAEIAIgA6ACIAbgBvAHIAbQBhAGwAIgB9ACwAIgBmAG8AbgB0AC0AcwB0AHkAbABlACIAOgB7ACIAQgAiADoAIgBuAG8AcgBtAGEAbAAiAH0ALAAiAGYAbwBuAHQALQBmAGEAbQBpAGwAeQAiADoAewAiAEIAIgA6ACIAWQBBAEUAMwA0AGsATQBPAGMAQwBjACwAMAAiAH0AfQB9ACwAewAiAEEAPwAiADoAIgBCACIALAAiAEEAIgA6ADIAfQAsAHsAIgBBAD8AIgA6ACIAQQAiACwAIgBBACIAOgB7ACIAbABpAHMAdAAtAG0AYQByAGsAZQByACIAOgB7ACIAQgAiADoAIgBkAGkAcwBjACIAfQAsACIAaABlAGEAZAAtAGkAbgBkAGUAbgB0ACIAOgB7ACIAQgAiADoAIgAxADcAMAAwAC4AMAAiAH0ALAAiAGwAZQBhAGQAaQBuAGcAIgA6AHsAfQAsACIAdABlAHgAdAAtAGEAbABpAGcAbgAiADoAewB9AH0AfQAsAHsAIgBBAD8AIgA6ACIAQgAiACwAIgBBACIAOgAzADQANAB9ACwAewAiAEEAPwAiADoAIgBBACIALAAiAEEAIgA6AHsAIgBsAGkAcwB0AC0AbQBhAHIAawBlAHIAIgA6AHsAfQAsACIAZgBvAG4AdAAtAGYAYQBtAGkAbAB5ACIAOgB7ACIAQgAiADoAIgBZAEEARQAzADQAdQBMAFgAOABJAEUALAAwACIAfQAsACIAYwBvAGwAbwByACIAOgB7ACIAQgAiADoAIgAjAGYAMgAwADAAMAAwACIAfQAsACIAaABlAGEAZAAtAGkAbgBkAGUAbgB0ACIAOgB7AH0ALAAiAHQAZQB4AHQALQBhAGwAaQBnAG4AIgA6AHsAIgBCACIAOgAiAGMAZQBuAHQAZQByACIAfQAsACIAbABlAGEAZABpAG4AZwAiADoAewAiAEIAIgA6ACIAMQAxADQAMAAuADAAIgB9ACwAIgBsAGkAcwB0AC0AbABlAHYAZQBsACIAOgB7AH0AfQB9ACwAewAiAEEAPwAiADoAIgBCACIALAAiAEEAIgA6ADEAfQAsAHsAIgBBAD8AIgA6ACIAQQAiACwAIgBBACIAOgB7ACIAZgBvAG4AdAAtAHMAaQB6AGUAIgA6AHsAfQAsACIAZgBvAG4AdAAtAGYAYQBtAGkAbAB5ACIAOgB7AH0ALAAiAGYAbwBuAHQALQB3AGUAaQBnAGgAdAAiADoAewB9ACwAIgBjAG8AbABvAHIAIgA6AHsAfQAsACIAZgBvAG4AdAAtAHMAdAB5AGwAZQAiADoAewB9ACwAIgB0AGUAeAB0AC0AYQBsAGkAZwBuACIAOgB7AH0ALAAiAGwAZQBhAGQAaQBuAGcAIgA6AHsAfQB9AH0AXQB9ACwAIgBiACIAOgB7ACIAQQAiADoAWwAzADQALAAxADgAXQB9ACwAIgBkACIAOgAiAEEAIgAsACIAZwAiADoAZgBhAGwAcwBlACwAIgBoACIAOgAiAEEAIgB9AF0ALAAiAEIAIgA6ADgAMQA2ACwAIgBDACIAOgAxADAANQA2AH0A\"><\/span><p>The only official way to join the Runnymede network<span style=\"color: var( --e-global-color-primary );font-family: var( --e-global-typography-primary-font-family ), Sans-serif;font-weight: var( --e-global-typography-primary-font-weight );letter-spacing: 0px;text-align: inherit\"><\/span><\/p><\/div><\/h3>\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-79b8760 elementor-widget elementor-widget-text-editor\" data-id=\"79b8760\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<div><ul><li><span style=\"color: var( --e-global-color-text ); font-family: var( --e-global-typography-text-font-family ), Sans-serif; font-weight: var( --e-global-typography-text-font-weight ); text-align: var(--text-align); letter-spacing: 0px;\">Priority registration for lawyer chapter events<\/span><\/li><li><span style=\"color: var( --e-global-color-text ); font-family: var( --e-global-typography-text-font-family ), Sans-serif; font-weight: var( --e-global-typography-text-font-weight ); text-align: var(--text-align); letter-spacing: 0px;\">Priority access to tickets for Law &amp; Freedom<\/span><\/li><li><span style=\"color: var( --e-global-color-text ); font-family: var( --e-global-typography-text-font-family ), Sans-serif; font-weight: var( --e-global-typography-text-font-weight ); text-align: var(--text-align); letter-spacing: 0px;\">Connect with members in the Member Area<\/span><\/li><li><span style=\"color: var( --e-global-color-text ); font-family: var( --e-global-typography-text-font-family ), Sans-serif; font-weight: var( --e-global-typography-text-font-weight ); text-align: var(--text-align); letter-spacing: 0px;\">Exclusive digital access to the <em>Dicey Law Review<\/em><\/span><\/li><li>Access our online video library<\/li><\/ul><\/div><p><span style=\"font-weight: 400;\">Becoming a member also means supporting the Runnymede Society, partnering with us to promote the principles of constitutionalism, fundamental freedoms, and the rule of law.<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-46866e8 e-flex e-con-boxed e-con e-parent\" data-id=\"46866e8\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;jet_parallax_layout_list&quot;:[]}\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-b63091b elementor-widget elementor-widget-text-editor\" data-id=\"b63091b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>Please note we have recently updated our membership registration system.\u00a0 Should you encounter any issues please email <a href=\"mailto:communications@runnymedesociety.ca\">communications@runnymedesociety.ca<\/a><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3952678 elementor-widget elementor-widget-shortcode\" data-id=\"3952678\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"shortcode.default\">\n\t\t\t\t\t\t\t<div class=\"elementor-shortcode\">\n\t\t<div class=\"runnymede-form-wrapper\">\n\t\t\t<form id=\"membership-form\" method=\"post\" action=\"https:\/\/runnymedesociety.ca\/wp-admin\/admin-ajax.php\">\n\t\t\t\t<input type=\"hidden\" id=\"membership_nonce\" name=\"membership_nonce\" value=\"cba65d4e9e\" \/><input type=\"hidden\" name=\"_wp_http_referer\" value=\"\/fr\/wp-json\/wp\/v2\/pages\/24168\" \/>\t\t\t\t<input type=\"hidden\" name=\"action\" value=\"membership_submit\">\n\t\t\t\t<input type=\"hidden\" id=\"membership_type\" name=\"membership_type\" value=\"\">\n\t\t\t<h2>Runnymede Membership<\/h2>\n\n\t\t\t\t<!-- Membership Plan Tabs -->\n\t\t\t\t<div class=\"plan-tabs-container\">\n\t\t\t\t<label>Select Your Membership Plan<\/label>\n\t\t\t\t\t<div class=\"plan-tabs\">\n\t\t\t\t\t\t<button type=\"button\" class=\"plan-tab-button\" data-plan=\"lawyer\">\n\t\t\t\t\t\t\t<span class=\"plan-tab-button-wrapper\">\n\t\t\t\t\t\t\t\t<span class=\"plan-tab-button-title\">Lawyer<\/span>\n\t\t\t\t\t\t\t\t<span class=\"plan-tab-button-description\">Lawyers at least three years from call date, on the date of membership purchase.<\/span>\n\t\t\t\t\t\t\t\t<span class=\"plan-tab-button-price\">$125\/yr<\/span>\n\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t<\/button>\n\t\t\t\t\t\t<button type=\"button\" class=\"plan-tab-button\" data-plan=\"junior_lawyer\">\n\t\t\t\t\t\t\t<span class=\"plan-tab-button-wrapper\">\n\t\t\t\t\t\t\t\t<span class=\"plan-tab-button-title\">Junior Lawyer<\/span>\n\t\t\t\t\t\t\t\t<span class=\"plan-tab-button-description\">Lawyers less than three years from call date, on the date of membership purchase.<\/span>\n\t\t\t\t\t\t\t\t<span class=\"plan-tab-button-price\">$75\/yr<\/span>\n\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t<\/button>\n\t\t\t\t\t\t<button type=\"button\" class=\"plan-tab-button\" data-plan=\"scholar\">\n\t\t\t\t\t\t\t<span class=\"plan-tab-button-wrapper\">\n\t\t\t\t\t\t\t\t<span class=\"plan-tab-button-title\">Scholar<\/span>\n\t\t\t\t\t\t\t\t<span class=\"plan-tab-button-description\">Law professors at least three years from date of hire, on the date of membership purchase.<\/span>\n\t\t\t\t\t\t\t\t<span class=\"plan-tab-button-price\">$125\/yr<\/span>\n\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t<\/button>\n\t\t\t\t\t\t<button type=\"button\" class=\"plan-tab-button\" data-plan=\"junior_scholar\">\n\t\t\t\t\t\t\t<span class=\"plan-tab-button-wrapper\">\n\t\t\t\t\t\t\t\t<span class=\"plan-tab-button-title\">Junior Scholar<\/span>\n\t\t\t\t\t\t\t\t<span class=\"plan-tab-button-description\">Law professors less than three years from date of hire, on the date of membership purchase.<\/span>\n\t\t\t\t\t\t\t\t<span class=\"plan-tab-button-price\">$75\/yr<\/span>\n\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t<\/button>\n\t\t\t\t\t\t<button type=\"button\" class=\"plan-tab-button\" data-plan=\"civic_member\">\n\t\t\t\t\t\t\t<span class=\"plan-tab-button-wrapper\">\n\t\t\t\t\t\t\t\t<span class=\"plan-tab-button-title\">Civic Member<\/span>\n\t\t\t\t\t\t\t\t<span class=\"plan-tab-button-description\">This Membership Plan is open to anyone who does not fall under another membership category.<\/span>\n\t\t\t\t\t\t\t\t<span class=\"plan-tab-button-price\">$50\/yr<\/span>\n\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t<\/button>\n\t\t\t\t\t\t<button type=\"button\" class=\"plan-tab-button\" data-plan=\"student\">\n\t\t\t\t\t\t\t<span class=\"plan-tab-button-wrapper\">\n\t\t\t\t\t\t\t\t<span class=\"plan-tab-button-title\">Student<\/span>\n\t\t\t\t\t\t\t\t<span class=\"plan-tab-button-description\">STUDENTS ENROLLED IN LAW SCHOOL OR COMPLETING ARTICLES, A JUDICIAL CLERKSHIP, OR AN UNDERGRADUATE DEGREE.<\/span>\n\t\t\t\t\t\t\t\t<span class=\"plan-tab-button-price\">FREE<\/span>\n\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t<\/button>\n\t\t\t\t\t<\/div>\n\n\t\t\t\t\t<!-- Plan Content Areas -->\n\t\t\t\t\t<div class=\"plan-tab-content-area\">\n\t\t\t\t\t\t<!-- Lawyer Plan -->\n\t\t\t\t\t\t<div class=\"plan-tab-content\" data-plan=\"lawyer\">\n\t\t\t\t\t\t\t<div class=\"plan-description\">\n\t\t\t\t\t\t\t\t<p>Lawyers more than two years from call date are eligible for a Runnymede membership at the ordinary annual rate.<\/p>\n\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t<div class=\"plan-grid-2col\" style=\"display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem 1rem; margin-bottom: 1rem;\">\n\t\t\t\t\t\t\t\t<div class=\"membership-field\" style=\"grid-column: 1;\">\n\t\t\t\t\t\t\t\t\t<label for=\"lawyer_law_school\" class=\"form-label\">Law School <span class=\"required-asterisk\">*<\/span><\/label>\n\t\t\t\t\t\t\t\t\t<div style=\"display: flex; gap: 0.5rem; align-items: flex-end;\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"dropdown-relative\" style=\"flex: 1;\">\n\t\t\t\t\t\t\t\t\t\t\t<input \n\t\t\t\t\t\t\t\t\t\t\t\tid=\"lawyer_law_school\"\n\t\t\t\t\t\t\t\t\t\t\t\tclass=\"membership-input law-school-search lawyer-law-school-input\"\n\t\t\t\t\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\t\t\t\t\tname=\"lawyer_law_school\"\n\t\t\t\t\t\t\t\t\t\t\t\tdata-plan-required=\"1\"\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Search for your law school...\"\n\t\t\t\t\t\t\t\t\t\t\t\tautocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<button type=\"button\" class=\"clear-search-btn\" data-target=\"lawyer_law_school\" title=\"Clear\">&times;<\/button>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"lawyer_law_school_id\" id=\"lawyer_law_school_id\">\n\t\t\t\t\t\t\t\t\t\t\t<div id=\"lawyer-law-school-dropdown\" class=\"law-school-dropdown\"><\/div>\n\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t\t<input \n\t\t\t\t\t\t\t\t\t\t\tid=\"lawyer_other_school\"\n\t\t\t\t\t\t\t\t\t\t\tclass=\"membership-input\"\n\t\t\t\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\t\t\t\tname=\"lawyer_other_school\"\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Enter school name\"\n\t\t\t\t\t\t\t\t\t\t\tstyle=\"flex: 1; display: none;\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<div class=\"membership-field\">\n\t\t\t\t\t\t\t\t\t<label for=\"lawyer_graduation_date\">Graduation Date <span class=\"required-asterisk\">*<\/span><\/label>\n\t\t\t\t\t\t\t\t\t<input \n\t\t\t\t\t\t\t\t\t\tid=\"lawyer_graduation_date\"\n\t\t\t\t\t\t\t\t\t\tclass=\"membership-input\"\n\t\t\t\t\t\t\t\t\t\ttype=\"date\"\n\t\t\t\t\t\t\t\t\t\tname=\"lawyer_graduation_date\"\n\t\t\t\t\t\t\t\t\t\tdata-plan-required=\"1\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<div class=\"membership-field\">\n\t\t\t\t\t\t\t\t\t<label for=\"lawyer_call_year\">Call Year <span class=\"required-asterisk\">*<\/span><\/label>\n\t\t\t\t\t\t\t\t\t<input \n\t\t\t\t\t\t\t\t\t\tid=\"lawyer_call_year\"\n\t\t\t\t\t\t\t\t\t\tclass=\"membership-input\"\n\t\t\t\t\t\t\t\t\t\ttype=\"date\"\n\t\t\t\t\t\t\t\t\t\tname=\"lawyer_call_year\"\n\t\t\t\t\t\t\t\t\t\tdata-plan-required=\"1\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<div class=\"membership-field\">\n\t\t\t\t\t\t\t\t\t<label for=\"lawyer_current_employer\">Current Organization <span class=\"required-asterisk\">*<\/span><\/label>\n\t\t\t\t\t\t\t\t\t<input \n\t\t\t\t\t\t\t\t\t\tid=\"lawyer_current_employer\"\n\t\t\t\t\t\t\t\t\t\tclass=\"membership-input\"\n\t\t\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\t\t\tname=\"lawyer_current_employer\"\n\t\t\t\t\t\t\t\t\t\tdata-plan-required=\"1\"\n\t\t\t\t\t\t\t\t\t\tplaceholder=\"Organization name\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\n\t\t\t\t\t\t<!-- Junior Lawyer Plan -->\n\t\t\t\t\t\t<div class=\"plan-tab-content\" data-plan=\"junior_lawyer\">\n\t\t\t\t\t\t\t<div class=\"plan-description\">\n\t\t\t\t\t\t\t\t<p>Lawyers who were called to the bar within two years of their date of Runnymede registration are eligible for a membership at a reduced fee.<\/p>\n\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t<div class=\"plan-grid-2col\" style=\"display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem 1rem; margin-bottom: 1rem;\">\n\t\t\t\t\t\t\t\t<div class=\"membership-field\" style=\"grid-column: 1;\">\n\t\t\t\t\t\t\t\t\t<label for=\"jr_lawyer_law_school\" class=\"form-label\">Law School <span class=\"required-asterisk\">*<\/span><\/label>\n\t\t\t\t\t\t\t\t\t<div style=\"display: flex; gap: 0.5rem; align-items: flex-end;\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"dropdown-relative\" style=\"flex: 1;\">\n\t\t\t\t\t\t\t\t\t\t\t<input \n\t\t\t\t\t\t\t\t\t\t\t\tid=\"jr_lawyer_law_school\"\n\t\t\t\t\t\t\t\t\t\t\t\tclass=\"membership-input law-school-search jr_lawyer-law-school-input\"\n\t\t\t\t\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\t\t\t\t\tname=\"jr_lawyer_law_school\"\n\t\t\t\t\t\t\t\t\t\t\t\tdata-plan-required=\"1\"\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Search for your law school...\"\n\t\t\t\t\t\t\t\t\t\t\t\tautocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<button type=\"button\" class=\"clear-search-btn\" data-target=\"jr_lawyer_law_school\" title=\"Clear\">&times;<\/button>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"jr_lawyer_law_school_id\" id=\"jr_lawyer_law_school_id\">\n\t\t\t\t\t\t\t\t\t\t\t<div id=\"jr_lawyer-law-school-dropdown\" class=\"law-school-dropdown\"><\/div>\n\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t\t<input \n\t\t\t\t\t\t\t\t\t\t\tid=\"jr_lawyer_other_school\"\n\t\t\t\t\t\t\t\t\t\t\tclass=\"membership-input\"\n\t\t\t\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\t\t\t\tname=\"jr_lawyer_other_school\"\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Enter school name\"\n\t\t\t\t\t\t\t\t\t\t\tstyle=\"flex: 1; display: none;\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<div class=\"membership-field\">\n\t\t\t\t\t\t\t\t\t<label for=\"jr_lawyer_graduation_date\">Graduation Date <span class=\"required-asterisk\">*<\/span><\/label>\n\t\t\t\t\t\t\t\t\t<input \n\t\t\t\t\t\t\t\t\t\tid=\"jr_lawyer_graduation_date\"\n\t\t\t\t\t\t\t\t\t\tclass=\"membership-input\"\n\t\t\t\t\t\t\t\t\t\ttype=\"date\"\n\t\t\t\t\t\t\t\t\t\tname=\"jr_lawyer_graduation_date\"\n\t\t\t\t\t\t\t\t\t\tdata-plan-required=\"1\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<div class=\"membership-field\">\n\t\t\t\t\t\t\t\t\t<label for=\"jr_lawyer_call_year\">Call Year <span class=\"required-asterisk\">*<\/span><\/label>\n\t\t\t\t\t\t\t\t\t<input \n\t\t\t\t\t\t\t\t\t\tid=\"jr_lawyer_call_year\"\n\t\t\t\t\t\t\t\t\t\tclass=\"membership-input\"\n\t\t\t\t\t\t\t\t\t\ttype=\"date\"\n\t\t\t\t\t\t\t\t\t\tname=\"jr_lawyer_call_year\"\n\t\t\t\t\t\t\t\t\t\tdata-plan-required=\"1\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<div class=\"membership-field\">\n\t\t\t\t\t\t\t\t\t<label for=\"jr_lawyer_current_employer\">Current Organization <span class=\"required-asterisk\">*<\/span><\/label>\n\t\t\t\t\t\t\t\t\t<input \n\t\t\t\t\t\t\t\t\t\tid=\"jr_lawyer_current_employer\"\n\t\t\t\t\t\t\t\t\t\tclass=\"membership-input\"\n\t\t\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\t\t\tname=\"jr_lawyer_current_employer\"\n\t\t\t\t\t\t\t\t\t\tdata-plan-required=\"1\"\n\t\t\t\t\t\t\t\t\t\tplaceholder=\"Organization name\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\n\t\t\t\t\t\t<!-- Scholar Plan -->\n\t\t\t\t\t\t<div class=\"plan-tab-content\" data-plan=\"scholar\">\n\t\t\t\t\t\t\t<div class=\"plan-description\">\n\t\t\t\t\t\t\t\t<p>Law professors are eligible for a Runnymede membership at a reduced fee.<\/p>\n\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t<div class=\"plan-grid-2col\" style=\"display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem 1rem; margin-bottom: 1rem;\">\n\t\t\t\t\t\t\t\t<div class=\"membership-field\">\n\t\t\t\t\t\t\t\t\t<label for=\"scholar_law_school\" class=\"form-label\">Law School <span class=\"required-asterisk\">*<\/span><\/label>\n\t\t\t\t\t\t\t\t\t<div style=\"display: flex; gap: 0.5rem; align-items: flex-end;\">\n\t\t\t\t\t\t\t\t\t\t<div style=\"flex: 1;\">\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"dropdown-relative\">\n\t\t\t\t\t\t\t\t\t\t\t\t<input \n\t\t\t\t\t\t\t\t\t\t\t\t\tid=\"scholar_law_school\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"membership-input law-school-search scholar-law-school-input\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\t\t\t\t\tname=\"scholar_law_school\"\n\t\t\t\t\t\t\t\t\t\t\t\tdata-plan-required=\"1\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Search for your law school...\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tautocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<button type=\"button\" class=\"clear-search-btn\" data-target=\"scholar_law_school\" title=\"Clear\">&times;<\/button>\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"scholar_law_school_id\" id=\"scholar_law_school_id\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div id=\"scholar-law-school-dropdown\" class=\"law-school-dropdown\"><\/div>\n\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t\t<input \n\t\t\t\t\t\t\t\t\t\t\tid=\"scholar_other_school\"\n\t\t\t\t\t\t\t\t\t\t\tclass=\"membership-input\"\n\t\t\t\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\t\t\t\tname=\"scholar_other_school\"\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Enter school name\"\n\t\t\t\t\t\t\t\t\t\t\tstyle=\"flex: 1; display: none;\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<div class=\"membership-field\">\n\t\t\t\t\t\t\t\t\t<label for=\"scholar_graduation_date\">Graduation Date <span class=\"required-asterisk\">*<\/span><\/label>\n\t\t\t\t\t\t\t\t\t<input \n\t\t\t\t\t\t\t\t\t\tid=\"scholar_graduation_date\"\n\t\t\t\t\t\t\t\t\t\tclass=\"membership-input\"\n\t\t\t\t\t\t\t\t\t\ttype=\"date\"\n\t\t\t\t\t\t\t\t\t\tname=\"scholar_graduation_date\"\n\t\t\t\t\t\t\t\t\t\tdata-plan-required=\"1\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<div class=\"membership-field\">\n\t\t\t\t\t\t\t\t\t<label for=\"scholar_call_year\">Year of Hire <span class=\"required-asterisk\">*<\/span><\/label>\n\t\t\t\t\t\t\t\t\t<input \n\t\t\t\t\t\t\t\t\t\tid=\"scholar_call_year\"\n\t\t\t\t\t\t\t\t\t\tclass=\"membership-input\"\n\t\t\t\t\t\t\t\t\t\ttype=\"date\"\n\t\t\t\t\t\t\t\t\t\tname=\"scholar_call_year\"\n\t\t\t\t\t\t\t\t\t\tdata-plan-required=\"1\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<div class=\"membership-field\">\n\t\t\t\t\t\t\t\t\t<label for=\"scholar_current_employer\">Current Organization <span class=\"required-asterisk\">*<\/span><\/label>\n\t\t\t\t\t\t\t\t\t<input \n\t\t\t\t\t\t\t\t\t\tid=\"scholar_current_employer\"\n\t\t\t\t\t\t\t\t\t\tclass=\"membership-input\"\n\t\t\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\t\t\tname=\"scholar_current_employer\"\n\t\t\t\t\t\t\t\t\t\tdata-plan-required=\"1\"\n\t\t\t\t\t\t\t\t\t\tplaceholder=\"Organization name\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\n\t\t\t\t\t\t<!-- Junior Scholar Plan -->\n\t\t\t\t\t\t<div class=\"plan-tab-content\" data-plan=\"junior_scholar\">\n\t\t\t\t\t\t\t<div class=\"plan-description\">\n\t\t\t\t\t\t\t\t<p>Junior scholars are eligible for a Runnymede membership at a reduced fee.<\/p>\n\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t<div class=\"plan-grid-2col\" style=\"display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem 1rem; margin-bottom: 1rem;\">\n\t\t\t\t\t\t\t\t<div class=\"membership-field\">\n\t\t\t\t\t\t\t\t\t<label for=\"jr_scholar_law_school\" class=\"form-label\">Law School <span class=\"required-asterisk\">*<\/span><\/label>\n\t\t\t\t\t\t\t\t\t<div style=\"display: flex; gap: 0.5rem; align-items: flex-end;\">\n\t\t\t\t\t\t\t\t\t\t<div style=\"flex: 1;\">\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"dropdown-relative\">\n\t\t\t\t\t\t\t\t\t\t\t\t<input \n\t\t\t\t\t\t\t\t\t\t\t\t\tid=\"jr_scholar_law_school\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"membership-input law-school-search jr_scholar-law-school-input\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\t\t\t\t\tname=\"jr_scholar_law_school\"\n\t\t\t\t\t\t\t\t\t\t\t\tdata-plan-required=\"1\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Search for your law school...\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tautocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<button type=\"button\" class=\"clear-search-btn\" data-target=\"jr_scholar_law_school\" title=\"Clear\">&times;<\/button>\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"jr_scholar_law_school_id\" id=\"jr_scholar_law_school_id\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div id=\"jr_scholar-law-school-dropdown\" class=\"law-school-dropdown\"><\/div>\n\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t\t<input \n\t\t\t\t\t\t\t\t\t\t\tid=\"jr_scholar_other_school\"\n\t\t\t\t\t\t\t\t\t\t\tclass=\"membership-input\"\n\t\t\t\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\t\t\t\tname=\"jr_scholar_other_school\"\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Enter school name\"\n\t\t\t\t\t\t\t\t\t\t\tstyle=\"flex: 1; display: none;\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<div class=\"membership-field\">\n\t\t\t\t\t\t\t\t\t<label for=\"jr_scholar_graduation_date\">Graduation Date <span class=\"required-asterisk\">*<\/span><\/label>\n\t\t\t\t\t\t\t\t\t<input \n\t\t\t\t\t\t\t\t\t\tid=\"jr_scholar_graduation_date\"\n\t\t\t\t\t\t\t\t\t\tclass=\"membership-input\"\n\t\t\t\t\t\t\t\t\t\ttype=\"date\"\n\t\t\t\t\t\t\t\t\t\tname=\"jr_scholar_graduation_date\"\n\t\t\t\t\t\t\t\t\t\tdata-plan-required=\"1\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<div class=\"membership-field\">\n\t\t\t\t\t\t\t\t\t<label for=\"jr_scholar_call_year\">Year of Hire <span class=\"required-asterisk\">*<\/span><\/label>\n\t\t\t\t\t\t\t\t\t<input \n\t\t\t\t\t\t\t\t\t\tid=\"jr_scholar_call_year\"\n\t\t\t\t\t\t\t\t\t\tclass=\"membership-input\"\n\t\t\t\t\t\t\t\t\t\ttype=\"date\"\n\t\t\t\t\t\t\t\t\t\tname=\"jr_scholar_call_year\"\n\t\t\t\t\t\t\t\t\t\tdata-plan-required=\"1\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<div class=\"membership-field\">\n\t\t\t\t\t\t\t\t\t<label for=\"jr_scholar_current_employer\">Current Organization <span class=\"required-asterisk\">*<\/span><\/label>\n\t\t\t\t\t\t\t\t\t<input \n\t\t\t\t\t\t\t\t\t\tid=\"jr_scholar_current_employer\"\n\t\t\t\t\t\t\t\t\t\tclass=\"membership-input\"\n\t\t\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\t\t\tname=\"jr_scholar_current_employer\"\n\t\t\t\t\t\t\t\t\t\tdata-plan-required=\"1\"\n\t\t\t\t\t\t\t\t\t\tplaceholder=\"Organization name\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\n\t\t\t\t\t\t<!-- Civic Member Plan -->\n\t\t\t\t\t\t<div class=\"plan-tab-content\" data-plan=\"civic_member\">\n\t\t\t\t\t\t\t<div class=\"plan-description\">\n\t\t\t\t\t\t\t\t<p>This Membership Plan is open to anyone who does not fall under another membership category.<\/p>\n\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t<div class=\"plan-grid-2col\" style=\"display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem 1rem; margin-bottom: 1rem;\">\n\t\t\t\t\t\t\t\t<div class=\"membership-field\" style=\"grid-column: 1 \/ -1;\">\n\t\t\t\t\t\t\t\t\t<label for=\"civic_current_organization\" class=\"form-label\">Current Organization <span class=\"required-asterisk\">*<\/span><\/label>\n\t\t\t\t\t\t\t\t\t<input \n\t\t\t\t\t\t\t\t\t\tid=\"civic_current_organization\"\n\t\t\t\t\t\t\t\t\t\tclass=\"membership-input\"\n\t\t\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\t\t\tname=\"civic_current_organization\"\n\t\t\t\t\t\t\t\t\t\tdata-plan-required=\"1\"\n\t\t\t\t\t\t\t\t\t\tplaceholder=\"Enter organization name\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\n\t\t\t\t\t\t<!-- Student Plan -->\n\t\t\t\t\t\t<div class=\"plan-tab-content\" data-plan=\"student\">\n\t\t\t\t\t\t\t<div class=\"plan-description\">\n\t\t\t\t\t\t\t\t<p>Students enrolled in law school or completing articles, a judicial clerkship, or an undergraduate degree are eligible for a membership at no fee.<\/p>\n\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<!-- Student Type Selector -->\n\t\t\t\t\t\t\t<div class=\"membership-field-large\">\n\t\t\t\t\t\t\t\t<label for=\"student_type\" class=\"form-label\">Student Type <span class=\"required-asterisk\">*<\/span><\/label>\n\t\t\t\t\t\t\t\t<select \n\t\t\t\t\t\t\t\t\tid=\"student_type\"\n\t\t\t\t\t\t\t\t\tclass=\"membership-input\"\n\t\t\t\t\t\t\t\t\tname=\"student_type\"\n\t\t\t\t\t\t\t\t\tdata-student-required=\"1\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<option value=\"\">-- Select --<\/option>\n\t\t\t\t\t\t\t\t\t<option value=\"undergraduate\">Undergraduate<\/option>\n\t\t\t\t\t\t\t\t\t<option value=\"law_school\">In Law School<\/option>\n\t\t\t\t\t\t\t\t\t<option value=\"articling_clerkship\">Articling \/ Clerkship<\/option>\n\t\t\t\t\t\t\t\t<\/select>\n\t\t\t\t\t\t\t<\/div>\n\n\t\t\t\t\t\t\t<!-- Undergraduate Fields -->\n\t\t\t\t\t\t\t<div id=\"student-undergraduate-section\" class=\"hidden plan-grid-2col\">\n\t\t\t\t\t\t\t\t<div class=\"membership-field\">\n\t\t\t\t\t\t\t\t\t<label for=\"student_university\" class=\"form-label\">University <span class=\"required-asterisk\">*<\/span><\/label>\n\t\t\t\t\t\t\t\t\t<div style=\"display: flex; gap: 0.5rem; align-items: flex-end;\">\n\t\t\t\t\t\t\t\t\t\t<div style=\"flex: 1;\">\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"dropdown-relative\">\n\t\t\t\t\t\t\t\t\t\t\t\t<input \n\t\t\t\t\t\t\t\t\t\t\t\t\tid=\"student_university\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"membership-input university-search\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"student_university\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tdata-student-required=\"undergraduate\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Search for your university...\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tautocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<button type=\"button\" class=\"clear-search-btn\" data-target=\"student_university\" title=\"Clear\">&times;<\/button>\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"student_university_id\" id=\"student_university_id\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div id=\"student-university-dropdown\" class=\"law-school-dropdown\"><\/div>\n\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t\t<input \n\t\t\t\t\t\t\t\t\t\t\tid=\"student_other_university\"\n\t\t\t\t\t\t\t\t\t\t\tclass=\"membership-input\"\n\t\t\t\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\t\t\t\tname=\"student_other_school\"\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Enter university name\"\n\t\t\t\t\t\t\t\t\t\t\tstyle=\"flex: 1; display: none;\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<div class=\"membership-field\">\n\t\t\t\t\t\t\t\t\t<label for=\"student_ug_graduation\">Graduation Date (Anticipated) <span class=\"required-asterisk\">*<\/span><\/label>\n\t\t\t\t\t\t\t\t\t<input \n\t\t\t\t\t\t\t\t\t\tid=\"student_ug_graduation\"\n\t\t\t\t\t\t\t\t\t\tclass=\"membership-input\"\n\t\t\t\t\t\t\t\t\t\ttype=\"date\"\n\t\t\t\t\t\t\t\t\t\tname=\"student_ug_graduation\"\n\t\t\t\t\t\t\t\t\t\tdata-student-required=\"undergraduate\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\n\t\t\t\t\t\t\t<!-- Law School Fields -->\n\t\t\t\t\t\t\t<div id=\"student-law-school-section\" class=\"hidden plan-grid-2col\">\n\t\t\t\t\t\t\t\t<div class=\"membership-field\">\n\t\t\t\t\t\t\t\t\t<label for=\"student_law_school\" class=\"form-label\">Law School <span class=\"required-asterisk\">*<\/span><\/label>\n\t\t\t\t\t\t\t\t\t<div style=\"display: flex; gap: 0.5rem; align-items: flex-end;\">\n\t\t\t\t\t\t\t\t\t\t<div style=\"flex: 1;\">\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"dropdown-relative\">\n\t\t\t\t\t\t\t\t\t\t\t\t<input \n\t\t\t\t\t\t\t\t\t\t\t\t\tid=\"student_law_school\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"membership-input law-school-search student-law-school-input\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"student_law_school\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tdata-student-required=\"law_school\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Search for your law school...\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tautocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<button type=\"button\" class=\"clear-search-btn\" data-target=\"student_law_school\" title=\"Clear\">&times;<\/button>\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"student_law_school_id\" id=\"student_law_school_id\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div id=\"student-law-school-dropdown\" class=\"law-school-dropdown\"><\/div>\n\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t\t<input \n\t\t\t\t\t\t\t\t\t\t\tid=\"student_other_law_school\"\n\t\t\t\t\t\t\t\t\t\t\tclass=\"membership-input\"\n\t\t\t\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\t\t\t\tname=\"student_other_school\"\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Enter school name\"\n\t\t\t\t\t\t\t\t\t\t\tstyle=\"flex: 1; display: none;\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<div class=\"membership-field\">\n\t\t\t\t\t\t\t\t\t<label for=\"student_law_graduation\">Graduation Date (Anticipated) <span class=\"required-asterisk\">*<\/span><\/label>\n\t\t\t\t\t\t\t\t\t<input \n\t\t\t\t\t\t\t\t\t\tid=\"student_law_graduation\"\n\t\t\t\t\t\t\t\t\t\tclass=\"membership-input\"\n\t\t\t\t\t\t\t\t\t\ttype=\"date\"\n\t\t\t\t\t\t\t\t\t\tname=\"student_law_graduation\"\n\t\t\t\t\t\t\t\t\t\tdata-student-required=\"law_school\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\n\t\t\t\t\t\t\t<!-- Articling\/Clerkship Fields -->\n\t\t\t\t\t\t\t<div id=\"student-articling-section\" class=\"hidden plan-grid-2col\">\n\t\t\t\t\t\t\t\t<div class=\"membership-field\">\n\t\t\t\t\t\t\t\t\t<label for=\"student_articling_law_school\" class=\"form-label\">Law School <span class=\"required-asterisk\">*<\/span><\/label>\n\t\t\t\t\t\t\t\t\t<div style=\"display: flex; gap: 0.5rem; align-items: flex-end;\">\n\t\t\t\t\t\t\t\t\t\t<div style=\"flex: 1;\">\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"dropdown-relative\">\n\t\t\t\t\t\t\t\t\t\t\t\t<input \n\t\t\t\t\t\t\t\t\t\t\t\t\tid=\"student_articling_law_school\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"membership-input law-school-search student-articling-law-school-input\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"student_articling_law_school\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tdata-student-required=\"articling_clerkship\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Search for your law school...\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tautocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<button type=\"button\" class=\"clear-search-btn\" data-target=\"student_articling_law_school\" title=\"Clear\">&times;<\/button>\n\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"student_articling_law_school_id\" id=\"student_articling_law_school_id\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div id=\"student-articling-law-school-dropdown\" class=\"law-school-dropdown\"><\/div>\n\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t\t<input \n\t\t\t\t\t\t\t\t\t\t\tid=\"student_articling_other_law_school\"\n\t\t\t\t\t\t\t\t\t\t\tclass=\"membership-input\"\n\t\t\t\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\t\t\t\tname=\"student_other_school\"\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Enter school name\"\n\t\t\t\t\t\t\t\t\t\t\tstyle=\"flex: 1; display: none;\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<div class=\"membership-field\">\n\t\t\t\t\t\t\t\t\t<label for=\"student_articling_graduation\">Graduation Date <span class=\"required-asterisk\">*<\/span><\/label>\n\t\t\t\t\t\t\t\t\t<input \n\t\t\t\t\t\t\t\t\t\tid=\"student_articling_graduation\"\n\t\t\t\t\t\t\t\t\t\tclass=\"membership-input\"\n\t\t\t\t\t\t\t\t\t\ttype=\"date\"\n\t\t\t\t\t\t\t\t\t\tname=\"student_articling_graduation\"\n\t\t\t\t\t\t\t\t\t\tdata-student-required=\"articling_clerkship\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<div class=\"membership-field\">\n\t\t\t\t\t\t\t\t\t<label for=\"student_articling_employer\">Current Organization <span class=\"required-asterisk\">*<\/span><\/label>\n\t\t\t\t\t\t\t\t\t<input \n\t\t\t\t\t\t\t\t\t\tid=\"student_articling_employer\"\n\t\t\t\t\t\t\t\t\t\tclass=\"membership-input\"\n\t\t\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\t\t\tname=\"student_articling_employer\"\n\t\t\t\t\t\t\t\t\t\tdata-student-required=\"articling_clerkship\"\n\t\t\t\t\t\t\t\t\t\tplaceholder=\"Enter organization name\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\n\t\t\t\t<!-- Individual Information -->\n\t\t\t\t<div id=\"individual-section\">\n\t\t\t\t<h3 class=\"section-heading\">Individual Information<\/h3>\n\n\t\t\t\t<!-- Row 1: Email, First Name, Last Name (3 columns) -->\n\t\t\t\t<div class=\"form-row-3-col\">\n\t\t\t\t\t<div class=\"membership-field\">\n\t\t\t\t\t\t<label for=\"email\">Email <span>*<\/span><\/label>\n\t\t\t\t\t\t<input \n\t\t\t\t\t\t\tid=\"email\"\n\t\t\t\t\t\t\tclass=\"membership-input\"\n\t\t\t\t\t\t\ttype=\"email\"\n\t\t\t\t\t\t\tname=\"email\"\n\t\t\t\t\t\t\tplaceholder=\"Email\"\n\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t>\n\t\t\t\t\t\t<div id=\"email-check-status\" class=\"form-help-text\" style=\"display: none; color: #666;\">Checking email...<\/div>\n\t\t\t\t\t\t<small id=\"email-exists-message\" class=\"form-help-text\" style=\"display: none; color: #c00;\"><\/small>\n\t\t\t\t\t<\/div>\n\n\t\t\t\t\t<div class=\"membership-field\">\n\t\t\t\t\t\t<label for=\"first_name\">First Name <span>*<\/span><\/label>\n\t\t\t\t\t\t<input \n\t\t\t\t\t\t\tid=\"first_name\"\n\t\t\t\t\t\t\tclass=\"membership-input\"\n\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\tname=\"first_name\"\n\t\t\t\t\t\t\tplaceholder=\"First Name\"\n\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t\tminlength=\"2\"\n\t\t\t\t\t\t\tmaxlength=\"50\"\n\t\t\t\t\t\t\tpattern=\"[a-zA-Z\\s'-]\"\n\t\t\t\t\t\t\ttitle=\"First name can only contain letters, spaces, hyphens, and apostrophes\"\n\t\t\t\t\t\t>\n\t\t\t\t\t<\/div>\n\n\t\t\t\t\t<div class=\"membership-field\">\n\t\t\t\t\t\t<label for=\"last_name\">Last Name <span>*<\/span><\/label>\n\t\t\t\t\t\t<input \n\t\t\t\t\t\t\tid=\"last_name\"\n\t\t\t\t\t\t\tclass=\"membership-input\"\n\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\tname=\"last_name\"\n\t\t\t\t\t\t\tplaceholder=\"Last Name\"\n\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t\tminlength=\"2\"\n\t\t\t\t\t\t\tmaxlength=\"50\"\n\t\t\t\t\t\t\tpattern=\"[a-zA-Z\\s'-]\"\n\t\t\t\t\t\t\ttitle=\"Last name can only contain letters, spaces, hyphens, and apostrophes\"\n\t\t\t\t\t\t>\n\t\t\t\t\t<\/div>\n\n\t\t\t\t<\/div>\n\n\t\t\t\t<!-- Row 2: Phone, Ext (2 columns) -->\n\t\t\t\t<div class=\"form-row-2-col\">\n\t\t\t\t\t<div class=\"membership-field\">\n\t\t\t\t\t\t<label for=\"phone\">Phone <span>*<\/span><\/label>\n\t\t\t\t\t\t<input \n\t\t\t\t\t\t\tid=\"phone\"\n\t\t\t\t\t\t\tclass=\"membership-input\"\n\t\t\t\t\t\t\ttype=\"tel\"\n\t\t\t\t\t\t\tname=\"phone\"\n\t\t\t\t\t\t\tplaceholder=\"Phone\"\n\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t\tpattern=\"[0-9\\s()+-]\"\n\t\t\t\t\t\t\ttitle=\"Please enter a valid phone number\"\n\t\t\t\t\t\t>\n\t\t\t\t\t<\/div>\n\n\t\t\t\t\t<div class=\"membership-field\">\n\t\t\t\t\t\t<label for=\"phone_ext\">Ext:<\/label>\n\t\t\t\t\t\t<input \n\t\t\t\t\t\t\tid=\"phone_ext\"\n\t\t\t\t\t\t\tclass=\"membership-input\"\n\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\tname=\"phone_ext\"\n\t\t\t\t\t\t\tplaceholder=\"Extension\"\n\t\t\t\t\t\t\tmaxlength=\"10\"\n\t\t\t\t\t\t\tpattern=\"[0-9]*\"\n\t\t\t\t\t\t\ttitle=\"Extension must be numbers only\"\n\t\t\t\t\t\t>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\n\t\t\t\t<!-- Divider -->\n\t\t\t\t<hr class=\"form-divider\">\n\t\t\t<div class=\"form-row-full\">\n\t\t\t\t<div class=\"membership-field\">\n\t\t\t\t\t<label for=\"addr_search\" class=\"form-label\">Search Address <span class=\"required-asterisk\">*<\/span> <span class=\"optional-text\">(Address fields below will automatically populate)<\/span><\/label>\n\t\t\t\t\t<input \n\t\t\t\t\t\tid=\"addr_search\"\n\t\t\t\t\t\tclass=\"membership-input pac-target-input\"\n\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\tname=\"addr_search\"\n\t\t\t\t\t\tplaceholder=\"Start typing your address\"\n\t\t\t\t\t\tautocomplete=\"off\"\n\t\t\t\t\t\tautocapitalize=\"off\"\n\t\t\t\t\t\tautocorrect=\"off\"\n\t\t\t\t\t\tspellcheck=\"false\"\n\t\t\t\t\t\tdata-form-type=\"other\"\n\t\t\t\t\t\tdata-lpignore=\"true\"\n\t\t\t\t\t\tinputmode=\"text\"\n\t\t\t\t\t\trequired\n\t\t\t\t\t\t\n\t\t\t\t\t>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\n\t\t\t<!-- Row 4: Apartment, Street, Postal Code (3 columns) -->\n\t\t\t<div class=\"form-row-3-col\">\n\t\t\t\t<div class=\"membership-field\">\n\t\t\t\t\t<label for=\"addr_apartment\" class=\"form-label\">Apartment \/ Unit <span class=\"optional-text\">(optional)<\/span><\/label>\n\t\t\t\t\t<input \n\t\t\t\t\t\tid=\"addr_apartment\"\n\t\t\t\t\t\tclass=\"membership-input\"\n\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\tname=\"addr_apartment\"\n\t\t\t\t\t\tplaceholder=\"Apartment \/ Unit\"\n\t\t\t\t\t\t\n\t\t\t\t\t>\n\t\t\t\t<\/div>\n\n\t\t\t\t<div class=\"membership-field\">\n\t\t\t\t\t<label for=\"addr_street\" class=\"form-label\">Street Address <span class=\"required-asterisk\">*<\/span><\/label>\n\t\t\t\t\t<input \n\t\t\t\t\t\tid=\"addr_street\"\n\t\t\t\t\t\tclass=\"membership-input\"\n\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\tname=\"addr_street\"\n\t\t\t\t\t\tplaceholder=\"Street address\"\n\t\t\t\t\t\treadonly\n\t\t\t\t\t\trequired\n\t\t\t\t\t\t\n\t\t\t\t\t>\n\t\t\t\t<\/div>\n\n\t\t\t\t<div class=\"membership-field\">\n\t\t\t\t\t<label for=\"addr_postal\" class=\"form-label\">Postal Code <span class=\"required-asterisk\">*<\/span><\/label>\n\t\t\t\t\t<input \n\t\t\t\t\t\tid=\"addr_postal\"\n\t\t\t\t\t\tclass=\"membership-input\"\n\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\tname=\"addr_postal\"\n\t\t\t\t\t\tplaceholder=\"Postal code\"\n\t\t\t\t\t\treadonly\n\t\t\t\t\t\trequired\n\t\t\t\t\t\t\n\t\t\t\t\t>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\n\t\t\t<!-- Row 5: City, Province, Country (3 columns) -->\n\t\t\t<div class=\"form-row-3-col\">\n\t\t\t\t<div class=\"membership-field\">\n\t\t\t\t\t<label for=\"addr_city\" class=\"form-label\">City <span class=\"required-asterisk\">*<\/span><\/label>\n\t\t\t\t\t<input \n\t\t\t\t\t\tid=\"addr_city\"\n\t\t\t\t\t\tclass=\"membership-input\"\n\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\tname=\"addr_city\"\n\t\t\t\t\t\tplaceholder=\"City\"\n\t\t\t\t\t\treadonly\n\t\t\t\t\t\trequired\n\t\t\t\t\t\t\n\t\t\t\t\t>\n\t\t\t\t<\/div>\n\n\t\t\t\t<div class=\"membership-field\">\n\t\t\t\t\t<label for=\"addr_province\" class=\"form-label\">Province \/ State <span class=\"required-asterisk\">*<\/span><\/label>\n\t\t\t\t\t<input \n\t\t\t\t\t\tid=\"addr_province\"\n\t\t\t\t\t\tclass=\"membership-input\"\n\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\tname=\"addr_province\"\n\t\t\t\t\t\tplaceholder=\"Province \/ State\"\n\t\t\t\t\t\treadonly\n\t\t\t\t\t\trequired\n\t\t\t\t\t\t\n\t\t\t\t\t>\n\t\t\t\t<\/div>\n\n\t\t\t\t<div class=\"membership-field\">\n\t\t\t\t\t<label for=\"addr_country\" class=\"form-label\">Country <span class=\"required-asterisk\">*<\/span><\/label>\n\t\t\t\t\t<input \n\t\t\t\t\t\tid=\"addr_country\"\n\t\t\t\t\t\tclass=\"membership-input\"\n\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\tname=\"addr_country\"\n\t\t\t\t\t\tplaceholder=\"Country\"\n\t\t\t\t\t\treadonly\n\t\t\t\t\t\trequired\n\t\t\t\t\t\t\n\t\t\t\t\t>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\n\t\t\t<!-- Divider -->\n\t\t\t<hr class=\"form-divider\">\n\n\t\t\t<!-- Account \/ Login Section -->\n\t\t\t<div>\n\t\t\t\t\t<h3 class=\"section-heading\">Account \/ Login<\/h3>\n\t\t\t\t\t<p class=\"section-intro\">Please create your username and password to access the online Member Area<\/p>\n\n\t\t\t\t\t<!-- Row 1: Username (Email) -->\n\t\t\t\t\t<div class=\"membership-field\" class=\"membership-field\">\n\t\t\t\t\t\t<label for=\"username\" class=\"form-label\">Login Email <span class=\"required-asterisk\">*<\/span><\/label>\n\t\t\t\t\t\t<input \n\t\t\t\t\t\t\tid=\"username\"\n\t\t\t\t\t\t\tclass=\"membership-input\"\n\t\t\t\t\t\t\ttype=\"email\"\n\t\t\t\t\t\t\tname=\"username\"\n\t\t\t\t\t\t\tplaceholder=\"Email address\"\n\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t\treadonly\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t>\n\t\t\t\t\t\t<small class=\"form-help-text\">Your email address serves as your username.<\/small>\n\t\t\t\t\t<\/div>\n\n\t\t\t\t\t<!-- Row 2: Password -->\n\t\t\t\t\t<div class=\"membership-field\">\n\t\t\t\t\t\t<label for=\"password\" class=\"form-label\">Password <span class=\"required-asterisk\">*<\/span><\/label>\n\t\t\t\t\t\t<input \n\t\t\t\t\t\t\tid=\"password\"\n\t\t\t\t\t\t\tclass=\"membership-input\"\n\t\t\t\t\t\t\ttype=\"password\"\n\t\t\t\t\t\t\tname=\"password\"\n\t\t\t\t\t\t\tplaceholder=\"Password\"\n\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t\tminlength=\"10\"\n\t\t\t\t\t\t\tmaxlength=\"128\"\n\t\t\t\t\t\t\ttitle=\"Password must be at least 10 characters and include an uppercase letter and a number\"\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t>\n\t\t\t\t\t\t<small class=\"form-help-text\">Minimum 10 characters, include an uppercase letter and a number<\/small>\n\t\t\t\t\t<\/div>\n\n\t\t\t\t\t<!-- Row 3: Confirm Password -->\n\t\t\t\t\t<div class=\"membership-field\">\n\t\t\t\t\t\t<label for=\"password_confirm\" class=\"form-label\">Confirm Password <span class=\"required-asterisk\">*<\/span><\/label>\n\t\t\t\t\t\t<input \n\t\t\t\t\t\t\tid=\"password_confirm\"\n\t\t\t\t\t\t\tclass=\"membership-input\"\n\t\t\t\t\t\t\ttype=\"password\"\n\t\t\t\t\t\t\tname=\"password_confirm\"\n\t\t\t\t\t\t\tplaceholder=\"Confirm Password\"\n\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t\tminlength=\"10\"\n\t\t\t\t\t\t\tmaxlength=\"128\"\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t>\n\t\t\t\t\t\t<small class=\"form-help-text\" id=\"password-match-message\"><\/small>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\n\t\t\t\t<!-- Divider -->\n\t\t\t\t<hr class=\"form-divider-large\">\n\n\t\t\t\t<!-- Payment Information Section -->\n\t\t\t<div id=\"payment-section\">\n\t\t\t\t<h3 class=\"payment-section-heading\">Payment Information<\/h3>\n\t\t\t\t<p class=\"payment-section-intro\">Your payment method is securely processed via Stripe. We never store your card details.<\/p>\n\t\t\t\t<div class=\"membership-checkbox-field\">\n\t\t\t\t\t<input type=\"checkbox\" id=\"subscription_checkbox\" name=\"subscription_checkbox\" value=\"1\">\n\t\t\t\t\t<label for=\"subscription_checkbox\">Make this a recurring annual subscription<\/label>\n\t\t\t\t<\/div>\n\n\t\t\t\t<!-- Stripe Card Elements (Individual) -->\n\t\t\t\t<div class=\"membership-field\">\n\t\t\t\t<label class=\"form-label\">Card Number <span class=\"required-asterisk\">*<\/span><\/label>\n\t\t\t\t<div id=\"card-number-element\" class=\"stripe-element\"><\/div>\n\n\t\t\t\t<div class=\"stripe-row\">\n\t\t\t\t\t<div class=\"membership-field\">\n\t\t\t\t\t\t<label class=\"form-label\">Expiry <span class=\"required-asterisk\">*<\/span><\/label>\n\t\t\t\t\t\t<div id=\"card-expiry-element\" class=\"stripe-element\"><\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<div class=\"membership-field\">\n\t\t\t\t\t\t<label class=\"form-label\">CVC <span class=\"required-asterisk\">*<\/span><\/label>\n\t\t\t\t\t\t<div id=\"card-cvc-element\" class=\"stripe-element\"><\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\n\t\t\t\t<div id=\"card-errors\" class=\"card-errors\"><\/div>\n\n\t\t\t\t<!-- Billing Address -->\n\t\t\t\t<div class=\"billing-row\">\n\t\t\t\t\t<div class=\"membership-field\">\n\t\t\t\t\t\t<label for=\"billing_name\" class=\"form-label\">Cardholder Name <span class=\"required-asterisk\">*<\/span><\/label>\n\t\t\t\t\t\t<input \n\t\t\t\t\t\t\tid=\"billing_name\"\n\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\tname=\"billing_name\"\n\t\t\t\t\t\t\tplaceholder=\"Full name on card\"\n\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t\tminlength=\"2\"\n\t\t\t\t\t\t\tmaxlength=\"100\"\n\t\t\t\t\t\t\tpattern=\"[a-zA-Z\\s'-]\"\n\t\t\t\t\t\t\ttitle=\"Cardholder name can only contain letters, spaces, hyphens, and apostrophes\"\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<div class=\"membership-field\">\n\t\t\t\t\t\t<label for=\"billing_email\" class=\"form-label\">Billing Email <span class=\"required-asterisk\">*<\/span><\/label>\n\t\t\t\t\t\t<input \n\t\t\t\t\t\t\tid=\"billing_email\"\n\t\t\t\t\t\t\ttype=\"email\"\n\t\t\t\t\t\t\tname=\"billing_email\"\n\t\t\t\t\t\t\tplaceholder=\"Billing email\"\n\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\n\t\t\t\t<div class=\"membership-checkbox-field\">\n\t\t\t\t\t<input type=\"checkbox\" id=\"billing_address_different\" name=\"billing_address_different\" value=\"1\">\n\t\t\t\t\t<label for=\"billing_address_different\">Billing address is different from mailing address<\/label>\n\t\t\t\t<\/div>\n\n\t\t\t\t<!-- Billing Address -->\n\t\t\t\t<div id=\"billing-address-fields\" style=\"display: none;\">\n\t\t\t\t\t<div class=\"billing-row\">\n\t\t\t\t\t\t<div class=\"membership-field\">\n\t\t\t\t\t\t\t<label for=\"billing_street\" class=\"form-label\">Street Address <span class=\"required-asterisk\">*<\/span><\/label>\n\t\t\t\t\t\t\t<input \n\t\t\t\t\t\t\t\tid=\"billing_street\"\n\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\tname=\"billing_street\"\n\t\t\t\t\t\t\t\tplaceholder=\"Street address\"\n\t\t\t\t\t\t\t\tminlength=\"5\"\n\t\t\t\t\t\t\t\tmaxlength=\"100\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<div class=\"membership-field\">\n\t\t\t\t\t\t\t<label for=\"billing_city\" class=\"form-label\">City <span class=\"required-asterisk\">*<\/span><\/label>\n\t\t\t\t\t\t\t<input \n\t\t\t\t\t\t\t\tid=\"billing_city\"\n\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\tname=\"billing_city\"\n\t\t\t\t\t\t\t\tplaceholder=\"City\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\n\t\t\t\t\t<div class=\"billing-row\">\n\t\t\t\t\t\t<div class=\"membership-field\">\n\t\t\t\t\t\t\t<label for=\"billing_state\" class=\"form-label\">Province\/State <span class=\"required-asterisk\">*<\/span><\/label>\n\t\t\t\t\t\t\t<input \n\t\t\t\t\t\t\t\tid=\"billing_state\"\n\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\tname=\"billing_state\"\n\t\t\t\t\t\t\t\tplaceholder=\"Province\/State\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<div class=\"membership-field\">\n\t\t\t\t\t\t\t<label for=\"billing_country\" class=\"form-label\">Country <span class=\"required-asterisk\">*<\/span><\/label>\n\t\t\t\t\t\t\t<input \n\t\t\t\t\t\t\t\tid=\"billing_country\"\n\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\tname=\"billing_country\"\n\t\t\t\t\t\t\t\tplaceholder=\"Country\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\n\t\t<\/div><!-- End payment-section -->\n\n\t\t<\/form>\n\t<\/div>\n\n\t<!-- Loading Spinner Modal - Outside form for proper z-stacking -->\n\t<div id=\"membership-loading-modal\" class=\"membership-loading-modal\" style=\"display: none;\">\n\t\t<div class=\"membership-loading-content\">\n\t\t\t<div class=\"membership-spinner\"><\/div>\n\t\t\t<p class=\"membership-loading-text\">Creating Profile Now<\/p>\n\t\t<\/div>\n\t<\/div>\n\t<div id=\"membership-error-modal\" class=\"membership-loading-modal\" style=\"display: none;\">\n\t\t<div class=\"membership-loading-content\" style=\"max-width: 420px;\">\n\t\t\t<h3 style=\"margin: 0 0 12px 0;\">Please review<\/h3>\n\t\t\t<div id=\"membership-error-text\" style=\"margin-bottom: 16px; color: #991b1b;\"><\/div>\n\t\t\t<button type=\"button\" id=\"membership-error-close\" class=\"submit-button\" style=\"width: auto; margin: 0;\">OK<\/button>\n\t\t<\/div>\n\t<\/div>\n\n\t<button type=\"submit\" form=\"membership-form\" id=\"membership-submit-btn\" class=\"submit-button\">Create Membership<\/button>\n\n\t<script>\n\t\/\/ Ensure submit button is always visible\n\tdocument.addEventListener('DOMContentLoaded', function() {\n\t\tconst submitBtn = document.getElementById('membership-submit-btn');\n\t\tif (submitBtn) {\n\t\t\tsubmitBtn.style.display = 'block !important';\n\t\t\tsubmitBtn.style.visibility = 'visible';\n\t\t\tsubmitBtn.style.opacity = '1';\n\t\t}\n\t});\n\n\t\/\/ Keep checking to maintain visibility\n\tsetInterval(function() {\n\t\tconst submitBtn = document.getElementById('membership-submit-btn');\n\t\tif (submitBtn && submitBtn.style.display !== 'block') {\n\t\t\tsubmitBtn.style.display = 'block !important';\n\t\t}\n\t}, 500);\n\t<\/script>\n\n\t<script>\n\t\/**\n\t * Membership type data\n\t *\/\n\tvar membershipData = {\n\t\t\tlawyer: {\n\t\t\t\tprice: '$125.00',\n\t\t\t\ttitle: 'Lawyer Subscription Details',\n\t\t\t\tdescription: 'Lawyers more than two years from call date are eligible for a Runnymede membership at the ordinary annual rate.'\n\t\t\t},\n\t\t\tjunior_lawyer: {\n\t\t\t\tprice: '$75.00',\n\t\t\t\ttitle: 'Junior Lawyer Subscription Details',\n\t\t\t\tdescription: 'Lawyers who were called to the bar within two years of their date of Runnymede registration are eligible for a membership at a reduced fee.'\n\t\t\t},\n\t\t\tscholar: {\n\t\t\t\tprice: '$125.00',\n\t\t\t\ttitle: 'Scholar Subscription Details',\n\t\t\t\tdescription: 'Law professors are eligible for a Runnymede membership at a reduced fee.'\n\t\t\t},\n\t\t\tjunior_scholar: {\n\t\t\t\tprice: '$75.00',\n\t\t\t\ttitle: 'Junior Scholar Subscription Details',\n\t\t\t\tdescription: 'Junior scholars are eligible for a Runnymede membership at a reduced fee.'\n\t\t\t},\n\t\t\tcivic_member: {\n\t\t\t\tprice: '$50.00',\n\t\t\t\ttitle: 'Civic Member Subscription Details',\n\t\t\t\tdescription: 'This Membership Plan is open to anyone who does not fall under another membership category.'\n\t\t\t},\n\t\t\tstudent: {\n\t\t\t\tprice: 'FREE',\n\t\t\t\ttitle: 'Student Subscription Details',\n\t\t\t\tdescription: 'Students enrolled in law school or completing articles, a judicial clerkship, or an undergraduate degree are eligible for a membership at no fee.'\n\t\t\t}\n\t\t};\n\n\t\t\/**\n\t\t * Handle membership type selection\n\t\t *\/\n\t\tdocument.addEventListener('DOMContentLoaded', function() {\n\t\t\tvar membershipSelect = document.getElementById('membership_type');\n\t\t\tvar priceDisplay = document.getElementById('price-display');\n\t\t\tvar descriptionBox = document.getElementById('description-box');\n\t\t\tvar descriptionTitle = document.getElementById('description-title');\n\t\t\tvar descriptionText = document.getElementById('description-text');\n\t\t\tvar schoolSelect = document.getElementById('school');\n\t\t\tvar otherSchoolField = document.getElementById('other-school-field');\n\n\t\t\t\/\/ Membership type handler\n\t\t\tmembershipSelect.addEventListener('change', function() {\n\t\t\t\tvar selected = this.value;\n\t\t\t\tif (selected && membershipData[selected]) {\n\t\t\t\t\tvar data = membershipData[selected];\n\t\t\t\t\tpriceDisplay.textContent = data.price;\n\t\t\t\t\tdescriptionTitle.textContent = data.title;\n\t\t\t\t\tdescriptionText.textContent = data.description;\n\t\t\t\t\tdescriptionBox.style.display = 'block';\n\t\t\t\t} else {\n\t\t\t\t\tpriceDisplay.textContent = '\u00c3\u00a2\u00e2\u201a\u00ac\u00e2\u20ac\u009d';\n\t\t\t\t\tdescriptionBox.style.display = 'none';\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t\/\/ School dropdown handler - show \"Other\" field when \"Other\" is selected\n\t\t\tschoolSelect.addEventListener('change', function() {\n\t\t\t\tif (this.value === 'other') {\n\t\t\t\t\totherSchoolField.style.display = 'block';\n\t\t\t\t} else {\n\t\t\t\t\totherSchoolField.style.display = 'none';\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t\/\/ Tab switching\n\t\t\tfunction switchTab(tabName) {\n\t\t\t\tif (tabName === 'individual') {\n\t\t\t\t\tindividualSection.style.display = 'block';\n\t\t\t\t\torganizationSection.style.display = 'none';\n\t\t\t\t\tindividualTab.style.borderColor = '#0073aa';\n\t\t\t\t\tindividualTab.style.backgroundColor = '#e7f3ff';\n\t\t\t\t\tindividualTab.style.color = '#0073aa';\n\t\t\t\t\torganizationTab.style.borderColor = '#ddd';\n\t\t\t\t\torganizationTab.style.backgroundColor = 'white';\n\t\t\t\t\torganizationTab.style.color = 'inherit';\n\t\t\t\t} else {\n\t\t\t\t\torganizationSection.style.display = 'block';\n\t\t\t\t\tindividualSection.style.display = 'none';\n\t\t\t\t\torganizationTab.style.borderColor = '#0073aa';\n\t\t\t\t\torganizationTab.style.backgroundColor = '#e7f3ff';\n\t\t\t\t\torganizationTab.style.color = '#0073aa';\n\t\t\t\t\tindividualTab.style.borderColor = '#ddd';\n\t\t\t\t\tindividualTab.style.backgroundColor = 'white';\n\t\t\t\t\tindividualTab.style.color = 'inherit';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t\/\/ Default to Individual\n\t\t\tswitchTab('individual');\n\n\t\t\tindividualTab.addEventListener('click', function(e) {\n\t\t\t\te.preventDefault();\n\t\t\t\tswitchTab('individual');\n\t\t\t});\n\n\t\t\torganizationTab.addEventListener('click', function(e) {\n\t\t\t\te.preventDefault();\n\t\t\t\tswitchTab('organization');\n\t\t\t});\n\t\t});\n\t\t<\/script>\n\n\t\t<script>\n\t\t\/**\n\t\t * Chrome Autofill Guard - Protects all form fields\n\t\t * Randomizes field names\/attributes to prevent Chrome's native address autocomplete overlay\n\t\t *\/\n\t\t(function(){\n\t\t\tvar FIELDS = [\n\t\t\t\t'addr_search','addr_apartment','addr_street','addr_city','addr_province','addr_postal','addr_country'\n\t\t\t];\n\n\t\t\tfunction rand(){\n\t\t\t\treturn Math.random().toString(36).slice(2);\n\t\t\t}\n\n\t\t\tfunction randomize(el){\n\t\t\t\tif (!el) return;\n\t\t\t\tel.setAttribute('autocomplete', 'section-addr-' + rand() + ' new-password');\n\t\t\t\tel.setAttribute('name', (el.id || 'addr') + '_' + Date.now() + '_' + (Math.random() * 1e6 | 0));\n\t\t\t\tel.setAttribute('data-form-type', 'other');\n\t\t\t}\n\n\t\t\tfunction prime(el){\n\t\t\t\tif (!el) return;\n\t\t\t\trandomize(el);\n\t\t\t\tel.setAttribute('autocorrect', 'off');\n\t\t\t\tel.setAttribute('autocapitalize', 'off');\n\t\t\t\tel.setAttribute('spellcheck', 'false');\n\t\t\t\tel.readOnly = true;\n\t\t\t\trequestAnimationFrame(function(){ el.readOnly = false; });\n\t\t\t}\n\n\t\t\tfunction bind(el){\n\t\t\t\tif (!el || el.__addrGuard) return;\n\t\t\t\tel.__addrGuard = true;\n\t\t\t\tel.addEventListener('focus', function(){ prime(el); }, { once: true });\n\t\t\t\tel.addEventListener('keydown', function(e){\n\t\t\t\t\tif (e.key === 'ArrowDown' || e.key === 'Enter' || e.key === 'Tab') {\n\t\t\t\t\t\trandomize(el);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tel.addEventListener('input', function(){\n\t\t\t\t\tif ((Math.random() * 7 | 0) === 0) {\n\t\t\t\t\t\trandomize(el);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tfunction handleAddrSearchAutofill() {\n\t\t\t\tvar addrSearch = document.getElementById('addr_search');\n\t\t\t\tif (!addrSearch) return;\n\n\t\t\t\taddrSearch.setAttribute('autocomplete', 'off');\n\t\t\t\taddrSearch.setAttribute('autocorrect', 'off');\n\t\t\t\taddrSearch.setAttribute('autocapitalize', 'off');\n\t\t\t\taddrSearch.setAttribute('spellcheck', 'false');\n\t\t\t\taddrSearch.setAttribute('data-lpignore', 'true');\n\t\t\t\taddrSearch.setAttribute('data-1p-ignore', 'true');\n\t\t\t\taddrSearch.setAttribute('data-form-type', 'other');\n\t\t\t\taddrSearch.setAttribute('role', 'presentation');\n\t\t\t\taddrSearch.addEventListener('input', function() {\n\t\t\t\t\taddrSearch.dataset.userEdited = '1';\n\t\t\t\t});\n\t\t\t\taddrSearch.addEventListener('animationstart', function(event) {\n\t\t\t\t\tif (event.animationName === 'addr-autofill-start' && !addrSearch.dataset.userEdited) {\n\t\t\t\t\t\taddrSearch.value = '';\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\taddrSearch.addEventListener('focus', function() {\n\t\t\t\t\tif (!addrSearch.dataset.userEdited && addrSearch.value) {\n\t\t\t\t\t\taddrSearch.value = '';\n\t\t\t\t\t}\n\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\tif (!addrSearch.dataset.userEdited && addrSearch.value) {\n\t\t\t\t\t\t\taddrSearch.value = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t}, 50);\n\t\t\t\t});\n\t\t\t\tif (addrSearch.value && !addrSearch.dataset.userEdited) {\n\t\t\t\t\taddrSearch.value = '';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction ensurePacStyle(){\n\t\t\t\tif (document.getElementById('addr-pac-z')) return;\n\t\t\t\tvar s = document.createElement('style');\n\t\t\t\ts.id = 'addr-pac-z';\n\t\t\t\ts.textContent = '.pac-container{z-index:999999!important;}'\n\t\t\t\t\t+ '@keyframes addr-autofill-start{from{opacity:1;}to{opacity:1;}}'\n\t\t\t\t\t+ '#addr_search:-webkit-autofill{animation-name:addr-autofill-start;animation-duration:0.01s;}';\n\t\t\t\tdocument.head.appendChild(s);\n\t\t\t}\n\n\t\t\tfunction ensureDecoys(){\n\t\t\t\tif (document.getElementById('addr-decoys')) return;\n\t\t\t\tvar wrap = document.createElement('div');\n\t\t\t\twrap.id = 'addr-decoys';\n\t\t\t\twrap.style.cssText = 'position:absolute;left:-9999px;top:-9999px;height:0;overflow:hidden;';\n\t\t\t\twrap.innerHTML = '<input type=\"text\" autocomplete=\"street-address\" name=\"street-address\">'\n\t\t\t\t\t+ '<input type=\"text\" autocomplete=\"address-line1\" name=\"address-line1\">'\n\t\t\t\t\t+ '<input type=\"text\" autocomplete=\"address-line2\" name=\"address-line2\">'\n\t\t\t\t\t+ '<input type=\"text\" autocomplete=\"postal-code\" name=\"postal-code\">'\n\t\t\t\t\t+ '<input type=\"text\" autocomplete=\"address-level2\" name=\"address-level2\">'\n\t\t\t\t\t+ '<input type=\"text\" autocomplete=\"address-level1\" name=\"address-level1\">'\n\t\t\t\t\t+ '<input type=\"text\" autocomplete=\"country\" name=\"country\">';\n\t\t\t\tdocument.body.appendChild(wrap);\n\t\t\t}\n\n\t\t\tfunction apply(){\n\t\t\t\t\/\/ Set form-level attributes\n\t\t\t\tvar form = document.getElementById('membership-form');\n\t\t\t\tif (form) {\n\t\t\t\t\tform.setAttribute('autocomplete', 'off');\n\t\t\t\t\tform.setAttribute('novalidate', 'novalidate');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tFIELDS.forEach(function(id){ bind(document.getElementById(id)); });\n\t\t\t\thandleAddrSearchAutofill();\n\t\t\t\tensurePacStyle();\n\t\t\t\tensureDecoys();\n\t\t\t\tif (window.runnymedeConfig && window.runnymedeConfig.debug) {\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (document.readyState === 'loading') {\n\t\t\t\tdocument.addEventListener('DOMContentLoaded', apply);\n\t\t\t} else {\n\t\t\t\tapply();\n\t\t\t}\n\t\t})();\n\t\t<\/script>\n\n\t\t<script>\n\t\t\/**\n\t\t * Phone Number Masking (XXX-XXX-XXXX format)\n\t\t *\/\n\t\t(function(){\n\t\t\tfunction maskPhoneNumber(input) {\n\t\t\t\tlet value = input.value.replace(\/\\D\/g, ''); \/\/ Remove non-digits\n\t\t\t\t\n\t\t\t\tif (value.length > 0) {\n\t\t\t\t\tif (value.length <= 3) {\n\t\t\t\t\t\tvalue = value;\n\t\t\t\t\t} else if (value.length <= 6) {\n\t\t\t\t\t\tvalue = value.slice(0, 3) + '-' + value.slice(3);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvalue = value.slice(0, 3) + '-' + value.slice(3, 6) + '-' + value.slice(6, 10);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tinput.value = value;\n\t\t\t}\n\n\t\t\tfunction apply(){\n\t\t\t\t\/\/ Find all phone input fields\n\t\t\t\tvar phoneInputs = document.querySelectorAll('input[type=\"tel\"]');\n\t\t\t\tphoneInputs.forEach(function(input) {\n\t\t\t\t\tinput.addEventListener('input', function() {\n\t\t\t\t\t\tmaskPhoneNumber(this);\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t\tif (window.runnymedeConfig && window.runnymedeConfig.debug) {\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (document.readyState === 'loading') {\n\t\t\t\tdocument.addEventListener('DOMContentLoaded', apply);\n\t\t\t} else {\n\t\t\t\tapply();\n\t\t\t}\n\t\t})();\n\t\t<\/script>\n\n\t\t<script>\n\t\t\/**\n\t\t * Google Places Autocomplete - Canada restricted\n\t\t *\/\n\t\t(function(){\n\t\t\tfunction initMembershipForm(){\n\t\t\t\tif (!window.google || !window.google.maps) {\n\t\t\t\t\tconsole.error('Google Maps not ready');\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar searchInput = document.getElementById('addr_search');\n\t\t\t\tif (!searchInput) return;\n\n\t\t\t\tvar autocomplete = new google.maps.places.Autocomplete(searchInput, {\n\t\t\t\tcomponentRestrictions: { country: ['ca'] },\n\t\t\t\t\ttypes: ['address']\n\t\t\t\t});\n\n\t\t\t\tautocomplete.addListener('place_changed', function() {\n\t\t\t\t\tvar place = autocomplete.getPlace();\n\t\t\t\t\tif (!place.address_components) return;\n\n\t\t\t\t\tvar streetEl = document.getElementById('addr_street');\n\t\t\t\t\tvar apartmentEl = document.getElementById('addr_apartment');\n\t\t\t\t\tvar cityEl = document.getElementById('addr_city');\n\t\t\t\t\tvar provinceEl = document.getElementById('addr_province');\n\t\t\t\t\tvar postalEl = document.getElementById('addr_postal');\n\t\t\t\t\tvar countryEl = document.getElementById('addr_country');\n\n\t\t\t\t\t\/\/ Reset all fields\n\t\t\t\t\tstreetEl.value = '';\n\t\t\t\t\tcityEl.value = '';\n\t\t\t\t\tprovinceEl.value = '';\n\t\t\t\t\tpostalEl.value = '';\n\t\t\t\t\tcountryEl.value = '';\n\n\t\t\t\t\tfor (var i = 0; i < place.address_components.length; i++) {\n\t\t\t\t\t\tvar component = place.address_components[i];\n\t\t\t\t\t\tvar types = component.types;\n\n\t\t\t\t\t\tif (types.indexOf('street_number') !== -1) {\n\t\t\t\t\t\t\tstreetEl.value = component.long_name;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (types.indexOf('route') !== -1) {\n\t\t\t\t\t\t\tstreetEl.value += (streetEl.value ? ' ' : '') + component.long_name;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (types.indexOf('subpremise') !== -1) {\n\t\t\t\t\t\t\tapartmentEl.value = component.long_name;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (types.indexOf('locality') !== -1) {\n\t\t\t\t\t\t\tcityEl.value = component.long_name;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (types.indexOf('administrative_area_level_1') !== -1) {\n\t\t\t\t\t\t\tprovinceEl.value = component.short_name;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (types.indexOf('postal_code') !== -1) {\n\t\t\t\t\t\t\tpostalEl.value = component.long_name;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (types.indexOf('country') !== -1) {\n\t\t\t\t\t\t\tcountryEl.value = component.long_name;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tstreetEl.value = streetEl.value.trim();\n\t\t\t\t});\n\n\t\t\t}\n\n\t\t\tif (document.readyState === 'loading') {\n\t\t\t\tdocument.addEventListener('DOMContentLoaded', function() {\n\t\t\t\t\tinitMembershipForm();\n\t\t\t\t\tif (window.runnymedeConfig && window.runnymedeConfig.debug) {\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tinitMembershipForm();\n\t\t\t\tif (window.runnymedeConfig && window.runnymedeConfig.debug) {\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t\/\/ Also wait for Google to load\n\t\t\twindow.addEventListener('load', initMembershipForm);\n\t\t})();\n\n\t\t\/\/ Membership Plan Tabs Handler - Wait for DOM to be ready\n\t\tfunction initTabs() {\n\t\t\t\n\t\t\tconst tabButtons = document.querySelectorAll('.plan-tab-button');\n\t\t\tconst tabContents = document.querySelectorAll('.plan-tab-content');\n\t\t\tconst membershipTypeInput = document.getElementById('membership_type');\n\t\t\tlet isInitializing = true;\n\n\n\t\t\t\/\/ Responsive check\n\t\t\tfunction isMobile() {\n\t\t\t\treturn window.innerWidth <= 768;\n\t\t\t}\n\n\t\t\t\/\/ Activate a plan tab\n\t\t\tfunction activatePlan(planName) {\n\t\t\t\t\n\t\t\t\t\/\/ Update all buttons and contents\n\t\t\t\ttabButtons.forEach(btn => {\n\t\t\t\t\tconst isPlanButton = btn.getAttribute('data-plan') === planName;\n\t\t\t\t\tbtn.classList.toggle('active', isPlanButton);\n\t\t\t\t});\n\n\t\t\t\ttabContents.forEach(content => {\n\t\t\t\t\tconst isPlanContent = content.getAttribute('data-plan') === planName;\n\t\t\t\t\tcontent.classList.toggle('active', isPlanContent);\n\t\t\t\t});\n\n\t\t\t\ttabContents.forEach(content => {\n\t\t\t\t\tconst isPlanContent = content.getAttribute('data-plan') === planName;\n\t\t\t\t\tconst requiredFields = content.querySelectorAll('[data-plan-required=\"1\"]');\n\t\t\t\t\trequiredFields.forEach(field => {\n\t\t\t\t\t\tif (isPlanContent) {\n\t\t\t\t\t\t\tfield.setAttribute('required', 'required');\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tfield.removeAttribute('required');\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t});\n\n\t\t\t\tconst studentTypeSelect = document.getElementById('student_type');\n\t\t\t\tif (studentTypeSelect) {\n\t\t\t\t\tif (planName === 'student') {\n\t\t\t\t\t\tstudentTypeSelect.setAttribute('required', 'required');\n\t\t\t\t\t\tstudentTypeSelect.dispatchEvent(new Event('change'));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstudentTypeSelect.removeAttribute('required');\n\t\t\t\t\t\tconst studentFields = document.querySelectorAll('[data-student-required]');\n\t\t\t\t\t\tstudentFields.forEach(field => field.removeAttribute('required'));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t\/\/ Set the hidden input value\n\t\t\t\tmembershipTypeInput.value = planName;\n\n\t\t\t\t\/\/ Show\/hide payment section based on plan\n\t\t\t\tconst paymentSection = document.getElementById('payment-section');\n\t\t\t\tif (paymentSection) {\n\t\t\t\t\t\/\/ Hide payment section for Student plans (free tier)\n\t\t\t\t\tif (planName === 'student') {\n\t\t\t\t\t\tpaymentSection.style.display = 'none';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpaymentSection.style.display = 'block';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t\/\/ Scroll to content area on mobile\n\t\t\t\tif (isMobile() && !isInitializing) {\n\t\t\t\t\tconst contentArea = document.querySelector('.plan-tab-content-area');\n\t\t\t\t\tif (contentArea) {\n\t\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\t\tcontentArea.scrollIntoView({ behavior: 'smooth', block: 'nearest' });\n\t\t\t\t\t\t}, 100);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t\/\/ Attach click handlers to tab buttons\n\t\t\ttabButtons.forEach(btn => {\n\t\t\t\tbtn.addEventListener('click', function(e) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tconst planName = this.getAttribute('data-plan');\n\t\t\t\t\tactivatePlan(planName);\n\t\t\t\t});\n\t\t\t});\n\n\t\t\t\/\/ Initialize with first plan active\n\t\t\tif (tabButtons.length > 0) {\n\t\t\t\tconst firstPlan = tabButtons[0].getAttribute('data-plan');\n\t\t\t\tactivatePlan(firstPlan);\n\t\t\t\tisInitializing = false;\n\t\t\t}\n\n\t\t\t\/\/ Handle window resize for responsive behavior\n\t\t\twindow.addEventListener('resize', function() {\n\t\t\t\t\/\/ Plan remains active, just responsive styling adjusts\n\t\t\t});\n\n\t\t\t\/\/ Law School \"Other\" Field Toggle for all plans\n\t\t\tconst lawSchoolSelects = document.querySelectorAll('[name*=\"_law_school\"]');\n\t\t\tlawSchoolSelects.forEach(select => {\n\t\t\t\tconst planType = select.name.replace('_law_school', '');\n\t\t\t\tconst otherField = document.getElementById(planType + '-other-school-field');\n\t\t\t\t\n\t\t\t\tif (otherField) {\n\t\t\t\t\t\/\/ Show\/hide on change\n\t\t\t\t\tselect.addEventListener('change', function() {\n\t\t\t\t\t\totherField.style.display = this.value === 'other' ? 'block' : 'none';\n\t\t\t\t\t\t\/\/ Clear the field when hidden\n\t\t\t\t\t\tif (this.value !== 'other') {\n\t\t\t\t\t\t\totherField.querySelector('input').value = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\t\/\/ Initialize on load\n\t\t\t\t\tif (select.value === 'other') {\n\t\t\t\t\t\totherField.style.display = 'block';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif (window.runnymedeConfig && window.runnymedeConfig.debug) {\n\t\t\t}\n\t\t}\n\n\t\t\/\/ Call initTabs immediately if DOM is ready, or wait for it\n\t\tif (document.readyState === 'loading') {\n\t\t\tdocument.addEventListener('DOMContentLoaded', initTabs);\n\t\t} else {\n\t\t\tinitTabs();\n\t\t}\n\n\t\t\/\/ Law School Dropdown for Unified Education Section (all paid plans)\n\t\t(function() {\n\t\t\tconst schoolInput = document.getElementById('school');\n\t\t\tconst schoolIdInput = document.getElementById('school_id');\n\t\t\tconst schoolDropdown = document.getElementById('school-dropdown');\n\n\t\t\t\/\/ All schools data\n\t\t\tconst allSchools = [\n\t\t\t\t\t\t\t\t\t{ id: 'ubc-allard', title: 'University of British Columbia (Allard)' },\n\t\t\t\t\t\t\t\t\t{ id: 'ubc-okanagan', title: 'University of British Columbia (Okanagan)' },\n\t\t\t\t\t\t\t\t\t{ id: 'tru', title: 'Thompson Rivers University' },\n\t\t\t\t\t\t\t\t\t{ id: 'ualberta', title: 'University of Alberta' },\n\t\t\t\t\t\t\t\t\t{ id: 'ucalgary', title: 'University of Calgary' },\n\t\t\t\t\t\t\t\t\t{ id: 'usask', title: 'University of Saskatchewan' },\n\t\t\t\t\t\t\t\t\t{ id: 'umanitoba', title: 'University of Manitoba' },\n\t\t\t\t\t\t\t\t\t{ id: 'lakehead', title: 'Lakehead University (Bora Laskin)' },\n\t\t\t\t\t\t\t\t\t{ id: 'uwindsor', title: 'University of Windsor' },\n\t\t\t\t\t\t\t\t\t{ id: 'western', title: 'Western University' },\n\t\t\t\t\t\t\t\t\t{ id: 'uguelph', title: 'University of Guelph' },\n\t\t\t\t\t\t\t\t\t{ id: 'york-osgoode', title: 'York University (Osgoode Hall)' },\n\t\t\t\t\t\t\t\t\t{ id: 'utoronto', title: 'University of Toronto' },\n\t\t\t\t\t\t\t\t\t{ id: 'queens', title: 'Queen\\'s University' },\n\t\t\t\t\t\t\t\t\t{ id: 'uottawa', title: 'University of Ottawa' },\n\t\t\t\t\t\t\t\t\t{ id: 'mcgill', title: 'McGill University' },\n\t\t\t\t\t\t\t\t\t{ id: 'laval', title: 'Universit\u00e9 Laval' },\n\t\t\t\t\t\t\t\t\t{ id: 'sherbrooke', title: 'Universit\u00e9 de Sherbrooke' },\n\t\t\t\t\t\t\t\t\t{ id: 'unb', title: 'University of New Brunswick' },\n\t\t\t\t\t\t\t\t\t{ id: 'moncton', title: 'Universit\u00e9 de Moncton' },\n\t\t\t\t\t\t\t\t\t{ id: 'dalhousie', title: 'Dalhousie University' },\n\t\t\t\t\t\t\t\t\t{ id: 'uvictoria', title: 'University of Victoria' },\n\t\t\t\t\t\t\t\t\t{ id: 'umontreal', title: 'Universit\u00e9 de Montr\u00e9al' },\n\t\t\t\t\t\t\t\t\t{ id: 'other', title: 'Other' },\n\t\t\t\t\t\t\t];\n\n\t\t\tif (!schoolInput) return;\n\n\t\t\t\/\/ Show dropdown on focus\n\t\t\tschoolInput.addEventListener('focus', function() {\n\t\t\t\tif (!this.value.trim()) {\n\t\t\t\t\trenderSchools(allSchools);\n\t\t\t\t\tschoolDropdown.style.display = 'block';\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t\/\/ Filter schools on input\n\t\t\tschoolInput.addEventListener('input', function(e) {\n\t\t\t\tconst query = this.value.trim().toLowerCase();\n\t\t\t\t\n\t\t\t\tif (!query) {\n\t\t\t\t\trenderSchools(allSchools);\n\t\t\t\t} else {\n\t\t\t\t\tconst filtered = allSchools.filter(school =>\n\t\t\t\t\t\tschool.title.toLowerCase().includes(query)\n\t\t\t\t\t);\n\t\t\t\t\trenderSchools(filtered);\n\t\t\t\t}\n\n\t\t\t\tschoolDropdown.style.display = this.value.trim() || schoolDropdown.children.length ? 'block' : 'none';\n\t\t\t});\n\n\t\t\t\/\/ Render schools in dropdown\n\t\t\tfunction renderSchools(schoolsList) {\n\t\t\t\tschoolDropdown.innerHTML = '';\n\t\t\t\t\n\t\t\t\tif (schoolsList.length === 0) {\n\t\t\t\t\tschoolDropdown.innerHTML = '<div class=\"dropdown-no-results-text\">No schools found<\/div>';\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tschoolsList.forEach(school => {\n\t\t\t\t\tconst option = document.createElement('div');\n\t\t\t\t\toption.style.cssText = 'padding: 0.75rem; border-bottom: 1px solid #eee; cursor: pointer; transition: background-color 0.2s;';\n\t\t\t\t\toption.textContent = school.title;\n\t\t\t\t\toption.addEventListener('mouseover', function() {\n\t\t\t\t\t\tthis.style.backgroundColor = '#f0f8ff';\n\t\t\t\t\t});\n\t\t\t\t\toption.addEventListener('mouseout', function() {\n\t\t\t\t\t\tthis.style.backgroundColor = 'transparent';\n\t\t\t\t\t});\n\t\t\t\t\toption.addEventListener('click', function() {\n\t\t\t\t\t\tschoolInput.value = school.title;\n\t\t\t\t\t\tschoolIdInput.value = school.id;\n\t\t\t\t\t\tschoolDropdown.style.display = 'none';\n\t\t\t\t\t\t\n\t\t\t\t\t\t\/\/ Show\/hide \"Other\" field if needed\n\t\t\t\t\t\tconst otherField = document.getElementById('other-school-field');\n\t\t\t\t\t\tif (otherField) {\n\t\t\t\t\t\t\totherField.style.display = school.id === 'other' ? 'block' : 'none';\n\t\t\t\t\t\t\tif (school.id !== 'other') {\n\t\t\t\t\t\t\t\tconst otherInput = otherField.querySelector('input');\n\t\t\t\t\t\t\t\tif (otherInput) otherInput.value = '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tschoolDropdown.appendChild(option);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t\/\/ Close dropdown when clicking outside\n\t\t\tdocument.addEventListener('click', function(e) {\n\t\t\t\tif (e.target !== schoolInput && !schoolDropdown.contains(e.target)) {\n\t\t\t\t\tschoolDropdown.style.display = 'none';\n\t\t\t\t}\n\t\t\t});\n\t\t})();\n\n\t\t\/\/ Student School Dropdown with AJAX Search\n\t\t(function() {\n\t\t\tconst schoolInput = document.getElementById('student_school');\n\t\t\tconst schoolIdInput = document.getElementById('student_school_id');\n\t\t\tconst schoolDropdown = document.getElementById('student-school-dropdown');\n\n\t\t\t\/\/ All schools data\n\t\t\tconst allSchools = [\n\t\t\t\t\t\t\t\t\t{ id: 'ubc-allard', title: 'University of British Columbia (Allard)' },\n\t\t\t\t\t\t\t\t\t{ id: 'ubc-okanagan', title: 'University of British Columbia (Okanagan)' },\n\t\t\t\t\t\t\t\t\t{ id: 'tru', title: 'Thompson Rivers University' },\n\t\t\t\t\t\t\t\t\t{ id: 'ualberta', title: 'University of Alberta' },\n\t\t\t\t\t\t\t\t\t{ id: 'ucalgary', title: 'University of Calgary' },\n\t\t\t\t\t\t\t\t\t{ id: 'usask', title: 'University of Saskatchewan' },\n\t\t\t\t\t\t\t\t\t{ id: 'umanitoba', title: 'University of Manitoba' },\n\t\t\t\t\t\t\t\t\t{ id: 'lakehead', title: 'Lakehead University (Bora Laskin)' },\n\t\t\t\t\t\t\t\t\t{ id: 'uwindsor', title: 'University of Windsor' },\n\t\t\t\t\t\t\t\t\t{ id: 'western', title: 'Western University' },\n\t\t\t\t\t\t\t\t\t{ id: 'uguelph', title: 'University of Guelph' },\n\t\t\t\t\t\t\t\t\t{ id: 'york-osgoode', title: 'York University (Osgoode Hall)' },\n\t\t\t\t\t\t\t\t\t{ id: 'utoronto', title: 'University of Toronto' },\n\t\t\t\t\t\t\t\t\t{ id: 'queens', title: 'Queen\\'s University' },\n\t\t\t\t\t\t\t\t\t{ id: 'uottawa', title: 'University of Ottawa' },\n\t\t\t\t\t\t\t\t\t{ id: 'mcgill', title: 'McGill University' },\n\t\t\t\t\t\t\t\t\t{ id: 'laval', title: 'Universit\u00e9 Laval' },\n\t\t\t\t\t\t\t\t\t{ id: 'sherbrooke', title: 'Universit\u00e9 de Sherbrooke' },\n\t\t\t\t\t\t\t\t\t{ id: 'unb', title: 'University of New Brunswick' },\n\t\t\t\t\t\t\t\t\t{ id: 'moncton', title: 'Universit\u00e9 de Moncton' },\n\t\t\t\t\t\t\t\t\t{ id: 'dalhousie', title: 'Dalhousie University' },\n\t\t\t\t\t\t\t\t\t{ id: 'uvictoria', title: 'University of Victoria' },\n\t\t\t\t\t\t\t\t\t{ id: 'umontreal', title: 'Universit\u00e9 de Montr\u00e9al' },\n\t\t\t\t\t\t\t\t\t{ id: 'other', title: 'Other' },\n\t\t\t\t\t\t\t];\n\n\t\t\tif (!schoolInput) return;\n\n\t\t\t\/\/ Show dropdown on focus\n\t\t\tschoolInput.addEventListener('focus', function() {\n\t\t\t\tif (!this.value.trim()) {\n\t\t\t\t\trenderSchools(allSchools);\n\t\t\t\t\tschoolDropdown.style.display = 'block';\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t\/\/ Filter schools on input\n\t\t\tschoolInput.addEventListener('input', function(e) {\n\t\t\t\tconst query = this.value.trim().toLowerCase();\n\t\t\t\t\n\t\t\t\tif (!query) {\n\t\t\t\t\trenderSchools(allSchools);\n\t\t\t\t} else {\n\t\t\t\t\tconst filtered = allSchools.filter(school =>\n\t\t\t\t\t\tschool.title.toLowerCase().includes(query)\n\t\t\t\t\t);\n\t\t\t\t\trenderSchools(filtered);\n\t\t\t\t}\n\n\t\t\t\tschoolDropdown.style.display = this.value.trim() || schoolDropdown.children.length ? 'block' : 'none';\n\t\t\t});\n\n\t\t\t\/\/ Render schools in dropdown\n\t\t\tfunction renderSchools(schoolsList) {\n\t\t\t\tschoolDropdown.innerHTML = '';\n\t\t\t\t\n\t\t\t\tif (schoolsList.length === 0) {\n\t\t\t\t\tschoolDropdown.innerHTML = '<div class=\"dropdown-no-results-text\">No schools found<\/div>';\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tschoolsList.forEach(school => {\n\t\t\t\t\tconst option = document.createElement('div');\n\t\t\t\t\toption.style.cssText = 'padding: 0.75rem; border-bottom: 1px solid #eee; cursor: pointer; transition: background-color 0.2s;';\n\t\t\t\t\toption.textContent = school.title;\n\t\t\t\t\toption.addEventListener('mouseover', function() {\n\t\t\t\t\t\tthis.style.backgroundColor = '#f0f8ff';\n\t\t\t\t\t});\n\t\t\t\t\toption.addEventListener('mouseout', function() {\n\t\t\t\t\t\tthis.style.backgroundColor = 'transparent';\n\t\t\t\t\t});\n\t\t\t\t\toption.addEventListener('click', function() {\n\t\t\t\t\t\tschoolInput.value = school.title;\n\t\t\t\t\t\tschoolIdInput.value = school.id;\n\t\t\t\t\t\tschoolDropdown.style.display = 'none';\n\t\t\t\t\t});\n\t\t\t\t\tschoolDropdown.appendChild(option);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t\/\/ Close dropdown when clicking outside\n\t\t\tdocument.addEventListener('click', function(e) {\n\t\t\t\tif (e.target !== schoolInput && !schoolDropdown.contains(e.target)) {\n\t\t\t\t\tschoolDropdown.style.display = 'none';\n\t\t\t\t}\n\t\t\t});\n\t\t})();\n\n\t\t\/\/ Scholar University Dropdown\n\t\t(function() {\n\t\t\tconst universityInput = document.getElementById('scholar_university');\n\t\t\tconst universityIdInput = document.getElementById('scholar_university_id');\n\t\t\tconst universityDropdown = document.getElementById('scholar-university-dropdown');\n\n\t\t\tconst allSchools = [\n\t\t\t\t\t\t\t\t\t{ id: 'ubc-allard', title: 'University of British Columbia (Allard)' },\n\t\t\t\t\t\t\t\t\t{ id: 'ubc-okanagan', title: 'University of British Columbia (Okanagan)' },\n\t\t\t\t\t\t\t\t\t{ id: 'tru', title: 'Thompson Rivers University' },\n\t\t\t\t\t\t\t\t\t{ id: 'ualberta', title: 'University of Alberta' },\n\t\t\t\t\t\t\t\t\t{ id: 'ucalgary', title: 'University of Calgary' },\n\t\t\t\t\t\t\t\t\t{ id: 'usask', title: 'University of Saskatchewan' },\n\t\t\t\t\t\t\t\t\t{ id: 'umanitoba', title: 'University of Manitoba' },\n\t\t\t\t\t\t\t\t\t{ id: 'lakehead', title: 'Lakehead University (Bora Laskin)' },\n\t\t\t\t\t\t\t\t\t{ id: 'uwindsor', title: 'University of Windsor' },\n\t\t\t\t\t\t\t\t\t{ id: 'western', title: 'Western University' },\n\t\t\t\t\t\t\t\t\t{ id: 'uguelph', title: 'University of Guelph' },\n\t\t\t\t\t\t\t\t\t{ id: 'york-osgoode', title: 'York University (Osgoode Hall)' },\n\t\t\t\t\t\t\t\t\t{ id: 'utoronto', title: 'University of Toronto' },\n\t\t\t\t\t\t\t\t\t{ id: 'queens', title: 'Queen\\'s University' },\n\t\t\t\t\t\t\t\t\t{ id: 'uottawa', title: 'University of Ottawa' },\n\t\t\t\t\t\t\t\t\t{ id: 'mcgill', title: 'McGill University' },\n\t\t\t\t\t\t\t\t\t{ id: 'laval', title: 'Universit\u00e9 Laval' },\n\t\t\t\t\t\t\t\t\t{ id: 'sherbrooke', title: 'Universit\u00e9 de Sherbrooke' },\n\t\t\t\t\t\t\t\t\t{ id: 'unb', title: 'University of New Brunswick' },\n\t\t\t\t\t\t\t\t\t{ id: 'moncton', title: 'Universit\u00e9 de Moncton' },\n\t\t\t\t\t\t\t\t\t{ id: 'dalhousie', title: 'Dalhousie University' },\n\t\t\t\t\t\t\t\t\t{ id: 'uvictoria', title: 'University of Victoria' },\n\t\t\t\t\t\t\t\t\t{ id: 'umontreal', title: 'Universit\u00e9 de Montr\u00e9al' },\n\t\t\t\t\t\t\t\t\t{ id: 'other', title: 'Other' },\n\t\t\t\t\t\t\t];\n\n\t\t\tif (!universityInput) return;\n\n\t\t\tuniversityInput.addEventListener('focus', function() {\n\t\t\t\tif (!this.value.trim()) {\n\t\t\t\t\trenderUniversities(allSchools);\n\t\t\t\t\tuniversityDropdown.style.display = 'block';\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tuniversityInput.addEventListener('input', function(e) {\n\t\t\t\tconst query = this.value.trim().toLowerCase();\n\t\t\t\t\n\t\t\t\tif (!query) {\n\t\t\t\t\trenderUniversities(allSchools);\n\t\t\t\t} else {\n\t\t\t\t\tconst filtered = allSchools.filter(school =>\n\t\t\t\t\t\tschool.title.toLowerCase().includes(query)\n\t\t\t\t\t);\n\t\t\t\t\trenderUniversities(filtered);\n\t\t\t\t}\n\n\t\t\t\tuniversityDropdown.style.display = this.value.trim() || universityDropdown.children.length ? 'block' : 'none';\n\t\t\t});\n\n\t\t\tfunction renderUniversities(schoolsList) {\n\t\t\t\tuniversityDropdown.innerHTML = '';\n\t\t\t\t\n\t\t\t\tif (schoolsList.length === 0) {\n\t\t\t\t\tuniversityDropdown.innerHTML = '<div class=\"dropdown-no-results-text\">No universities found<\/div>';\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tschoolsList.forEach(school => {\n\t\t\t\t\tconst option = document.createElement('div');\n\t\t\t\t\toption.style.cssText = 'padding: 0.75rem; border-bottom: 1px solid #eee; cursor: pointer; transition: background-color 0.2s;';\n\t\t\t\t\toption.textContent = school.title;\n\t\t\t\t\toption.addEventListener('mouseover', function() {\n\t\t\t\t\t\tthis.style.backgroundColor = '#f0f8ff';\n\t\t\t\t\t});\n\t\t\t\t\toption.addEventListener('mouseout', function() {\n\t\t\t\t\t\tthis.style.backgroundColor = 'transparent';\n\t\t\t\t\t});\n\t\t\t\t\toption.addEventListener('click', function() {\n\t\t\t\t\t\tuniversityInput.value = school.title;\n\t\t\t\t\t\tuniversityIdInput.value = school.id;\n\t\t\t\t\t\tuniversityDropdown.style.display = 'none';\n\t\t\t\t\t});\n\t\t\t\t\tuniversityDropdown.appendChild(option);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tdocument.addEventListener('click', function(e) {\n\t\t\t\tif (e.target !== universityInput && !universityDropdown.contains(e.target)) {\n\t\t\t\t\tuniversityDropdown.style.display = 'none';\n\t\t\t\t}\n\t\t\t});\n\t\t})();\n\n\t\t\/\/ Junior Scholar University Dropdown\n\t\t(function() {\n\t\t\tconst universityInput = document.getElementById('jr_scholar_university');\n\t\t\tconst universityIdInput = document.getElementById('jr_scholar_university_id');\n\t\t\tconst universityDropdown = document.getElementById('jr_scholar-university-dropdown');\n\n\t\t\tconst allSchools = [\n\t\t\t\t\t\t\t\t\t{ id: 'ubc-allard', title: 'University of British Columbia (Allard)' },\n\t\t\t\t\t\t\t\t\t{ id: 'ubc-okanagan', title: 'University of British Columbia (Okanagan)' },\n\t\t\t\t\t\t\t\t\t{ id: 'tru', title: 'Thompson Rivers University' },\n\t\t\t\t\t\t\t\t\t{ id: 'ualberta', title: 'University of Alberta' },\n\t\t\t\t\t\t\t\t\t{ id: 'ucalgary', title: 'University of Calgary' },\n\t\t\t\t\t\t\t\t\t{ id: 'usask', title: 'University of Saskatchewan' },\n\t\t\t\t\t\t\t\t\t{ id: 'umanitoba', title: 'University of Manitoba' },\n\t\t\t\t\t\t\t\t\t{ id: 'lakehead', title: 'Lakehead University (Bora Laskin)' },\n\t\t\t\t\t\t\t\t\t{ id: 'uwindsor', title: 'University of Windsor' },\n\t\t\t\t\t\t\t\t\t{ id: 'western', title: 'Western University' },\n\t\t\t\t\t\t\t\t\t{ id: 'uguelph', title: 'University of Guelph' },\n\t\t\t\t\t\t\t\t\t{ id: 'york-osgoode', title: 'York University (Osgoode Hall)' },\n\t\t\t\t\t\t\t\t\t{ id: 'utoronto', title: 'University of Toronto' },\n\t\t\t\t\t\t\t\t\t{ id: 'queens', title: 'Queen\\'s University' },\n\t\t\t\t\t\t\t\t\t{ id: 'uottawa', title: 'University of Ottawa' },\n\t\t\t\t\t\t\t\t\t{ id: 'mcgill', title: 'McGill University' },\n\t\t\t\t\t\t\t\t\t{ id: 'laval', title: 'Universit\u00e9 Laval' },\n\t\t\t\t\t\t\t\t\t{ id: 'sherbrooke', title: 'Universit\u00e9 de Sherbrooke' },\n\t\t\t\t\t\t\t\t\t{ id: 'unb', title: 'University of New Brunswick' },\n\t\t\t\t\t\t\t\t\t{ id: 'moncton', title: 'Universit\u00e9 de Moncton' },\n\t\t\t\t\t\t\t\t\t{ id: 'dalhousie', title: 'Dalhousie University' },\n\t\t\t\t\t\t\t\t\t{ id: 'uvictoria', title: 'University of Victoria' },\n\t\t\t\t\t\t\t\t\t{ id: 'umontreal', title: 'Universit\u00e9 de Montr\u00e9al' },\n\t\t\t\t\t\t\t\t\t{ id: 'other', title: 'Other' },\n\t\t\t\t\t\t\t];\n\n\t\t\tif (!universityInput) return;\n\n\t\t\tuniversityInput.addEventListener('focus', function() {\n\t\t\t\tif (!this.value.trim()) {\n\t\t\t\t\trenderUniversities(allSchools);\n\t\t\t\t\tuniversityDropdown.style.display = 'block';\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tuniversityInput.addEventListener('input', function(e) {\n\t\t\t\tconst query = this.value.trim().toLowerCase();\n\t\t\t\t\n\t\t\t\tif (!query) {\n\t\t\t\t\trenderUniversities(allSchools);\n\t\t\t\t} else {\n\t\t\t\t\tconst filtered = allSchools.filter(school =>\n\t\t\t\t\t\tschool.title.toLowerCase().includes(query)\n\t\t\t\t\t);\n\t\t\t\t\trenderUniversities(filtered);\n\t\t\t\t}\n\n\t\t\t\tuniversityDropdown.style.display = this.value.trim() || universityDropdown.children.length ? 'block' : 'none';\n\t\t\t});\n\n\t\t\tfunction renderUniversities(schoolsList) {\n\t\t\t\tuniversityDropdown.innerHTML = '';\n\t\t\t\t\n\t\t\t\tif (schoolsList.length === 0) {\n\t\t\t\t\tuniversityDropdown.innerHTML = '<div class=\"dropdown-no-results-text\">No universities found<\/div>';\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tschoolsList.forEach(school => {\n\t\t\t\t\tconst option = document.createElement('div');\n\t\t\t\t\toption.style.cssText = 'padding: 0.75rem; border-bottom: 1px solid #eee; cursor: pointer; transition: background-color 0.2s;';\n\t\t\t\t\toption.textContent = school.title;\n\t\t\t\t\toption.addEventListener('mouseover', function() {\n\t\t\t\t\t\tthis.style.backgroundColor = '#f0f8ff';\n\t\t\t\t\t});\n\t\t\t\t\toption.addEventListener('mouseout', function() {\n\t\t\t\t\t\tthis.style.backgroundColor = 'transparent';\n\t\t\t\t\t});\n\t\t\t\t\toption.addEventListener('click', function() {\n\t\t\t\t\t\tuniversityInput.value = school.title;\n\t\t\t\t\t\tuniversityIdInput.value = school.id;\n\t\t\t\t\t\tuniversityDropdown.style.display = 'none';\n\t\t\t\t\t});\n\t\t\t\t\tuniversityDropdown.appendChild(option);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tdocument.addEventListener('click', function(e) {\n\t\t\t\tif (e.target !== universityInput && !universityDropdown.contains(e.target)) {\n\t\t\t\t\tuniversityDropdown.style.display = 'none';\n\t\t\t\t}\n\t\t\t});\n\t\t})();\n\n\t\t\/\/ Law School Dropdown with AJAX Search\n\t\t(function() {\n\t\t\t\/\/ Law School List (for Lawyer, Jr Lawyer, Scholar, Jr Scholar)\n\t\t\tconst lawSchoolList = [\n\t\t\t\t{ id: 'ubc-allard', title: 'University of British Columbia (Allard)' },\n\t\t\t\t{ id: 'tru', title: 'Thompson Rivers University' },\n\t\t\t\t{ id: 'ualberta', title: 'University of Alberta' },\n\t\t\t\t{ id: 'ucalgary', title: 'University of Calgary' },\n\t\t\t\t{ id: 'usask', title: 'University of Saskatchewan' },\n\t\t\t\t{ id: 'umanitoba', title: 'University of Manitoba' },\n\t\t\t\t{ id: 'lakehead', title: 'Lakehead University (Bora Laskin)' },\n\t\t\t\t{ id: 'uwindsor', title: 'University of Windsor' },\n\t\t\t\t{ id: 'western', title: 'Western University' },\n\t\t\t\t{ id: 'york-osgoode', title: 'York University (Osgoode Hall)' },\n\t\t\t\t{ id: 'utoronto', title: 'University of Toronto' },\n\t\t\t\t{ id: 'queens', title: 'Queen\\'s University' },\n\t\t\t\t{ id: 'uottawa', title: 'University of Ottawa' },\n\t\t\t\t{ id: 'mcgill', title: 'McGill University' },\n\t\t\t\t{ id: 'laval', title: 'Universit\u00e9 Laval' },\n\t\t\t\t{ id: 'sherbrooke', title: 'Universit\u00e9 de Sherbrooke' },\n\t\t\t\t{ id: 'unb', title: 'University of New Brunswick' },\n\t\t\t\t{ id: 'moncton', title: 'Universit\u00e9 de Moncton' },\n\t\t\t\t{ id: 'dalhousie', title: 'Dalhousie University' },\n\t\t\t\t{ id: 'uvictoria', title: 'University of Victoria' },\n\t\t\t\t{ id: 'umontreal', title: 'Universit\u00e9 de Montr\u00e9al' },\n\t\t\t\t{ id: 'tmu', title: 'Toronto Metropolitan University' },\n\t\t\t\t{ id: 'uqam', title: 'UQAM' },\n\t\t\t\t{ id: 'other', title: 'Other' }\n\t\t\t];\n\n\t\t\t\/\/ All Schools List (for Student plans)\n\t\t\tconst allSchoolsList = [\n\t\t\t\t{ id: 'carleton', title: 'Carleton University' },\n\t\t\t\t{ id: 'concordia', title: 'Concordia University' },\n\t\t\t\t{ id: 'dalhousie', title: 'Dalhousie University' },\n\t\t\t\t{ id: 'lakehead', title: 'Lakehead University (Bora Laskin)' },\n\t\t\t\t{ id: 'mcgill', title: 'McGill University' },\n\t\t\t\t{ id: 'mcmaster', title: 'McMaster University' },\n\t\t\t\t{ id: 'queens', title: 'Queen\\'s University' },\n\t\t\t\t{ id: 'sfu', title: 'Simon Fraser University' },\n\t\t\t\t{ id: 'tru', title: 'Thompson Rivers University' },\n\t\t\t\t{ id: 'tmu', title: 'Toronto Metropolitan University' },\n\t\t\t\t{ id: 'moncton', title: 'Universit\u00e9 de Moncton' },\n\t\t\t\t{ id: 'umontreal', title: 'Universit\u00e9 de Montr\u00e9al' },\n\t\t\t\t{ id: 'sherbrooke', title: 'Universit\u00e9 de Sherbrooke' },\n\t\t\t\t{ id: 'laval', title: 'Universit\u00e9 Laval' },\n\t\t\t\t{ id: 'ualberta', title: 'University of Alberta' },\n\t\t\t\t{ id: 'ubc-allard', title: 'University of British Columbia (Allard)' },\n\t\t\t\t{ id: 'ubc-okanagan', title: 'University of British Columbia (Okanagan)' },\n\t\t\t\t{ id: 'ucalgary', title: 'University of Calgary' },\n\t\t\t\t{ id: 'uguelph', title: 'University of Guelph' },\n\t\t\t\t{ id: 'umanitoba', title: 'University of Manitoba' },\n\t\t\t\t{ id: 'unb', title: 'University of New Brunswick' },\n\t\t\t\t{ id: 'uottawa', title: 'University of Ottawa' },\n\t\t\t\t{ id: 'usask', title: 'University of Saskatchewan' },\n\t\t\t\t{ id: 'utoronto', title: 'University of Toronto' },\n\t\t\t\t{ id: 'uvictoria', title: 'University of Victoria' },\n\t\t\t\t{ id: 'uwaterloo', title: 'University of Waterloo' },\n\t\t\t\t{ id: 'uwindsor', title: 'University of Windsor' },\n\t\t\t\t{ id: 'western', title: 'Western University' },\n\t\t\t\t{ id: 'laurier', title: 'Wilfrid Laurier University' },\n\t\t\t\t{ id: 'york-osgoode', title: 'York University (Osgoode Hall)' },\n\t\t\t\t{ id: 'other', title: 'Other' }\n\t\t\t];\n\n\t\t\t\/\/ Determine which list to use based on field name\n\t\t\tfunction getSchoolList(fieldName) {\n\t\t\t\t\/\/ Use allSchoolsList only for undergraduate\/university fields\n\t\t\t\tif (fieldName.includes('university')) {\n\t\t\t\t\treturn allSchoolsList;\n\t\t\t\t}\n\t\t\t\t\/\/ Use lawSchoolList for all law school and articling fields\n\t\t\t\treturn lawSchoolList;\n\t\t\t}\n\n\t\t\tconst lawSchoolInputs = document.querySelectorAll('.law-school-search');\n\n\t\t\tlawSchoolInputs.forEach(schoolInput => {\n\t\t\t\tconst planType = schoolInput.name.replace('_law_school', '');\n\t\t\t\tconst schoolIdInput = document.getElementById(planType + '_law_school_id');\n\t\t\t\tconst schoolDropdown = document.getElementById(planType + '-law-school-dropdown');\n\t\t\t\tconst schoolList = getSchoolList(schoolInput.name);\n\n\t\t\t\tif (!schoolInput || !schoolDropdown) return;\n\n\t\t\t\t\/\/ Show dropdown on focus\n\t\t\t\tschoolInput.addEventListener('focus', function() {\n\t\t\t\t\tif (!this.value.trim()) {\n\t\t\t\t\t\trenderSchools(schoolList, schoolDropdown);\n\t\t\t\t\t\tschoolDropdown.style.display = 'block';\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t\/\/ Filter schools on input\n\t\t\t\tschoolInput.addEventListener('input', function(e) {\n\t\t\t\t\tconst query = this.value.trim().toLowerCase();\n\t\t\t\t\t\n\t\t\t\t\tif (!query) {\n\t\t\t\t\t\trenderSchools(schoolList, schoolDropdown);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst filtered = schoolList.filter(school =>\n\t\t\t\t\t\t\tschool.title.toLowerCase().includes(query)\n\t\t\t\t\t\t);\n\t\t\t\t\t\trenderSchools(filtered, schoolDropdown);\n\t\t\t\t\t}\n\n\t\t\t\t\tschoolDropdown.style.display = this.value.trim() || schoolDropdown.children.length ? 'block' : 'none';\n\t\t\t\t});\n\n\t\t\t\t\/\/ Render schools in dropdown\n\t\t\t\tfunction renderSchools(schools, dropdown) {\n\t\t\t\t\tdropdown.innerHTML = '';\n\t\t\t\t\t\n\t\t\t\t\tif (schools.length === 0) {\n\t\t\t\t\t\tdropdown.innerHTML = '<div class=\"dropdown-no-results-text\">No schools found<\/div>';\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tschools.forEach(school => {\n\t\t\t\t\t\tconst option = document.createElement('div');\n\t\t\t\t\t\toption.style.cssText = 'padding: 0.75rem; border-bottom: 1px solid #eee; cursor: pointer; transition: background-color 0.2s;';\n\t\t\t\t\t\toption.textContent = school.title;\n\t\t\t\t\t\toption.addEventListener('mouseover', function() {\n\t\t\t\t\t\t\tthis.style.backgroundColor = '#f0f8ff';\n\t\t\t\t\t\t});\n\t\t\t\t\t\toption.addEventListener('mouseout', function() {\n\t\t\t\t\t\t\tthis.style.backgroundColor = 'transparent';\n\t\t\t\t\t\t});\n\t\t\t\t\t\toption.addEventListener('click', function() {\n\t\t\t\t\t\t\tschoolInput.value = school.title;\n\t\t\t\t\t\t\tif (schoolIdInput) {\n\t\t\t\t\t\t\t\tschoolIdInput.value = school.id;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdropdown.style.display = 'none';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\/\/ Show\/hide inline \"Other\" field if needed\n\t\t\t\t\t\t\t\/\/ Find the other input in the same row (flex container)\n\t\t\t\t\t\t\tconst flexContainer = schoolInput.closest('[style*=\"display: flex\"]');\n\t\t\t\t\t\t\tif (flexContainer) {\n\t\t\t\t\t\t\t\tconst otherInput = flexContainer.querySelector('input[name*=\"_other_school\"]');\n\t\t\t\t\t\t\t\tif (otherInput) {\n\t\t\t\t\t\t\t\t\tif (school.id === 'other') {\n\t\t\t\t\t\t\t\t\t\totherInput.style.display = 'block';\n\t\t\t\t\t\t\t\t\t\totherInput.focus();\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\totherInput.style.display = 'none';\n\t\t\t\t\t\t\t\t\t\totherInput.value = '';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\tdropdown.appendChild(option);\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tdocument.addEventListener('click', function(e) {\n\t\t\t\t\tif (e.target !== schoolInput && !schoolDropdown.contains(e.target)) {\n\t\t\t\t\t\tschoolDropdown.style.display = 'none';\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t})();\n\n\t\t\t\/\/ Student type conditional fields\n\t\t(function() {\n\t\t\tconst studentTypeSelect = document.getElementById('student_type');\n\t\t\tconst undergradSection = document.getElementById('student-undergraduate-section');\n\t\t\tconst lawSchoolSection = document.getElementById('student-law-school-section');\n\t\t\tconst articlingSection = document.getElementById('student-articling-section');\n\n\t\t\tif (!studentTypeSelect) return;\n\n\t\t\tfunction updateStudentRequiredFields(selectedType) {\n\t\t\t\tconst studentFields = document.querySelectorAll('[data-student-required]');\n\t\t\t\tstudentFields.forEach(field => {\n\t\t\t\t\tconst requirement = field.getAttribute('data-student-required');\n\t\t\t\t\tif (requirement === '1') {\n\t\t\t\t\t\tif (selectedType) {\n\t\t\t\t\t\t\tfield.setAttribute('required', 'required');\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tfield.removeAttribute('required');\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (selectedType && requirement === selectedType) {\n\t\t\t\t\t\tfield.setAttribute('required', 'required');\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfield.removeAttribute('required');\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tstudentTypeSelect.addEventListener('change', function() {\n\t\t\t\tconst studentType = this.value;\n\t\t\t\t\n\t\t\t\t\/\/ Hide all sections first by adding hidden class\n\t\t\t\tif (undergradSection) undergradSection.classList.add('hidden');\n\t\t\t\tif (lawSchoolSection) lawSchoolSection.classList.add('hidden');\n\t\t\t\tif (articlingSection) articlingSection.classList.add('hidden');\n\n\t\t\t\t\/\/ Show appropriate section by removing hidden class\n\t\t\t\tif (studentType === 'undergraduate' && undergradSection) {\n\t\t\t\t\tundergradSection.classList.remove('hidden');\n\t\t\t\t} else if (studentType === 'law_school' && lawSchoolSection) {\n\t\t\t\t\tlawSchoolSection.classList.remove('hidden');\n\t\t\t\t} else if (studentType === 'articling_clerkship' && articlingSection) {\n\t\t\t\t\tarticlingSection.classList.remove('hidden');\n\t\t\t\t}\n\n\t\t\t\tupdateStudentRequiredFields(studentType);\n\t\t\t});\n\n\t\t\tupdateStudentRequiredFields(studentTypeSelect.value);\n\t\t})();\n\n\t\t\/\/ University search for undergraduate students\n\t\t(function() {\n\t\t\tconst universities = [\n\t\t\t\t\/\/ British Columbia\n\t\t\t\t{ id: 'bcit', title: 'British Columbia Institute of Technology (BCIT)' },\n\t\t\t\t{ id: 'kwantlen', title: 'Kwantlen Polytechnic University' },\n\t\t\t\t{ id: 'sfu', title: 'Simon Fraser University' },\n\t\t\t\t{ id: 'tru', title: 'Thompson Rivers University' },\n\t\t\t\t{ id: 'ubc', title: 'University of British Columbia' },\n\t\t\t\t{ id: 'uvictoria', title: 'University of Victoria' },\n\t\t\t\t\/\/ Alberta\n\t\t\t\t{ id: 'athabasca', title: 'Athabasca University' },\n\t\t\t\t{ id: 'macewan', title: 'MacEwan University' },\n\t\t\t\t{ id: 'mount-royal', title: 'Mount Royal University' },\n\t\t\t\t{ id: 'ualberta', title: 'University of Alberta' },\n\t\t\t\t{ id: 'ucalgary', title: 'University of Calgary' },\n\t\t\t\t\/\/ Saskatchewan\n\t\t\t\t{ id: 'uregina', title: 'University of Regina' },\n\t\t\t\t{ id: 'usask', title: 'University of Saskatchewan' },\n\t\t\t\t\/\/ Manitoba\n\t\t\t\t{ id: 'umanitoba', title: 'University of Manitoba' },\n\t\t\t\t\/\/ Ontario Universities\n\t\t\t\t{ id: 'brock', title: 'Brock University' },\n\t\t\t\t{ id: 'carleton', title: 'Carleton University' },\n\t\t\t\t{ id: 'mcmaster', title: 'McMaster University' },\n\t\t\t\t{ id: 'ontariotech', title: 'Ontario Tech University' },\n\t\t\t\t{ id: 'queens', title: \"Queen's University\" },\n\t\t\t\t{ id: 'tmu', title: 'Toronto Metropolitan University' },\n\t\t\t\t{ id: 'trent', title: 'Trent University' },\n\t\t\t\t{ id: 'uguelph', title: 'University of Guelph' },\n\t\t\t\t{ id: 'uottawa', title: 'University of Ottawa' },\n\t\t\t\t{ id: 'utoronto', title: 'University of Toronto' },\n\t\t\t\t{ id: 'uwaterloo', title: 'University of Waterloo' },\n\t\t\t\t{ id: 'uwindsor', title: 'University of Windsor' },\n\t\t\t\t{ id: 'western', title: 'Western University' },\n\t\t\t\t{ id: 'laurier', title: 'Wilfrid Laurier University' },\n\t\t\t\t{ id: 'york', title: 'York University' },\n\t\t\t\t\/\/ Ontario Colleges\n\t\t\t\t{ id: 'algonquin', title: 'Algonquin College' },\n\t\t\t\t{ id: 'centennial', title: 'Centennial College' },\n\t\t\t\t{ id: 'conestoga', title: 'Conestoga College' },\n\t\t\t\t{ id: 'durham', title: 'Durham College' },\n\t\t\t\t{ id: 'fanshawe', title: 'Fanshawe College' },\n\t\t\t\t{ id: 'georgebrown', title: 'George Brown College' },\n\t\t\t\t{ id: 'humber', title: 'Humber Polytechnic' },\n\t\t\t\t{ id: 'lambton', title: 'Lambton College' },\n\t\t\t\t{ id: 'mohawk', title: 'Mohawk College' },\n\t\t\t\t{ id: 'niagara', title: 'Niagara College' },\n\t\t\t\t{ id: 'seneca', title: 'Seneca Polytechnic' },\n\t\t\t\t{ id: 'sheridan', title: 'Sheridan College' },\n\t\t\t\t{ id: 'stlawrence', title: 'St. Lawrence College' },\n\t\t\t\t\/\/ Quebec Universities\n\t\t\t\t{ id: 'concordia', title: 'Concordia University' },\n\t\t\t\t{ id: 'hecmontreal', title: 'HEC Montr\u00e9al' },\n\t\t\t\t{ id: 'mcgill', title: 'McGill University' },\n\t\t\t\t{ id: 'polytechnique', title: 'Polytechnique Montr\u00e9al' },\n\t\t\t\t{ id: 'umontreal', title: 'Universit\u00e9 de Montr\u00e9al' },\n\t\t\t\t{ id: 'usherbrooke', title: 'Universit\u00e9 de Sherbrooke' },\n\t\t\t\t{ id: 'uqam', title: 'Universit\u00e9 du Qu\u00e9bec \u00e0 Montr\u00e9al (UQAM)' },\n\t\t\t\t{ id: 'uqtr', title: 'Universit\u00e9 du Qu\u00e9bec \u00e0 Trois-Rivi\u00e8res (UQTR)' },\n\t\t\t\t{ id: 'laval', title: 'Universit\u00e9 Laval' },\n\t\t\t\t\/\/ Atlantic\n\t\t\t\t{ id: 'dalhousie', title: 'Dalhousie University' },\n\t\t\t\t{ id: 'munfl', title: 'Memorial University of Newfoundland' },\n\t\t\t\t{ id: 'unb', title: 'University of New Brunswick' },\n\t\t\t\t\/\/ Other\n\t\t\t\t{ id: 'other', title: 'Other' }\n\t\t\t];\n\n\t\t\tconst universityInput = document.getElementById('student_university');\n\t\t\tconst universityDropdown = document.getElementById('student-university-dropdown');\n\t\t\tconst universityIdInput = document.getElementById('student_university_id');\n\n\t\t\tif (!universityInput || !universityDropdown) return;\n\n\t\t\t\/\/ Show dropdown on focus\n\t\t\tuniversityInput.addEventListener('focus', function() {\n\t\t\t\tif (!this.value.trim()) {\n\t\t\t\t\trenderUniversities(universities, universityDropdown);\n\t\t\t\t\tuniversityDropdown.style.display = 'block';\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t\/\/ Filter universities on input\n\t\t\tuniversityInput.addEventListener('input', function(e) {\n\t\t\t\tconst query = this.value.trim().toLowerCase();\n\t\t\t\t\n\t\t\t\tif (!query) {\n\t\t\t\t\trenderUniversities(universities, universityDropdown);\n\t\t\t\t} else {\n\t\t\t\t\tconst filtered = universities.filter(uni =>\n\t\t\t\t\t\tuni.title.toLowerCase().includes(query)\n\t\t\t\t\t);\n\t\t\t\t\trenderUniversities(filtered, universityDropdown);\n\t\t\t\t}\n\n\t\t\t\tuniversityDropdown.style.display = this.value.trim() || universityDropdown.children.length ? 'block' : 'none';\n\t\t\t});\n\n\t\t\t\/\/ Render universities in dropdown\n\t\t\tfunction renderUniversities(uniList, dropdown) {\n\t\t\t\tdropdown.innerHTML = '';\n\t\t\t\t\n\t\t\t\tif (uniList.length === 0) {\n\t\t\t\t\tdropdown.innerHTML = '<div class=\"dropdown-no-results-text\">No universities found<\/div>';\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tuniList.forEach(uni => {\n\t\t\t\t\tconst option = document.createElement('div');\n\t\t\t\t\toption.style.cssText = 'padding: 0.75rem; border-bottom: 1px solid #eee; cursor: pointer; transition: background-color 0.2s;';\n\t\t\t\t\toption.textContent = uni.title;\n\t\t\t\t\toption.addEventListener('mouseover', function() {\n\t\t\t\t\t\tthis.style.backgroundColor = '#f0f8ff';\n\t\t\t\t\t});\n\t\t\t\t\toption.addEventListener('mouseout', function() {\n\t\t\t\t\t\tthis.style.backgroundColor = 'transparent';\n\t\t\t\t\t});\n\t\t\t\t\toption.addEventListener('click', function() {\n\t\t\t\t\t\tuniversityInput.value = uni.title;\n\t\t\t\t\t\tif (universityIdInput) {\n\t\t\t\t\t\t\tuniversityIdInput.value = uni.id;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdropdown.style.display = 'none';\n\t\t\t\t\t\t\n\t\t\t\t\t\t\/\/ Show\/hide inline \"Other\" field if needed (same as law school)\n\t\t\t\t\t\tconst flexContainer = universityInput.closest('[style*=\"display: flex\"]');\n\t\t\t\t\t\tif (flexContainer) {\n\t\t\t\t\t\t\tconst otherInput = flexContainer.querySelector('input[name*=\"_other_school\"]');\n\t\t\t\t\t\t\tif (otherInput) {\n\t\t\t\t\t\t\t\tif (uni.id === 'other') {\n\t\t\t\t\t\t\t\t\totherInput.style.display = 'block';\n\t\t\t\t\t\t\t\t\totherInput.focus();\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\totherInput.style.display = 'none';\n\t\t\t\t\t\t\t\t\totherInput.value = '';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tdropdown.appendChild(option);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tdocument.addEventListener('click', function(e) {\n\t\t\t\tif (e.target !== universityInput && !universityDropdown.contains(e.target)) {\n\t\t\t\t\tuniversityDropdown.style.display = 'none';\n\t\t\t\t}\n\t\t\t});\n\t\t})();\n\n\t\t\/\/ Law school search for students\n\t\t(function() {\n\t\t\tconst allLawSchools = [\n\t\t\t\t{ id: 'ubc-allard', title: 'University of British Columbia (Allard)' },\n\t\t\t\t{ id: 'ubc-okanagan', title: 'University of British Columbia (Okanagan)' },\n\t\t\t\t{ id: 'tru', title: 'Thompson Rivers University' },\n\t\t\t\t{ id: 'ualberta', title: 'University of Alberta' },\n\t\t\t\t{ id: 'ucalgary', title: 'University of Calgary' },\n\t\t\t\t{ id: 'usask', title: 'University of Saskatchewan' },\n\t\t\t\t{ id: 'umanitoba', title: 'University of Manitoba' },\n\t\t\t\t{ id: 'lakehead', title: 'Lakehead University (Bora Laskin)' },\n\t\t\t\t{ id: 'uwindsor', title: 'University of Windsor' },\n\t\t\t\t{ id: 'western', title: 'Western University' },\n\t\t\t\t{ id: 'uguelph', title: 'University of Guelph' },\n\t\t\t\t{ id: 'york-osgoode', title: 'York University (Osgoode Hall)' },\n\t\t\t\t{ id: 'utoronto', title: 'University of Toronto' },\n\t\t\t\t{ id: 'queens', title: 'Queen\\'s University' },\n\t\t\t\t{ id: 'uottawa', title: 'University of Ottawa' },\n\t\t\t\t{ id: 'mcgill', title: 'McGill University' },\n\t\t\t\t{ id: 'laval', title: 'Universit\u00e9 Laval' },\n\t\t\t\t{ id: 'sherbrooke', title: 'Universit\u00e9 de Sherbrooke' },\n\t\t\t\t{ id: 'unb', title: 'University of New Brunswick' },\n\t\t\t\t{ id: 'moncton', title: 'Universit\u00e9 de Moncton' },\n\t\t\t\t{ id: 'dalhousie', title: 'Dalhousie University' },\n\t\t\t\t{ id: 'uvictoria', title: 'University of Victoria' },\n\t\t\t\t{ id: 'umontreal', title: 'Universit\u00e9 de Montr\u00e9al' },\n\t\t\t\t{ id: 'other', title: 'Other' }\n\t\t\t];\n\n\t\t\tconst lawSchoolInput = document.getElementById('student_law_school');\n\t\t\tconst lawSchoolIdInput = document.getElementById('student_law_school_id');\n\t\t\tconst lawSchoolDropdown = document.getElementById('student-law-school-dropdown');\n\n\t\t\tif (!lawSchoolInput || !lawSchoolDropdown) return;\n\n\t\t\t\/\/ Show dropdown on focus\n\t\t\tlawSchoolInput.addEventListener('focus', function() {\n\t\t\t\tif (!this.value.trim()) {\n\t\t\t\t\trenderLawSchools(allLawSchools, lawSchoolDropdown);\n\t\t\t\t\tlawSchoolDropdown.style.display = 'block';\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t\/\/ Filter schools on input\n\t\t\tlawSchoolInput.addEventListener('input', function(e) {\n\t\t\t\tconst query = this.value.trim().toLowerCase();\n\t\t\t\t\n\t\t\t\tif (!query) {\n\t\t\t\t\trenderLawSchools(allLawSchools, lawSchoolDropdown);\n\t\t\t\t} else {\n\t\t\t\t\tconst filtered = allLawSchools.filter(school =>\n\t\t\t\t\t\tschool.title.toLowerCase().includes(query)\n\t\t\t\t\t);\n\t\t\t\t\trenderLawSchools(filtered, lawSchoolDropdown);\n\t\t\t\t}\n\n\t\t\t\tlawSchoolDropdown.style.display = this.value.trim() || lawSchoolDropdown.children.length ? 'block' : 'none';\n\t\t\t});\n\t\t\t\/\/ Render schools in dropdown\n\t\t\tfunction renderLawSchools(schoolsList, dropdown) {\n\t\t\t\tdropdown.innerHTML = '';\n\t\t\t\t\n\t\t\t\tif (schoolsList.length === 0) {\n\t\t\t\t\tdropdown.innerHTML = '<div class=\"dropdown-no-results-text\">No schools found<\/div>';\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tschoolsList.forEach(school => {\n\t\t\t\t\tconst option = document.createElement('div');\n\t\t\t\t\toption.style.cssText = 'padding: 0.75rem; border-bottom: 1px solid #eee; cursor: pointer; transition: background-color 0.2s;';\n\t\t\t\t\toption.textContent = school.title;\n\t\t\t\t\toption.addEventListener('mouseover', function() {\n\t\t\t\t\t\tthis.style.backgroundColor = '#f0f8ff';\n\t\t\t\t\t});\n\t\t\t\t\toption.addEventListener('mouseout', function() {\n\t\t\t\t\t\tthis.style.backgroundColor = 'transparent';\n\t\t\t\t\t});\n\t\t\t\t\toption.addEventListener('click', function() {\n\t\t\t\t\t\tlawSchoolInput.value = school.title;\n\t\t\t\t\t\tif (lawSchoolIdInput) {\n\t\t\t\t\t\t\tlawSchoolIdInput.value = school.id;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdropdown.style.display = 'none';\n\t\t\t\t\t\t\n\t\t\t\t\t\t\/\/ Show\/hide inline \"Other\" field if needed\n\t\t\t\t\t\tconst flexContainer = lawSchoolInput.closest('[style*=\"display: flex\"]');\n\t\t\t\t\t\tif (flexContainer) {\n\t\t\t\t\t\t\tconst otherField = flexContainer.querySelector('input[name*=\"_other_school\"]');\n\t\t\t\t\t\t\tif (otherField) {\n\t\t\t\t\t\t\t\totherField.style.display = school.id === 'other' ? 'block' : 'none';\n\t\t\t\t\t\t\t\tif (school.id !== 'other') {\n\t\t\t\t\t\t\t\t\totherField.value = '';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tdropdown.appendChild(option);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tdocument.addEventListener('click', function(e) {\n\t\t\t\tif (e.target !== lawSchoolInput && !lawSchoolDropdown.contains(e.target)) {\n\t\t\t\t\tlawSchoolDropdown.style.display = 'none';\n\t\t\t\t}\n\t\t\t});\n\t\t})();\n\n\t\t\/\/ Law school search for articling\/clerkship students\n\t\t(function() {\n\t\t\tconst allLawSchools = [\n\t\t\t\t{ id: 'ubc-allard', title: 'University of British Columbia (Allard)' },\n\t\t\t\t{ id: 'ubc-okanagan', title: 'University of British Columbia (Okanagan)' },\n\t\t\t\t{ id: 'tru', title: 'Thompson Rivers University' },\n\t\t\t\t{ id: 'ualberta', title: 'University of Alberta' },\n\t\t\t\t{ id: 'ucalgary', title: 'University of Calgary' },\n\t\t\t\t{ id: 'usask', title: 'University of Saskatchewan' },\n\t\t\t\t{ id: 'umanitoba', title: 'University of Manitoba' },\n\t\t\t\t{ id: 'lakehead', title: 'Lakehead University (Bora Laskin)' },\n\t\t\t\t{ id: 'uwindsor', title: 'University of Windsor' },\n\t\t\t\t{ id: 'western', title: 'Western University' },\n\t\t\t\t{ id: 'uguelph', title: 'University of Guelph' },\n\t\t\t\t{ id: 'york-osgoode', title: 'York University (Osgoode Hall)' },\n\t\t\t\t{ id: 'utoronto', title: 'University of Toronto' },\n\t\t\t\t{ id: 'queens', title: 'Queen\\'s University' },\n\t\t\t\t{ id: 'uottawa', title: 'University of Ottawa' },\n\t\t\t\t{ id: 'mcgill', title: 'McGill University' },\n\t\t\t\t{ id: 'laval', title: 'Universit\u00e9 Laval' },\n\t\t\t\t{ id: 'sherbrooke', title: 'Universit\u00e9 de Sherbrooke' },\n\t\t\t\t{ id: 'unb', title: 'University of New Brunswick' },\n\t\t\t\t{ id: 'moncton', title: 'Universit\u00e9 de Moncton' },\n\t\t\t\t{ id: 'dalhousie', title: 'Dalhousie University' },\n\t\t\t\t{ id: 'uvictoria', title: 'University of Victoria' },\n\t\t\t\t{ id: 'umontreal', title: 'Universit\u00e9 de Montr\u00e9al' },\n\t\t\t\t{ id: 'other', title: 'Other' }\n\t\t\t];\n\n\t\t\tconst lawSchoolInput = document.getElementById('student_articling_law_school');\n\t\t\tconst lawSchoolIdInput = document.getElementById('student_articling_law_school_id');\n\t\t\tconst lawSchoolDropdown = document.getElementById('student-articling-law-school-dropdown');\n\n\t\t\tif (!lawSchoolInput || !lawSchoolDropdown) return;\n\n\t\t\t\/\/ Show dropdown on focus\n\t\t\tlawSchoolInput.addEventListener('focus', function() {\n\t\t\t\tif (!this.value.trim()) {\n\t\t\t\t\trenderLawSchools(allLawSchools, lawSchoolDropdown);\n\t\t\t\t\tlawSchoolDropdown.style.display = 'block';\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t\/\/ Filter schools on input\n\t\t\tlawSchoolInput.addEventListener('input', function(e) {\n\t\t\t\tconst query = this.value.trim().toLowerCase();\n\t\t\t\t\n\t\t\t\tif (!query) {\n\t\t\t\t\trenderLawSchools(allLawSchools, lawSchoolDropdown);\n\t\t\t\t} else {\n\t\t\t\t\tconst filtered = allLawSchools.filter(school =>\n\t\t\t\t\t\tschool.title.toLowerCase().includes(query)\n\t\t\t\t\t);\n\t\t\t\t\trenderLawSchools(filtered, lawSchoolDropdown);\n\t\t\t\t}\n\n\t\t\t\tlawSchoolDropdown.style.display = this.value.trim() || lawSchoolDropdown.children.length ? 'block' : 'none';\n\t\t\t});\n\n\t\t\t\/\/ Render schools in dropdown\n\t\t\tfunction renderLawSchools(schoolsList, dropdown) {\n\t\t\t\tdropdown.innerHTML = '';\n\t\t\t\t\n\t\t\t\tif (schoolsList.length === 0) {\n\t\t\t\t\tdropdown.innerHTML = '<div class=\"dropdown-no-results-text\">No schools found<\/div>';\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tschoolsList.forEach(school => {\n\t\t\t\t\tconst option = document.createElement('div');\n\t\t\t\t\toption.style.cssText = 'padding: 0.75rem; border-bottom: 1px solid #eee; cursor: pointer; transition: background-color 0.2s;';\n\t\t\t\t\toption.textContent = school.title;\n\t\t\t\t\toption.addEventListener('mouseover', function() {\n\t\t\t\t\t\tthis.style.backgroundColor = '#f0f8ff';\n\t\t\t\t\t});\n\t\t\t\t\toption.addEventListener('mouseout', function() {\n\t\t\t\t\t\tthis.style.backgroundColor = 'transparent';\n\t\t\t\t\t});\n\t\t\t\t\toption.addEventListener('click', function() {\n\t\t\t\t\t\tlawSchoolInput.value = school.title;\n\t\t\t\t\t\tif (lawSchoolIdInput) {\n\t\t\t\t\t\t\tlawSchoolIdInput.value = school.id;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdropdown.style.display = 'none';\n\t\t\t\t\t\t\n\t\t\t\t\t\t\/\/ Show\/hide inline \"Other\" field if needed\n\t\t\t\t\t\tconst flexContainer = lawSchoolInput.closest('[style*=\"display: flex\"]');\n\t\t\t\t\t\tif (flexContainer) {\n\t\t\t\t\t\t\tconst otherField = flexContainer.querySelector('input[name*=\"_other_school\"]');\n\t\t\t\t\t\t\tif (otherField) {\n\t\t\t\t\t\t\t\totherField.style.display = school.id === 'other' ? 'block' : 'none';\n\t\t\t\t\t\t\t\tif (school.id !== 'other') {\n\t\t\t\t\t\t\t\t\totherField.value = '';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tdropdown.appendChild(option);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tdocument.addEventListener('click', function(e) {\n\t\t\t\tif (e.target !== lawSchoolInput && !lawSchoolDropdown.contains(e.target)) {\n\t\t\t\t\tlawSchoolDropdown.style.display = 'none';\n\t\t\t\t}\n\t\t\t});\n\t\t})();\n\n\t\t\/\/ Clear button functionality for searchable inputs\n\t\t(function() {\n\t\t\tconst clearButtons = document.querySelectorAll('.clear-search-btn');\n\t\t\t\n\t\t\t\/\/ Map input IDs to their corresponding \"Other\" field IDs\n\t\t\tconst otherFieldMap = {\n\t\t\t\t'lawyer_law_school': 'lawyer-other-school-field',\n\t\t\t\t'jr_lawyer_law_school': 'jr_lawyer-other-school-field',\n\t\t\t\t'scholar_law_school': 'scholar-other-school-field',\n\t\t\t\t'jr_scholar_law_school': 'jr_scholar-other-school-field',\n\t\t\t\t'student_university': 'student-other-university-field',\n\t\t\t\t'student_law_school': 'student-other-law-school-field',\n\t\t\t\t'student_articling_law_school': null\n\t\t\t};\n\t\t\t\n\t\t\tclearButtons.forEach(button => {\n\t\t\t\t\/\/ Always show the clear button\n\t\t\t\tbutton.style.display = 'block';\n\t\t\t\t\n\t\t\t\tbutton.addEventListener('click', function(e) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tconst targetId = this.getAttribute('data-target');\n\t\t\t\t\tconst inputField = document.getElementById(targetId);\n\t\t\t\t\t\n\t\t\t\t\tif (inputField) {\n\t\t\t\t\t\t\/\/ Clear the search input\n\t\t\t\t\t\tinputField.value = '';\n\t\t\t\t\t\t\n\t\t\t\t\t\t\/\/ Clear the hidden ID field\n\t\t\t\t\t\tconst hiddenIdField = document.getElementById(targetId + '_id');\n\t\t\t\t\t\tif (hiddenIdField) {\n\t\t\t\t\t\t\thiddenIdField.value = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\/\/ Close any open dropdown\n\t\t\t\t\t\tconst dropdownId = targetId.replace(\/_\/g, '-') + '-dropdown';\n\t\t\t\t\t\tconst dropdown = document.getElementById(dropdownId);\n\t\t\t\t\t\tif (dropdown) {\n\t\t\t\t\t\t\tdropdown.style.display = 'none';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\/\/ Hide \"Other\" field using the map\n\t\t\t\t\t\tconst otherFieldId = otherFieldMap[targetId];\n\t\t\t\t\t\tif (otherFieldId) {\n\t\t\t\t\t\t\tconst otherField = document.getElementById(otherFieldId);\n\t\t\t\t\t\t\tif (otherField) {\n\t\t\t\t\t\t\t\totherField.style.display = 'none';\n\t\t\t\t\t\t\t\t\/\/ Also clear the text input inside the other field\n\t\t\t\t\t\t\t\tconst otherInput = otherField.querySelector('input[type=\"text\"]');\n\t\t\t\t\t\t\t\tif (otherInput) {\n\t\t\t\t\t\t\t\t\totherInput.value = '';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\/\/ Focus on the input\n\t\t\t\t\t\tinputField.focus();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t})();\n\n\t\t\/\/ Real-time password match validation\n\t\t(function() {\n\t\t\tconst passwordField = document.getElementById('password');\n\t\t\tconst passwordConfirmField = document.getElementById('password_confirm');\n\t\t\tconst matchMessage = document.getElementById('password-match-message');\n\n\t\t\tif (!passwordField || !passwordConfirmField || !matchMessage) return;\n\n\t\t\tfunction checkPasswordMatch() {\n\t\t\t\tconst password = passwordField.value;\n\t\t\t\tconst passwordConfirm = passwordConfirmField.value;\n\n\t\t\t\tif (!passwordConfirm) {\n\t\t\t\t\tmatchMessage.textContent = '';\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (password === passwordConfirm) {\n\t\t\t\t\tmatchMessage.textContent = 'Passwords match';\n\t\t\t\t\tmatchMessage.style.color = '#008000';\n\t\t\t\t} else {\n\t\t\t\t\tmatchMessage.textContent = 'Passwords do not match';\n\t\t\t\t\tmatchMessage.style.color = '#dc3545';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tpasswordField.addEventListener('input', checkPasswordMatch);\n\t\t\tpasswordConfirmField.addEventListener('input', checkPasswordMatch);\n\t\t})();\n\n\t\t\/\/ Input field validation and sanitization\n\t\t(function() {\n\t\t\t\/\/ Validate name fields (letters, spaces, hyphens, apostrophes only)\n\t\t\tconst nameFields = document.querySelectorAll('input[pattern*=\"[a-zA-Z\"]');\n\t\t\tnameFields.forEach(field => {\n\t\t\t\tfield.addEventListener('blur', function() {\n\t\t\t\t\t\/\/ Remove any disallowed characters\n\t\t\t\t\tthis.value = this.value.replace(\/[^a-zA-Z\\s'-]\/g, '');\n\t\t\t\t});\n\t\t\t});\n\n\t\t\t\/\/ Validate phone field\n\t\t\tconst phoneField = document.getElementById('phone');\n\t\t\tif (phoneField) {\n\t\t\t\tphoneField.addEventListener('blur', function() {\n\t\t\t\t\t\/\/ Allow only numbers, spaces, parentheses, hyphens, plus\n\t\t\t\t\tthis.value = this.value.replace(\/[^0-9\\s()+-]\/g, '');\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t\/\/ Validate extension field (numbers only)\n\t\t\tconst extField = document.getElementById('phone_ext');\n\t\t\tif (extField) {\n\t\t\t\textField.addEventListener('blur', function() {\n\t\t\t\t\tthis.value = this.value.replace(\/[^0-9]\/g, '');\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t\/\/ Trim whitespace from text fields\n\t\t\tconst textFields = document.querySelectorAll('input[type=\"text\"], input[type=\"email\"], input[type=\"tel\"]');\n\t\t\ttextFields.forEach(field => {\n\t\t\t\tfield.addEventListener('blur', function() {\n\t\t\t\t\tthis.value = this.value.trim();\n\t\t\t\t});\n\t\t\t});\n\t\t\t\/\/ Mirror Email -> Username in real time\n\t\t\tconst emailField = document.getElementById('email');\n\t\t\tconst usernameField = document.getElementById('username');\n\t\t\tif (emailField && usernameField) {\n\t\t\t\tconst syncUsername = () => {\n\t\t\t\t\tusernameField.value = emailField.value.trim();\n\t\t\t\t};\n\t\t\t\temailField.addEventListener('input', syncUsername);\n\t\t\t\temailField.addEventListener('blur', syncUsername);\n\t\t\t\tsyncUsername();\n\t\t\t}\n\t\t});  \/\/ End of DOMContentLoaded\n\n\t\t\/\/ Form submission handler\n\t\t(function() {\n\t\t\tconst form = document.getElementById('membership-form');\n\t\t\tif (!form) return;\n\n\t\t\tlet stripe = null;\n\t\t\tlet elements = null;\n\t\t\tlet cardNumber = null;\n\t\t\tlet cardExpiry = null;\n\t\t\tlet cardCvc = null;\n\n\t\t\t\/\/ Billing address toggle (same as mailing by default)\n\t\t\tconst billingDifferentCheckbox = document.getElementById('billing_address_different');\n\t\t\tconst billingAddressWrapper = document.getElementById('billing-address-fields');\n\t\t\tconst billingAddressFields = ['billing_street', 'billing_city', 'billing_state', 'billing_country'];\n\n\t\t\tfunction updateBillingAddressVisibility() {\n\t\t\t\tif (!billingDifferentCheckbox || !billingAddressWrapper) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst isDifferent = billingDifferentCheckbox.checked;\n\t\t\t\tbillingAddressWrapper.style.display = isDifferent ? 'block' : 'none';\n\t\t\t\tbillingAddressFields.forEach((fieldId) => {\n\t\t\t\t\tconst field = document.getElementById(fieldId);\n\t\t\t\t\tif (!field) return;\n\t\t\t\t\tif (isDifferent) {\n\t\t\t\t\t\tfield.setAttribute('required', 'required');\n\t\t\t\t\t\tfield.value = '';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfield.removeAttribute('required');\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (billingDifferentCheckbox) {\n\t\t\t\tbillingDifferentCheckbox.addEventListener('change', updateBillingAddressVisibility);\n\t\t\t\tupdateBillingAddressVisibility();\n\t\t\t}\n\n\t\t\t\/\/ Initialize Stripe Elements\n\t\t\tasync function initStripe() {\n\t\t\t\tconst stripePublicKey = 'pk_live_d6LkYBBXNURyJm9y0Kzaml2a';\n\t\t\t\t\n\t\t\t\tif (!stripePublicKey) {\n\t\t\t\t\tconsole.warn('Stripe public key not configured');\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t\/\/ Wait for Stripe to be available\n\t\t\t\tlet attempts = 0;\n\t\t\t\twhile (!window.Stripe && attempts < 50) {\n\t\t\t\t\tawait new Promise(resolve => setTimeout(resolve, 100));\n\t\t\t\t\tattempts++;\n\t\t\t\t}\n\n\t\t\t\tif (!window.Stripe) {\n\t\t\t\t\tconsole.error('Stripe library failed to load');\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tstripe = Stripe(stripePublicKey);\n\t\t\t\telements = stripe.elements();\n\n\t\t\t\tconst cardStyle = {\n\t\t\t\t\tbase: {\n\t\t\t\t\t\tfontSize: '16px',\n\t\t\t\t\t\tcolor: '#424770',\n\t\t\t\t\t\t'::placeholder': {\n\t\t\t\t\t\t\tcolor: '#aab7c4',\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tinvalid: {\n\t\t\t\t\t\tcolor: '#fa755a',\n\t\t\t\t\t\ticonColor: '#fa755a'\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tcardNumber = elements.create('cardNumber', { style: cardStyle });\n\t\t\t\tcardExpiry = elements.create('cardExpiry', { style: cardStyle });\n\t\t\t\tcardCvc = elements.create('cardCvc', { style: cardStyle });\n\n\t\t\t\tcardNumber.mount('#card-number-element');\n\t\t\t\tcardExpiry.mount('#card-expiry-element');\n\t\t\t\tcardCvc.mount('#card-cvc-element');\n\n\t\t\t\t\/\/ Handle real-time validation errors\n\t\t\t\t[cardNumber, cardExpiry, cardCvc].forEach(element => {\n\t\t\t\t\telement.addEventListener('change', function(event) {\n\t\t\t\t\t\tconst displayError = document.getElementById('card-errors');\n\t\t\t\t\t\tif (event.error) {\n\t\t\t\t\t\t\tdisplayError.textContent = event.error.message;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdisplayError.textContent = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t\/\/ Initialize on DOM ready\n\t\t\tif (document.readyState === 'loading') {\n\t\t\t\tdocument.addEventListener('DOMContentLoaded', initStripe);\n\t\t\t} else {\n\t\t\t\tinitStripe();\n\t\t\t}\n\n\t\t\t\/\/ Country name to ISO 3166-1 alpha-2 code mapping\n\t\t\tconst countryCodeMap = {\n\t\t\t\t'Canada': 'CA',\n\t\t\t\t'United States': 'US',\n\t\t\t\t'Mexico': 'MX',\n\t\t\t\t'United Kingdom': 'GB',\n\t\t\t\t'Australia': 'AU',\n\t\t\t\t'Germany': 'DE',\n\t\t\t\t'France': 'FR',\n\t\t\t\t'Japan': 'JP',\n\t\t\t\t'China': 'CN',\n\t\t\t\t'India': 'IN'\n\t\t\t};\n\n\t\t\tfunction getCountryCode(countryName) {\n\t\t\t\treturn countryCodeMap[countryName] || countryName;\n\t\t\t}\n\n\t\t\tfunction showMembershipError(message) {\n\t\t\t\tconst errorModal = document.getElementById('membership-error-modal');\n\t\t\t\tconst errorText = document.getElementById('membership-error-text');\n\t\t\t\tconst loadingModal = document.getElementById('membership-loading-modal');\n\t\t\t\tif (loadingModal) {\n\t\t\t\t\tloadingModal.style.display = 'none';\n\t\t\t\t}\n\t\t\t\tif (errorText) {\n\t\t\t\t\terrorText.textContent = message;\n\t\t\t\t}\n\t\t\t\tif (errorModal) {\n\t\t\t\t\terrorModal.style.display = 'flex';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst errorCloseBtn = document.getElementById('membership-error-close');\n\t\t\tif (errorCloseBtn) {\n\t\t\t\terrorCloseBtn.addEventListener('click', function() {\n\t\t\t\t\tconst errorModal = document.getElementById('membership-error-modal');\n\t\t\t\t\tif (errorModal) {\n\t\t\t\t\t\terrorModal.style.display = 'none';\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tasync function checkEmailExists(emailValue, usernameValue) {\n\t\t\t\tconst formData = new FormData();\n\t\t\t\tformData.append('action', 'membership_check_email');\n\t\t\t\tformData.append('membership_nonce', 'cba65d4e9e');\n\t\t\t\tif (emailValue) {\n\t\t\t\t\tformData.append('email', emailValue);\n\t\t\t\t}\n\t\t\t\tif (usernameValue) {\n\t\t\t\t\tformData.append('username', usernameValue);\n\t\t\t\t}\n\n\t\t\t\tconst response = await fetch('https:\/\/runnymedesociety.ca\/wp-admin\/admin-ajax.php', {\n\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\tbody: formData,\n\t\t\t\t\theaders: {\n\t\t\t\t\t\t'X-Requested-With': 'XMLHttpRequest'\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tconst data = await response.json();\n\t\t\t\tif (!data.success) {\n\t\t\t\t\treturn { error: data.data?.message || 'Unable to validate email address.' };\n\t\t\t\t}\n\n\t\t\t\treturn { exists: Boolean(data.data?.exists) };\n\t\t\t}\n\n\t\t\tconst emailField = document.getElementById('email');\n\t\t\tconst usernameField = document.getElementById('username');\n\t\t\tconst emailExistsMessage = document.getElementById('email-exists-message');\n\t\t\tconst emailCheckStatus = document.getElementById('email-check-status');\n\t\t\tconst submitBtn = form.querySelector('button[type=\"submit\"]');\n\n\t\t\tif (emailField) {\n\t\t\t\tconst inlineEmailRegex = \/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$\/;\n\t\t\t\tconst isValidEmailValue = (value) => {\n\t\t\t\t\tif (!value) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\tif (inlineEmailRegex.test(value)) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tif (emailField.validity && emailField.validity.valid) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t};\n\t\t\t\tlet emailCheckTimeout = null;\n\t\t\t\temailField.addEventListener('blur', async () => {\n\t\t\t\t\tconst emailValue = emailField.value ? emailField.value.trim() : '';\n\t\t\t\t\tif (usernameField) {\n\t\t\t\t\t\tusernameField.value = emailValue;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!emailValue) {\n\t\t\t\t\t\tif (emailCheckStatus) {\n\t\t\t\t\t\t\temailCheckStatus.style.display = 'none';\n\t\t\t\t\t\t\temailCheckStatus.textContent = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (emailExistsMessage) {\n\t\t\t\t\t\t\temailExistsMessage.style.display = 'none';\n\t\t\t\t\t\t\temailExistsMessage.textContent = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (submitBtn) {\n\t\t\t\t\t\t\tsubmitBtn.disabled = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!isValidEmailValue(emailValue)) {\n\t\t\t\t\t\tif (emailExistsMessage) {\n\t\t\t\t\t\t\temailExistsMessage.textContent = 'Invalid email address';\n\t\t\t\t\t\t\temailExistsMessage.style.display = 'block';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (submitBtn) {\n\t\t\t\t\t\t\tsubmitBtn.disabled = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst emailCheck = await checkEmailExists(emailValue, '');\n\t\t\t\t\tif (emailCheckStatus) {\n\t\t\t\t\t\temailCheckStatus.style.display = 'none';\n\t\t\t\t\t\temailCheckStatus.textContent = '';\n\t\t\t\t\t}\n\t\t\t\t\tif (emailCheck?.error) {\n\t\t\t\t\t\tif (emailExistsMessage) {\n\t\t\t\t\t\t\temailExistsMessage.textContent = emailCheck.error;\n\t\t\t\t\t\t\temailExistsMessage.style.display = 'block';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (submitBtn) {\n\t\t\t\t\t\t\tsubmitBtn.disabled = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (emailCheck?.exists) {\n\t\t\t\t\t\tif (emailExistsMessage) {\n\t\t\t\t\t\t\temailExistsMessage.textContent = 'You already have an account with that email address. Please log in to manage your membership from the Account page.';\n\t\t\t\t\t\t\temailExistsMessage.style.display = 'block';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (submitBtn) {\n\t\t\t\t\t\t\tsubmitBtn.disabled = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (emailExistsMessage) {\n\t\t\t\t\t\temailExistsMessage.style.display = 'none';\n\t\t\t\t\t\temailExistsMessage.textContent = '';\n\t\t\t\t\t}\n\t\t\t\t\tif (submitBtn) {\n\t\t\t\t\t\tsubmitBtn.disabled = false;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\temailField.addEventListener('input', () => {\n\t\t\t\t\tif (emailCheckTimeout) {\n\t\t\t\t\t\tclearTimeout(emailCheckTimeout);\n\t\t\t\t\t}\n\t\t\t\t\tconst emailValue = emailField.value ? emailField.value.trim() : '';\n\t\t\t\t\tif (!emailValue) {\n\t\t\t\t\t\tif (emailCheckStatus) {\n\t\t\t\t\t\t\temailCheckStatus.style.display = 'none';\n\t\t\t\t\t\t\temailCheckStatus.textContent = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (emailExistsMessage) {\n\t\t\t\t\t\t\temailExistsMessage.style.display = 'none';\n\t\t\t\t\t\t\temailExistsMessage.textContent = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (submitBtn) {\n\t\t\t\t\t\t\tsubmitBtn.disabled = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif (!isValidEmailValue(emailValue)) {\n\t\t\t\t\t\tif (emailCheckStatus) {\n\t\t\t\t\t\t\temailCheckStatus.style.display = 'none';\n\t\t\t\t\t\t\temailCheckStatus.textContent = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (emailExistsMessage) {\n\t\t\t\t\t\t\temailExistsMessage.textContent = 'Invalid email address';\n\t\t\t\t\t\t\temailExistsMessage.style.display = 'block';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (submitBtn) {\n\t\t\t\t\t\t\tsubmitBtn.disabled = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif (emailCheckStatus) {\n\t\t\t\t\t\temailCheckStatus.textContent = 'Checking email...';\n\t\t\t\t\t\temailCheckStatus.style.display = 'block';\n\t\t\t\t\t}\n\t\t\t\t\tif (emailExistsMessage) {\n\t\t\t\t\t\temailExistsMessage.style.display = 'none';\n\t\t\t\t\t\temailExistsMessage.textContent = '';\n\t\t\t\t\t}\n\t\t\t\t\tif (submitBtn) {\n\t\t\t\t\t\tsubmitBtn.disabled = true;\n\t\t\t\t\t}\n\t\t\t\t\temailCheckTimeout = setTimeout(async () => {\n\t\t\t\t\t\tif (!emailField.value || !emailField.value.trim()) {\n\t\t\t\t\t\t\tif (emailCheckStatus) {\n\t\t\t\t\t\t\t\temailCheckStatus.style.display = 'none';\n\t\t\t\t\t\t\t\temailCheckStatus.textContent = '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (submitBtn) {\n\t\t\t\t\t\t\t\tsubmitBtn.disabled = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst emailValue = emailField.value.trim();\n\t\t\t\t\t\tif (!isValidEmailValue(emailValue)) {\n\t\t\t\t\t\t\tif (emailCheckStatus) {\n\t\t\t\t\t\t\t\temailCheckStatus.style.display = 'none';\n\t\t\t\t\t\t\t\temailCheckStatus.textContent = '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (emailExistsMessage) {\n\t\t\t\t\t\t\t\temailExistsMessage.textContent = 'Invalid email address';\n\t\t\t\t\t\t\t\temailExistsMessage.style.display = 'block';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (submitBtn) {\n\t\t\t\t\t\t\t\tsubmitBtn.disabled = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (usernameField) {\n\t\t\t\t\t\t\tusernameField.value = emailValue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst emailCheck = await checkEmailExists(emailValue, '');\n\t\t\t\t\t\tif (emailCheckStatus) {\n\t\t\t\t\t\t\temailCheckStatus.style.display = 'none';\n\t\t\t\t\t\t\temailCheckStatus.textContent = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (emailCheck?.error || emailCheck?.exists) {\n\t\t\t\t\t\t\tif (emailExistsMessage) {\n\t\t\t\t\t\t\t\temailExistsMessage.textContent = emailCheck?.error || 'You already have an account with that email address. Please log in to manage your membership from the Account page.';\n\t\t\t\t\t\t\t\temailExistsMessage.style.display = 'block';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (submitBtn) {\n\t\t\t\t\t\t\t\tsubmitBtn.disabled = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (submitBtn) {\n\t\t\t\t\t\t\tsubmitBtn.disabled = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}, 400);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tform.addEventListener('submit', async function(e) {\n\t\t\t\te.preventDefault();\n\n\t\t\t\t\/\/ Get the membership type\n\t\t\t\tconst membershipType = document.getElementById('membership_type').value;\n\t\t\t\tconst isStudentPlan = membershipType === 'student';\n\t\t\t\tconst billingDifferent = document.getElementById('billing_address_different')?.checked;\n\t\t\t\tconst emailField = document.getElementById('email');\n\t\t\t\tconst usernameField = document.getElementById('username');\n\n\t\t\t\tif (emailField && usernameField) {\n\t\t\t\t\tconst emailValue = emailField.value ? emailField.value.trim() : '';\n\t\t\t\t\tusernameField.value = emailValue;\n\t\t\t\t}\n\n\t\t\t\t\/\/ If billing address is same as mailing, copy mailing fields into billing fields.\n\t\t\t\tif (!isStudentPlan && !billingDifferent) {\n\t\t\t\t\tconst billingNameField = document.getElementById('billing_name');\n\t\t\t\t\tconst billingEmailField = document.getElementById('billing_email');\n\t\t\t\t\tconst firstNameField = document.getElementById('first_name');\n\t\t\t\t\tconst lastNameField = document.getElementById('last_name');\n\t\t\t\t\tconst emailFieldValue = emailField && emailField.value ? emailField.value.trim() : '';\n\n\t\t\t\t\tif (billingNameField && (!billingNameField.value || !billingNameField.value.trim())) {\n\t\t\t\t\t\tconst firstNameValue = firstNameField && firstNameField.value ? firstNameField.value.trim() : '';\n\t\t\t\t\t\tconst lastNameValue = lastNameField && lastNameField.value ? lastNameField.value.trim() : '';\n\t\t\t\t\t\tconst fullName = [firstNameValue, lastNameValue].filter(Boolean).join(' ').trim();\n\t\t\t\t\t\tif (fullName) {\n\t\t\t\t\t\t\tbillingNameField.value = fullName;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (billingEmailField && (!billingEmailField.value || !billingEmailField.value.trim()) && emailFieldValue) {\n\t\t\t\t\t\tbillingEmailField.value = emailFieldValue;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst mapping = {\n\t\t\t\t\t\t'billing_street': 'addr_street',\n\t\t\t\t\t\t'billing_city': 'addr_city',\n\t\t\t\t\t\t'billing_state': 'addr_province',\n\t\t\t\t\t\t'billing_country': 'addr_country'\n\t\t\t\t\t};\n\t\t\t\t\tObject.keys(mapping).forEach((billingId) => {\n\t\t\t\t\t\tconst billingField = document.getElementById(billingId);\n\t\t\t\t\t\tconst mailingField = document.getElementById(mapping[billingId]);\n\t\t\t\t\t\tif (billingField && mailingField && mailingField.value) {\n\t\t\t\t\t\t\tbillingField.value = mailingField.value;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t\/\/ Validate form before submission\n\t\t\t\tconst validationErrors = [];\n\n\t\t\t\t\/\/ Required fields (different for student vs paid plans)\n\t\t\t\tlet requiredFields = {\n\t\t\t\t\t'first_name': 'First name',\n\t\t\t\t\t'last_name': 'Last name',\n\t\t\t\t\t'phone': 'Phone',\n\t\t\t\t\t'email': 'Email',\n\t\t\t\t\t'username': 'Login email',\n\t\t\t\t\t'password': 'Password',\n\t\t\t\t\t'password_confirm': 'Confirm password'\n\t\t\t\t};\n\n\t\t\t\t\/\/ For paid plans, require address and billing fields (billing address only if different)\n\t\t\t\tif (!isStudentPlan) {\n\t\t\t\t\trequiredFields = {\n\t\t\t\t\t\t...requiredFields,\n\t\t\t\t\t\t'addr_street': 'Street address',\n\t\t\t\t\t\t'addr_city': 'City',\n\t\t\t\t\t\t'addr_province': 'Province',\n\t\t\t\t\t\t'addr_country': 'Country',\n\t\t\t\t\t\t'billing_name': 'Cardholder name',\n\t\t\t\t\t\t'billing_email': 'Billing email'\n\t\t\t\t\t};\n\n\t\t\t\t\tif (billingDifferent) {\n\t\t\t\t\t\trequiredFields = {\n\t\t\t\t\t\t\t...requiredFields,\n\t\t\t\t\t\t\t'billing_street': 'Billing street',\n\t\t\t\t\t\t\t'billing_city': 'Billing city',\n\t\t\t\t\t\t\t'billing_state': 'Billing state',\n\t\t\t\t\t\t\t'billing_country': 'Billing country'\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfor (const [fieldId, fieldName] of Object.entries(requiredFields)) {\n\t\t\t\t\tconst field = document.getElementById(fieldId);\n\t\t\t\t\tif (!field || !field.value.trim()) {\n\t\t\t\t\t\tvalidationErrors.push(fieldName + ' is required');\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t\/\/ Validate email fields\n\t\t\t\tconst emailRegex = \/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$\/;\n\t\t\t\tconst billingEmail = document.getElementById('billing_email');\n\t\t\t\tconst username = document.getElementById('username');\n\n\t\t\t\tif (emailField && emailField.value && !emailRegex.test(emailField.value)) {\n\t\t\t\t\tvalidationErrors.push('Please enter a valid email address');\n\t\t\t\t}\n\t\t\t\tif (!isStudentPlan && billingEmail && billingEmail.value && !emailRegex.test(billingEmail.value)) {\n\t\t\t\t\tvalidationErrors.push('Please enter a valid billing email address');\n\t\t\t\t}\n\t\t\t\tif (username && username.value && !emailRegex.test(username.value)) {\n\t\t\t\t\tvalidationErrors.push('Please enter a valid login email');\n\t\t\t\t}\n\n\t\t\t\t\/\/ Validate password\n\t\t\t\tconst password = document.getElementById('password');\n\t\t\t\tconst passwordConfirm = document.getElementById('password_confirm');\n\t\t\t\tconst uppercaseRegex = \/[A-Z]\/;\n\t\t\t\tconst numberRegex = \/[0-9]\/;\n\t\t\t\tif (password && password.value.length < 10) {\n\t\t\t\t\tvalidationErrors.push('Password must be at least 10 characters');\n\t\t\t\t}\n\t\t\t\tif (password && !uppercaseRegex.test(password.value)) {\n\t\t\t\t\tvalidationErrors.push('Password must include at least one uppercase letter');\n\t\t\t\t}\n\t\t\t\tif (password && !numberRegex.test(password.value)) {\n\t\t\t\t\tvalidationErrors.push('Password must include at least one number');\n\t\t\t\t}\n\t\t\t\tif (password && passwordConfirm && password.value !== passwordConfirm.value) {\n\t\t\t\t\tvalidationErrors.push('Passwords do not match');\n\t\t\t\t}\n\n\t\t\t\t\/\/ Validate phone\n\t\t\t\tconst phone = document.getElementById('phone');\n\t\t\t\tif (phone && phone.value) {\n\t\t\t\t\tconst phoneDigits = phone.value.replace(\/\\D\/g, '');\n\t\t\t\t\tif (phoneDigits.length < 10) {\n\t\t\t\t\t\tvalidationErrors.push('Please enter a valid phone number');\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t\/\/ Validate education fields for paid plans\n\t\t\t\tif (!isStudentPlan) {\n\t\t\t\t\tconst activeContent = document.querySelector('.plan-tab-content.active');\n\t\t\t\t\tif (activeContent) {\n\t\t\t\t\t\tconst requiredFields = activeContent.querySelectorAll('[data-plan-required=\"1\"]');\n\t\t\t\t\t\trequiredFields.forEach(field => {\n\t\t\t\t\t\t\tif (field.value && field.value.trim()) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst label = field.closest('.membership-field')?.querySelector('label');\n\t\t\t\t\t\t\tconst labelText = label ? label.textContent.replace('*', '').trim() : 'Field';\n\t\t\t\t\t\t\tvalidationErrors.push(labelText + ' is required');\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t\/\/ Show validation errors\n\t\t\t\tif (validationErrors.length > 0) {\n\t\t\t\t\tshowMembershipError('Please fix the following errors:\\n\\n' + validationErrors.join('\\n'));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t\/\/ Check for existing email before starting payment\n\t\t\t\tif (emailField || username) {\n\t\t\t\t\tconst emailValue = emailField && emailField.value ? emailField.value.trim() : '';\n\t\t\t\t\tconst usernameValue = username && username.value ? username.value.trim() : '';\n\t\t\t\t\tconst emailCheck = await checkEmailExists(emailValue, usernameValue);\n\t\t\t\t\tif (emailCheck?.error) {\n\t\t\t\t\t\tshowMembershipError(emailCheck.error);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif (emailCheck?.exists) {\n\t\t\t\t\t\tshowMembershipError('You already have an account with that email address.\\nPlease log in to manage your membership from the Account page.');\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t\/\/ Show loading spinner\n\t\t\t\tconst loadingModal = document.getElementById('membership-loading-modal');\n\t\t\t\tif (loadingModal) {\n\t\t\t\t\tloadingModal.style.display = 'flex';\n\t\t\t\t}\n\t\t\t\tconst submitBtn = form.querySelector('button[type=\"submit\"]');\n\t\t\t\tif (submitBtn) {\n\t\t\t\t\tsubmitBtn.disabled = true;\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\t\/\/ Student plan - submit without Stripe payment\n\t\t\t\t\tif (isStudentPlan) {\n\t\t\t\t\t\tconst formData = new FormData(form);\n\t\t\t\t\t\tformData.append('action', 'membership_submit');\n\n\t\t\t\t\t\tconst response = await fetch('https:\/\/runnymedesociety.ca\/wp-admin\/admin-ajax.php', {\n\t\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\t\tbody: formData,\n\t\t\t\t\t\t\theaders: {\n\t\t\t\t\t\t\t\t'X-Requested-With': 'XMLHttpRequest'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tconst data = await response.json();\n\n\t\t\t\t\t\tif (data.success) {\n\t\t\t\t\t\t\t\/\/ Hide spinner and redirect\n\t\t\t\t\t\t\tif (loadingModal) {\n\t\t\t\t\t\t\t\tloadingModal.style.display = 'none';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\twindow.location.href = data.data.redirect || '\/';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\/\/ Hide spinner and show errors\n\t\t\t\t\t\t\tif (loadingModal) {\n\t\t\t\t\t\t\t\tloadingModal.style.display = 'none';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst errors = data.data.errors || ['An error occurred'];\n\t\t\t\t\t\t\tshowMembershipError(errors.join('\\n'));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (submitBtn) {\n\t\t\t\t\t\t\t\tsubmitBtn.disabled = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t\/\/ Paid plans - process Stripe payment\n\t\t\t\t\t\/\/ Validate card elements\n\t\t\t\t\tif (!cardNumber || !cardExpiry || !cardCvc) {\n\t\t\t\t\t\tif (loadingModal) {\n\t\t\t\t\t\t\tloadingModal.style.display = 'none';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tshowMembershipError('Payment form not loaded. Please refresh and try again.');\n\t\t\t\t\t\tif (submitBtn) {\n\t\t\t\t\t\t\tsubmitBtn.disabled = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t\/\/ Show payment processing message\n\t\t\t\t\tconst spinnerText = document.querySelector('.membership-loading-text');\n\t\t\t\t\tif (spinnerText) {\n\t\t\t\t\t\tspinnerText.textContent = 'Processing Payment';\n\t\t\t\t\t}\n\n\t\t\t\t\tconst billingDifferentChecked = document.getElementById('billing_address_different')?.checked;\n\t\t\t\t\tconst billingStreetValue = billingDifferentChecked ? document.getElementById('billing_street').value : document.getElementById('addr_street').value;\n\t\t\t\t\tconst billingCityValue = billingDifferentChecked ? document.getElementById('billing_city').value : document.getElementById('addr_city').value;\n\t\t\t\t\tconst billingStateValue = billingDifferentChecked ? document.getElementById('billing_state').value : document.getElementById('addr_province').value;\n\t\t\t\t\tconst billingCountryValue = billingDifferentChecked ? document.getElementById('billing_country').value : document.getElementById('addr_country').value;\n\n\t\t\t\t\t\/\/ Create payment method from card elements\n\t\t\t\t\tconst { paymentMethod, error } = await stripe.createPaymentMethod({\n\t\t\t\t\t\ttype: 'card',\n\t\t\t\t\t\tcard: cardNumber,\n\t\t\t\t\t\tbilling_details: {\n\t\t\t\t\t\t\tname: document.getElementById('billing_name').value,\n\t\t\t\t\t\t\temail: document.getElementById('billing_email').value,\n\t\t\t\t\t\t\taddress: {\n\t\t\t\t\t\t\t\tline1: billingStreetValue,\n\t\t\t\t\t\t\t\tcity: billingCityValue,\n\t\t\t\t\t\t\t\tstate: billingStateValue,\n\t\t\t\t\t\t\t\tcountry: getCountryCode(billingCountryValue)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\tif (error) {\n\t\t\t\t\t\tdocument.getElementById('card-errors').textContent = error.message;\n\t\t\t\t\t\tif (loadingModal) {\n\t\t\t\t\t\t\tloadingModal.style.display = 'none';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (submitBtn) {\n\t\t\t\t\t\t\tsubmitBtn.disabled = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t\/\/ Create FormData from the form\n\t\t\t\t\tconst formData = new FormData(form);\n\t\t\t\t\tformData.append('action', 'membership_submit');\n\t\t\t\t\tformData.append('stripe_payment_method_id', paymentMethod.id);\n\n\t\t\t\t\t\/\/ Send the form data via AJAX\n\t\t\t\t\tconst response = await fetch('https:\/\/runnymedesociety.ca\/wp-admin\/admin-ajax.php', {\n\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\tbody: formData,\n\t\t\t\t\t\theaders: {\n\t\t\t\t\t\t\t'X-Requested-With': 'XMLHttpRequest'\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\tconst data = await response.json();\n\n\t\t\t\t\tif (data.success) {\n\t\t\t\t\t\t\/\/ Payment processed successfully - log in and redirect\n\t\t\t\t\t\tif (loadingModal) {\n\t\t\t\t\t\t\tloadingModal.style.display = 'none';\n\t\t\t\t\t\t}\n\t\t\t\t\t\twindow.location.href = data.data.redirect || '\/';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\/\/ Show error messages\n\t\t\t\t\t\tif (loadingModal) {\n\t\t\t\t\t\t\tloadingModal.style.display = 'none';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst errors = data.data.errors || ['An error occurred'];\n\t\t\t\t\t\tshowMembershipError(errors.join('\\n'));\n\t\t\t\t\t\t\n\t\t\t\t\t\t\/\/ Reset form\n\t\t\t\t\t\tif (submitBtn) {\n\t\t\t\t\t\t\tsubmitBtn.disabled = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (error) {\n\t\t\t\t\tconsole.error('Form submission error:', error);\n\t\t\t\t\tif (loadingModal) {\n\t\t\t\t\t\tloadingModal.style.display = 'none';\n\t\t\t\t\t}\n\t\t\t\t\tshowMembershipError('An error occurred while submitting the form. Please try again.');\n\t\t\t\t\t\n\t\t\t\t\t\/\/ Reset form\n\t\t\t\t\tif (submitBtn) {\n\t\t\t\t\t\tsubmitBtn.disabled = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t})();\n\t\t<\/script>\n\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>The only official way to join the Runnymede network Priority registration for lawyer chapter events Priority access to tickets for Law &amp; Freedom Connect with members in the Member Area Exclusive digital access to the Dicey Law Review Access our online video library Becoming a member also means supporting the Runnymede Society, partnering with us [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"elementor_header_footer","meta":{"_jet_sm_ready_style":"","_jet_sm_style":"","_jet_sm_controls_values":"","_jet_sm_fonts_collection":"","_jet_sm_fonts_links":"","footnotes":""},"class_list":["post-24168","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/runnymedesociety.ca\/fr\/wp-json\/wp\/v2\/pages\/24168","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/runnymedesociety.ca\/fr\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/runnymedesociety.ca\/fr\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/runnymedesociety.ca\/fr\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/runnymedesociety.ca\/fr\/wp-json\/wp\/v2\/comments?post=24168"}],"version-history":[{"count":0,"href":"https:\/\/runnymedesociety.ca\/fr\/wp-json\/wp\/v2\/pages\/24168\/revisions"}],"wp:attachment":[{"href":"https:\/\/runnymedesociety.ca\/fr\/wp-json\/wp\/v2\/media?parent=24168"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}