/**
 * Forms in the checkout's look (approved mockup, 12 Oct 2026). Loaded by classes/class-forms-look.php.
 *
 * Gravity Forms set most of the look themselves: the Orbital theme and its values in the form block (input size
 * Large, radius 8, navy text, accent and button). This file adds only what GF has no setting for, on any form
 * whose CSS Class Name is armd-form (GF puts armd-form on the <form> and armd-form_wrapper on its wrapper):
 *   A. Gilroy weights, sizes and gaps; no "* indicates required" line
 *   B. Numbered cards: the form is one white box and each Section field starts a card inside it
 *   C. Choices: 44px rows; radios as pills (Choice Alignment: Horizontal) or option cards (Vertical)
 *   D. The "Please login to continue." notice (field class login-notification)
 *   E. Upload box, 44px show-password button, password strength meter
 *   F. The Reset Password page (Frontend Reset Password plugin) as the My Account login box
 * The My Account login box (once section G here) is in armd-login.css since the login mockup of 18 Oct 2026.
 */

/* A. Gilroy has one font family per weight, so Orbital's font-weight alone can't pick them. */
.armd-form_wrapper {
	--armd-navy: var(--wp--preset--color--accent-1, #052c53);
	--armd-sky: var(--wp--preset--color--custom-light-blue, #00b2f4);
	--armd-soft: color-mix(in srgb, var(--wp--preset--color--custom-blue-background, #d9edfa) 45%, #fff);
	--armd-line: #e0e5eb;
	--armd-page: #f5f7fa; /* the page colour between the cards */
	--armd-pad-x: 24px;
	--armd-pad-y: 18px;
	--armd-gap: 12px;
	--armd-radius: 10px;
	--gf-font-family-base: var(--wp--preset--font-family--gilroy-regular);
	--gf-ctrl-label-font-family-primary: var(--wp--preset--font-family--gilroy-medium);
	--gf-ctrl-btn-font-family: var(--wp--preset--font-family--gilroy-bold);
	--gf-font-size-primary: 15px;
	--gf-form-gap-x: 14px;
	--gf-form-gap-y: 12px;
	--gf-ctrl-size-lg: 44px; /* Orbital's Large size, a little tighter; still a 44px tap target */
}

/* The red * speaks for itself, as on the checkout; GF's line explaining it is dropped. */
.armd-form_wrapper .gform_required_legend {
	display: none;
}

/* B. The form is one white box; each Section field starts a new numbered card inside it. */
.armd-form_wrapper .armd-form {
	padding: var(--armd-pad-y) var(--armd-pad-x);
	border: 1px solid var(--armd-line);
	border-radius: var(--armd-radius);
	background: #fff;
	counter-reset: armd-card;
}

.armd-form_wrapper .gsection {
	position: relative;
	padding: 0;
	border: 0;
	counter-increment: armd-card;
}

.armd-form_wrapper .gsection_title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	color: var(--armd-navy);
	font-family: var(--wp--preset--font-family--gilroy-bold);
	font-size: 20px;
	line-height: 1.2;
}

.armd-form_wrapper .gsection_title::before {
	content: counter(armd-card);
	display: inline-grid;
	flex: none;
	place-items: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--armd-navy);
	color: #fff;
	font-family: var(--wp--preset--font-family--gilroy-medium);
	font-size: 13px;
}

/* A section below other fields cuts the box: page colour between the cards, rounded corners each side. */
.armd-form_wrapper .gfield:not(.gform_validation_container) ~ .gsection {
	margin-block-start: calc(var(--armd-pad-y) * 2 + var(--armd-gap) + 2px - var(--gf-form-gap-y));
}

.armd-form_wrapper .gfield:not(.gform_validation_container) ~ .gsection::before,
.armd-form_wrapper .gfield:not(.gform_validation_container) ~ .gsection::after {
	content: "";
	position: absolute;
	inset-inline: calc(-1px - var(--armd-pad-x));
	box-sizing: border-box;
	height: calc(var(--armd-radius) + 1px);
	border: 1px solid var(--armd-line);
	background: #fff;
	box-shadow: 0 0 0 var(--armd-gap) var(--armd-page);
}

.armd-form_wrapper .gfield:not(.gform_validation_container) ~ .gsection::before { /* foot of the card above */
	top: calc(-2px - var(--armd-pad-y) - var(--armd-gap) - var(--armd-radius));
	border-top: 0;
	border-radius: 0 0 var(--armd-radius) var(--armd-radius);
	clip-path: inset(0 calc(-1 * var(--armd-gap)) calc(-1 * var(--armd-gap)));
}

.armd-form_wrapper .gfield:not(.gform_validation_container) ~ .gsection::after { /* top of this card */
	top: calc(-1px - var(--armd-pad-y));
	border-bottom: 0;
	border-radius: var(--armd-radius) var(--armd-radius) 0 0;
	clip-path: inset(calc(-1 * var(--armd-gap)) calc(-1 * var(--armd-gap)) 0);
}

/* C. Every choice row is at least 44px and clickable across its width; radios become pills
   (Choice Alignment: Horizontal) or full-width option cards (Vertical). */
.armd-form_wrapper .gfield--type-choice .gchoice {
	position: relative;
	align-items: center;
	min-height: 44px;
}

.armd-form_wrapper .gfield--type-radio .gchoice {
	box-sizing: border-box;
	min-height: 44px;
	padding: 8px 14px 8px 12px;
	border: 1px solid var(--armd-line);
	border-radius: 8px;
	background: #fff;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.armd-form_wrapper .gfield--type-radio .gchoice:hover {
	border-color: color-mix(in srgb, var(--armd-navy) 35%, var(--armd-line));
}

.armd-form_wrapper .gfield--type-radio .gchoice:has(input:checked) {
	border-color: var(--armd-navy);
	background: var(--armd-soft);
	box-shadow: inset 0 0 0 1px var(--armd-navy);
}

.armd-form_wrapper .gfield--type-choice .gchoice:has(input:focus-visible) {
	outline: 3px solid var(--armd-sky);
	outline-offset: 2px;
}

.armd-form_wrapper .gfield--type-choice .gchoice label::after {
	content: "";
	position: absolute;
	inset: 0;
}

/* D. Shown when "Already a customer?" is Yes, in place of the form. */
.armd-form_wrapper .login-notification {
	position: relative;
	padding: 12px 16px 12px 46px;
	border: 1px solid var(--armd-sky);
	border-radius: 8px;
	background: var(--armd-soft);
	color: var(--armd-navy);
	font-family: var(--wp--preset--font-family--gilroy-medium);
	font-size: 17px;
}

.armd-form_wrapper .login-notification::before {
	content: "i";
	position: absolute;
	top: 50%;
	left: 16px;
	display: grid;
	place-items: center;
	box-sizing: border-box;
	transform: translateY(-50%);
	width: 20px;
	height: 20px;
	border: 2px solid var(--armd-sky);
	border-radius: 50%;
	color: var(--armd-sky);
	font-family: var(--wp--preset--font-family--gilroy-bold);
	font-size: 13px;
	line-height: 1;
}

/* E. File upload: a dashed box around GF's own file button and size note (no drag-and-drop on a single upload). */
.armd-form_wrapper .ginput_container_fileupload {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 14px;
	padding: 16px;
	border: 1px dashed #aab5c2;
	border-radius: 8px;
	background: var(--armd-soft);
}

.armd-form_wrapper .ginput_container_fileupload::before {
	content: "";
	flex: none;
	width: 28px;
	height: 28px;
	background: var(--armd-navy);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 3v5h5M12 18v-6M9.5 14.5 12 12l2.5 2.5'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 3v5h5M12 18v-6M9.5 14.5 12 12l2.5 2.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.armd-form_wrapper .ginput_container_fileupload input[type="file"] {
	flex: 1 1 200px;
	max-width: 420px;
	background: #fff;
}

.armd-form_wrapper .ginput_container_fileupload .gform_fileupload_rules {
	margin: 0;
}

/* Show/hide password: a 44px button inside the box. */
.armd-form_wrapper .gform_show_password {
	--gf-ctrl-btn-size-simple: 44px;
	inset-inline-end: 2px;
}

/* Password strength: a short meter and the word, under the password boxes. */
.armd-form_wrapper .gfield_password_strength {
	--armd-meter: 0%;
	--armd-meter-colour: transparent;
	display: flex;
	align-items: center;
	gap: 10px;
	box-sizing: border-box;
	width: auto;
	min-height: 0;
	margin-top: 10px;
	padding: 0;
	border: 0;
	background: none;
	color: #5f6b7a;
	font-size: 13px;
	line-height: 1.3;
	text-align: left;
}

.armd-form_wrapper .gfield_password_strength::before {
	content: "";
	position: static;
	flex: none;
	width: 120px;
	height: 6px;
	border-radius: 3px;
	background: linear-gradient(var(--armd-meter-colour) 0 0) left / var(--armd-meter) 100% no-repeat, #e6eaef;
}

.armd-form_wrapper .gfield_password_strength::after {
	content: none;
}

.armd-form_wrapper .gfield_password_strength.short    { --armd-meter: 20%;  --armd-meter-colour: #b42318; }
.armd-form_wrapper .gfield_password_strength.bad      { --armd-meter: 45%;  --armd-meter-colour: #b42318; }
.armd-form_wrapper .gfield_password_strength.good     { --armd-meter: 70%;  --armd-meter-colour: #ff6900; }
.armd-form_wrapper .gfield_password_strength.strong   { --armd-meter: 100%; --armd-meter-colour: #1a7f37; color: #14532d; }
.armd-form_wrapper .gfield_password_strength.mismatch { --armd-meter: 100%; --armd-meter-colour: #b42318; color: #b42318; }

@media (max-width: 640px) {
	.armd-form_wrapper {
		--armd-pad-x: 16px;
		--armd-pad-y: 16px;
		--gf-font-size-primary: 16px; /* 16px stops iPhones zooming into a field */
	}

	.armd-form_wrapper .gfield--choice-align-horizontal .gchoice {
		flex: 1 1 auto;
	}

	/* The file box takes the whole row, so the chosen file's name has room. */
	.armd-form_wrapper .ginput_container_fileupload::before {
		content: none;
	}

	.armd-form_wrapper .ginput_container_fileupload input[type="file"] {
		flex-basis: 100%;
		max-width: none;
	}
}

/* F. Reset Password page (Frontend Reset Password plugin): the My Account login box, with the forms' navy button. */
#password-lost-form-wrap .account-page-form {
	box-sizing: border-box;
	max-width: 600px;
	margin: 0;
	padding: 20px;
	border: 1px solid #eeeeee;
	border-radius: 5px;
	background: #fff;
}

#password-lost-form-wrap fieldset {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

/* The page title already says "Reset Password"; the box's own title stays for screen readers. */
#password-lost-form-wrap legend {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

#password-lost-form-wrap .somfrp-lost-pass-form-text p {
	margin: 0 0 16px;
	font-family: var(--wp--preset--font-family--gilroy-regular);
	font-size: 17px;
	line-height: 1.45;
}

#password-lost-form-wrap label {
	display: block;
	margin: 0 0 6px;
	line-height: 1.3;
}

/* The login box marks its fields with a red *; the plugin's template has no marker. */
#password-lost-form-wrap label[for="somfrp_user_info"]::after {
	content: " *" / "";
	color: #b42318;
}

#password-lost-form-wrap input[type="text"],
#password-lost-form-wrap input[type="password"] {
	box-sizing: border-box;
	display: block;
	width: 100%;
	max-width: none;
	padding: 14px 10px;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	color: var(--wp--preset--color--accent-1, #052c53);
	font-family: var(--wp--preset--font-family--gilroy-regular);
	font-size: 18px;
}

/* The new-password step: the plugin keeps its boxes 200px wide; make room for its show/hide button. */
#password-lost-form-wrap .somfrp-password-wrapper {
	width: auto;
	max-width: none;
}

#password-lost-form-wrap .somfrp-password-wrapper input {
	padding-right: 44px;
}

#password-lost-form-wrap input:focus {
	border-color: var(--wp--preset--color--custom-light-blue, #00b2f4);
	outline: none;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--wp--preset--color--custom-light-blue, #00b2f4) 25%, transparent);
}

#password-lost-form-wrap #reset-pass-submit {
	width: 100%;
	min-height: 52px;
	margin: 16px 0 0;
	padding: 13px 20px;
	border: 0;
	border-radius: 8px;
	background: var(--wp--preset--color--accent-1, #052c53);
	color: #fff;
	font-family: var(--wp--preset--font-family--gilroy-bold);
	font-size: 17px;
	cursor: pointer;
}

#password-lost-form-wrap #reset-pass-submit:hover,
#password-lost-form-wrap #reset-pass-submit:focus-visible {
	background: color-mix(in srgb, var(--wp--preset--color--accent-1, #052c53) 85%, #fff);
}

#password-lost-form-wrap #reset-pass-submit:focus-visible {
	outline: 3px solid var(--wp--preset--color--custom-light-blue, #00b2f4);
	outline-offset: 2px;
}

#password-lost-form-wrap .lostpassword-submit {
	margin: 0;
}

/* The plugin's "email sent" / error notice: navy (its colour picker can't take an exact value), and the
   box's width (100% wide plus padding overflowed a phone). */
#password-lost-form-wrap .som-password-sent-message {
	box-sizing: border-box;
	max-width: 600px;
	margin: 0 0 16px;
	border-color: var(--wp--preset--color--accent-1, #052c53);
	border-radius: 5px;
	background-color: var(--wp--preset--color--accent-1, #052c53);
}
