/* =============================================================================
   Moorgate Apply Now Form — Modal + Inline Styles
   ============================================================================= */

/* ---------------------------------------------------------------------------
   CSS Custom Properties
   --------------------------------------------------------------------------- */
:root {
	--maf-navy:      #1a2e5a;
	--maf-cyan:      #3ec8d4;
	--maf-orange:    #e07830;
	--maf-orange-dk: #c9592a;
	--maf-grey-bg:   #f5f5f5;
	--maf-border:    #e0e0e0;
	--maf-text:      #222;
	--maf-label:     #555;
	--maf-radius:    10px;
	--maf-font:      'Montserrat', sans-serif;
}

.maf-dialog,
.maf-inline-wrap,
.maf-dialog *,
.maf-inline-wrap * {
	font-family: var(--maf-font);
}

/* ---------------------------------------------------------------------------
   Overlay / backdrop
   --------------------------------------------------------------------------- */
.maf-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	z-index: 99999;
	align-items: center;
	justify-content: center;
	padding: 16px;
	overflow-y: auto;
}

.maf-overlay.maf-open {
	display: flex;
}

/* ---------------------------------------------------------------------------
   Dialog container (two columns)
   --------------------------------------------------------------------------- */
.maf-dialog {
	position: relative;
	display: flex;
	width: 100%;
	max-width: 960px;
	min-height: 520px;
	border-radius: var(--maf-radius);
	overflow: hidden;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
	margin: auto;
	background-color: #fff;
}

/* Close button */
.maf-close {
	position: absolute;
	top: 14px;
	right: 18px;
	background: transparent;
	border: none !important;
	font-size: 26px;
	font-weight: bold;
	color: #fff;
	cursor: pointer;
	z-index: 10;
	line-height: 1;
	padding: 0;
}

.maf-close:hover {
	opacity: 0.75;
}

/* ---------------------------------------------------------------------------
   Left panel (white, form)
   --------------------------------------------------------------------------- */
.maf-left {
	flex: 1 1 55%;
	background: #fff;
	padding: 36px 40px 40px;
	overflow-y: auto;
}

.maf-left h2 {
	color:#005ba6;
	font-size: 22px;
}
/* ---------------------------------------------------------------------------
   Right panel (navy, "How does it work?")
   --------------------------------------------------------------------------- */
.maf-right {
	flex: 0 0 40%;
	background: var(--maf-navy);
	color: #fff;
	padding: 60px 32px 60px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	border-radius: 10px 0 0 10px;
}

.maf-right h2 {
	font-size: 22px;
	font-weight: 700;
	color: #fff;
	margin: 0 0 12px;
}

.maf-steps {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.maf-steps li {
	padding-left: 28px;
	position: relative;
	font-size: 14px;
	line-height: 1.5;
	color: rgba(255,255,255,0.9);
}

.maf-steps li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 2px;
	width: 18px;
	height: 18px;
	background: var(--maf-cyan);
	border: 2px solid var(--maf-cyan);
	border-radius: 3px;
}

.maf-steps li::after {
	content: '✓';
	position: absolute;
	left: 0;
	top: 2px;
	width: 18px;
	height: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 700;
	color: #fff;
	line-height: 1;
}

.maf-right hr {
	border: none;
	border-top: 1px solid rgba(255,255,255,0.2);
	margin: 4px 0;
}

.maf-right > p {
	font-size: 13px;
	color: rgba(255,255,255,0.85);
	margin: 0;
}

/* Contact buttons row — single line */
.maf-contact-buttons {
	display: flex;
	flex-wrap: nowrap;
	gap: 8px;
}

.maf-contact-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: transparent;
	color: #fff;
	text-decoration: none;
	border-radius: 8px;
	padding: 6px 12px 6px 6px;
	font-size: 13px;
	font-family: var(--maf-font);
	transition: background 0.2s;
}

.maf-contact-btn:hover {
	background: rgba(255,255,255,0.1);
	color: #fff;
}

/* Icon box — white square with border-radius */
.maf-contact-btn .maf-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	background: #fff;
	border-radius: 6px;
	flex-shrink: 0;
}

/* SVG icons inside the box — navy colour */
.maf-contact-btn .maf-icon svg {
	width: 16px;
	height: 16px;
	fill: var(--maf-navy);
	display: block;
}

/* Panel logos */
.maf-panel-logos {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-top: auto;
	padding-top: 16px;
}

.maf-panel-logos img {
	max-height: 65px;
	width: auto;
	object-fit: contain;
}

.maf-panel-logos a {
	display: inline-flex;
}

/* ---------------------------------------------------------------------------
   Inline wrap (apply-now page — same two-column layout, no overlay)
   --------------------------------------------------------------------------- */
.maf-inline-wrap {
	display: flex;
	gap: 0;
	border-radius: var(--maf-radius);
	overflow: hidden;
	box-shadow: 0 4px 24px rgba(0,0,0,0.12);
	max-width: 960px;
	margin: 0 auto;
}

.maf-inline-wrap .maf-left {
	padding: 36px 40px 40px;
}

.maf-inline-wrap .maf-right {
	padding: 40px 32px 36px;
}

/* ---------------------------------------------------------------------------
   Gravity Forms overrides — general
   --------------------------------------------------------------------------- */
.maf-left .gform_wrapper,
.maf-inline-wrap .maf-left .gform_wrapper {
	max-width: 100%;
}

/* Page title / heading shown above each step */
.maf-left .gform_page_heading {
	font-size: 24px;
	font-weight: 700;
	color: #1a5fa8;
	margin-bottom: 4px;
}

.maf-left .gform_step_count {
	font-size: 14px;
	font-weight: 600;
	color: var(--maf-text);
	margin-bottom: 8px;
}

/* Labels */
.maf-left .gform_wrapper label.gfield_label {
	font-weight: 600;
	font-size: 15px;
	color: var(--maf-text);
	margin-bottom: 6px;
}

/* Inputs / selects */
.maf-left .gform_wrapper input:not([type="radio"]):not([type="checkbox"]):not([type="submit"]):not([type="button"]):not([type="image"]):not([type="file"]),
.maf-left .gform_wrapper select,
.maf-left .gform_wrapper textarea {
	width: 100%;
	border: 1px solid var(--maf-border);
	border-radius: 6px;
	padding: 10px 14px;
	font-size: 14px;
	background: var(--maf-grey-bg);
	color: var(--maf-text);
	box-sizing: border-box;
	transition: border-color 0.2s;
}

.maf-left .gform_wrapper input:focus,
.maf-left .gform_wrapper select:focus,
.maf-left .gform_wrapper textarea:focus {
	outline: none;
	border-color: var(--maf-cyan);
}

/* Company name search icon hint */
.maf-left .maf-company-name input {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23999' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.099zm-5.242 1.656a5.5 5.5 0 1 1 0-11 5.5 5.5 0 0 1 0 11z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: 12px center;
	padding-left: 36px;
}

/* ---------------------------------------------------------------------------
   Business type — pill radio buttons
   --------------------------------------------------------------------------- */
.maf-left .maf-business-type .gfield_radio,
.maf-left .maf-business-type ul.gfield_radio {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.maf-left .maf-business-type .gfield_radio li,
.maf-left .maf-business-type ul.gfield_radio li {
	margin: 0;
}

/* Hide native radio */
.maf-left .maf-business-type .gfield_radio input[type="radio"] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

/* Pill label */
.maf-left .maf-business-type .gfield_radio label {
	display: inline-block;
	padding: 7px 18px;
	border: 1.5px solid var(--maf-border);
	border-radius: 999px;
	font-size: 14px;
	font-weight: 400;
	cursor: pointer;
	transition: border-color 0.2s, background 0.2s, color 0.2s;
	background: #fff;
	color: var(--maf-text);
	white-space: nowrap;
	max-width: 100% !important;
}

.maf-left .maf-business-type .gfield_radio input[type="radio"]:checked + label {
	border-color: var(--maf-navy);
	background: var(--maf-navy);
	color: #fff;
	max-width: 100%;
}

.maf-left .maf-business-type .gfield_radio label:hover {
	border-color: var(--maf-navy);
}

/* ---------------------------------------------------------------------------
   Progress bar (Gravity Forms percentage style)
   --------------------------------------------------------------------------- */
.maf-left .gf_progressbar_wrapper {
	margin-bottom: 20px;
}

.maf-left .gf_progressbar {
	background: var(--maf-border);
	border-radius: 999px;
	height: 6px;
	overflow: hidden;
}

.maf-left .gf_progressbar_percentage {
	background: var(--maf-cyan);
	height: 100% !important;
	border-radius: 999px !important;
	transition: width 0.4s ease;
}

.maf-left .gf_progressbar_title {
	font-size: 13px;
	color: var(--maf-label);
	margin-bottom: 6px;
	display: block;
	visibility: visible;
}

/* Keep all inline spans on one line */
.maf-left .gf_progressbar_title span {
	display: inline;
}

/* ---------------------------------------------------------------------------
   Navigation buttons (Previous / Next / Submit)
   --------------------------------------------------------------------------- */
.maf-left .gform-page-footer {
	justify-content: left !important;
}

.maf-left .gform_button,
.maf-left .gform_next_button,
.maf-left .gform_previous_button {
	display: inline-block;
	padding: 12px 24px;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	cursor: pointer;
	border: none;
	transition: opacity 0.2s;
}

/* Primary buttons (Next / Submit) */
.maf-left .gform_button,
.maf-left .gform_next_button {
	background: linear-gradient(135deg, var(--maf-orange), var(--maf-orange-dk));
	color: #fff !important;
}

.maf-left .gform_button:hover,
.maf-left .gform_next_button:hover {
	opacity: 0.88;
}

/* Secondary button (Previous) */
.maf-left .gform_previous_button {
	background: linear-gradient(135deg, var(--maf-orange), var(--maf-orange-dk));
	color: #fff  !important;
	margin-right: 8px;
}

.maf-left .gform_previous_button:hover {
	opacity: 0.88;
}

/* Save & Continue — hidden (replaced by passive abandonment tracking) */
.maf-left .gform_save_resume_container,
.maf-left .gform_wrapper .gform_save_resume_container {
	display: none;
}

.maf-left .gform_save_link {
	display: block;
	background: transparent;
	color: var(--maf-label);
	text-decoration: underline;
	padding: 0;
	font-size: 12px;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
	border: none;
	cursor: pointer;
	transition: color 0.2s;
}

.maf-left .gform_save_link:hover {
	color: var(--maf-navy);
}

/* ---------------------------------------------------------------------------
   "Agree to all" convenience button (page 4, above consent fields)
   --------------------------------------------------------------------------- */
.maf-agree-all-btn {
	text-align: center;
	align-items: center;
	gap: 7px;
	padding: 9px 18px;
	background: var(--maf-cyan);
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 700;
	font-family: var(--maf-font);
	letter-spacing: 0.03em;
	cursor: pointer;
	transition: opacity 0.2s;
	width: 100%;
}

.maf-agree-all-btn::before {
	content: '✓';
	font-size: 14px;
	line-height: 1;
}

.maf-agree-all-btn:hover {
	opacity: 0.85;
}

/* ---------------------------------------------------------------------------
   Consent checkboxes
   --------------------------------------------------------------------------- */
.maf-left .maf-consent-search .gfield_label,
.maf-left .maf-consent-automated .gfield_label,
.maf-left .maf-consent-marketing .gfield_label {
	font-weight: 700;
	font-size: 14px;
}

.maf-left .maf-consent-search .gfield_checkbox label,
.maf-left .maf-consent-automated .gfield_checkbox label,
.maf-left .maf-consent-marketing .gfield_checkbox label {
	font-size: 12px !important;
	line-height: 1.5;
}

.maf-left .maf-consent-search a,
.maf-left .maf-consent-automated a {
	color: #c44;
}

/* ---------------------------------------------------------------------------
   Thanks / confirmation page
   --------------------------------------------------------------------------- */
.maf-confirmation {
	font-family: var(--maf-font);
	max-width: 860px;
	margin: 0 auto;
	padding: 0 0 60px;
}

/* Hero banner */
.maf-conf-hero {
	text-align: center;
	padding: 56px 24px 48px;
	background: linear-gradient(135deg, var(--maf-navy) 0%, #1e4080 100%);
	border-radius: var(--maf-radius);
	margin-bottom: 48px;
	color: #fff;
}

.maf-conf-check {
	width: 64px;
	height: 64px;
	margin: 0 auto 20px;
}

.maf-conf-check svg {
	width: 100%;
	height: 100%;
}

.maf-conf-heading {
	font-size: 32px;
	font-weight: 700;
	color: #fff;
	margin: 0 0 16px;
	line-height: 1.2;
}

.maf-conf-timing {
	display: inline-block;
	background: rgba(255,255,255,0.12);
	border: 1px solid rgba(255,255,255,0.25);
	border-radius: 6px;
	padding: 12px 20px;
	font-size: 15px;
	color: rgba(255,255,255,0.95);
	margin: 0;
	max-width: 480px;
}

/* Body sections */
.maf-conf-body {
	display: flex;
	flex-direction: column;
	gap: 48px;
}

.maf-conf-next h2,
.maf-conf-products h2 {
	font-size: 22px;
	font-weight: 700;
	color: var(--maf-navy);
	margin: 0 0 24px;
}

/* Numbered steps */
.maf-conf-steps {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.maf-conf-steps li {
	display: flex;
	align-items: flex-start;
	gap: 16px;
}

.maf-conf-step-num {
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--maf-navy);
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
}

.maf-conf-step-text {
	font-size: 15px;
	line-height: 1.6;
	color: var(--maf-text);
	padding-top: 6px;
}

.maf-conf-step-text strong {
	display: block;
	font-weight: 700;
	color: var(--maf-navy);
	margin-bottom: 2px;
}

/* Product cards */
.maf-conf-products > p {
	font-size: 15px;
	color: #555;
	margin: -12px 0 20px;
}

.maf-conf-card-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
}

.maf-conf-card {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 20px 20px 18px;
	border: 1.5px solid var(--maf-border);
	border-radius: var(--maf-radius);
	text-decoration: none;
	color: var(--maf-text);
	background: #fff;
	transition: border-color 0.2s, box-shadow 0.2s;
	position: relative;
}

.maf-conf-card:hover {
	border-color: var(--maf-cyan);
	box-shadow: 0 4px 16px rgba(0,0,0,0.08);
	color: var(--maf-text);
}

.maf-conf-card-title {
	font-size: 15px;
	font-weight: 700;
	color: var(--maf-navy);
}

.maf-conf-card-desc {
	font-size: 13px;
	color: #666;
	line-height: 1.5;
}

.maf-conf-card-arrow {
	font-size: 16px;
	color: var(--maf-orange);
	margin-top: auto;
	padding-top: 8px;
}

/* Contact strip */
.maf-conf-contact {
	font-size: 14px;
	color: #555;
}

.maf-conf-contact a {
	color: var(--maf-navy);
	font-weight: 600;
}

/* Quick-Start Guide download strip */
.maf-conf-guide {
	display: flex;
	align-items: center;
	gap: 28px;
	border-top: 1px solid var(--maf-border);
	padding-top: 32px;
	background: var(--maf-grey-bg);
	border-radius: var(--maf-radius);
	padding: 28px 28px;
}

.maf-conf-guide-img {
	flex-shrink: 0;
	width: 110px;
	height: auto;
	border-radius: 4px;
	box-shadow: 0 4px 16px rgba(0,0,0,0.18);
	display: block;
}

.maf-conf-guide-text {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.maf-conf-guide-text h3 {
	font-size: 17px;
	font-weight: 700;
	color: var(--maf-navy);
	margin: 0;
}

.maf-conf-guide-text p {
	font-size: 14px;
	color: #555;
	line-height: 1.6;
	margin: 0;
}

.maf-conf-guide-btn {
	display: inline-block;
	padding: 11px 22px;
	background: var(--maf-orange);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	border-radius: 6px;
	text-decoration: none;
	align-self: flex-start;
	transition: opacity 0.2s;
}

.maf-conf-guide-btn:hover {
	opacity: 0.88;
	color: #fff;
}

@media (max-width: 600px) {
	.maf-conf-heading {
		font-size: 24px;
	}

	.maf-conf-card-grid {
		grid-template-columns: 1fr;
	}

	.maf-conf-hero {
		padding: 40px 20px 36px;
	}

	.maf-conf-guide {
		flex-direction: column;
		align-items: flex-start;
	}

	.maf-conf-guide-img {
		width: 90px;
	}
}

/* jQuery UI Autocomplete dropdown */
.ui-autocomplete {
	z-index: 999999 !important;
	background: #fff;
	border: 1px solid var(--maf-border);
	border-radius: 6px;
	box-shadow: 0 4px 16px rgba(0,0,0,0.1);
	font-size: 14px;
	max-height: 220px;
	overflow-y: auto;
}

.ui-autocomplete .ui-menu-item-wrapper {
	padding: 8px 14px;
	cursor: pointer;
}

.ui-autocomplete .ui-state-active,
.ui-autocomplete .ui-menu-item-wrapper:hover {
	background: var(--maf-grey-bg);
	color: var(--maf-text);
}

/* ---------------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------------- */
@media (max-width: 805px) {
	.maf-dialog,
	.maf-inline-wrap {
		flex-direction: column;
		max-width: 100%;
	}

	.maf-right {
		flex: none;
		border-radius: 0;
	}

	.maf-left {
		padding: 24px 20px;
	}

	.maf-right {
		padding: 28px 20px;
	}
}
@media (min-width: 1400px) {
	.maf-dialog {
		max-width: 1200px;
	}
}

.gform_required_legend {
	display: none;
}
.gfield_description {
	padding-bottom: 4px !important;
}