/* "Индивидуален план" page (PlanFormPage): the Ninja Form, compact and with rounded fields.
   The fields are laid out on a 12-column grid by their position in the form, which is the same
   in the Bulgarian (id 2) and English (id 6) forms:
   1 gender · 2 weight · 3 height · 4 age | 5 activity · 6 goal | 7 name · 8 e-mail · 9 phone |
   10 disliked foods · 11 health problems | 12 allergies | 13 more info | 14 consent | 15 send */
.fp-plan-form {
	margin: 0 auto;
	max-width: 860px;
	padding: 16px 0 48px;
}

.fp-plan-form__title {
	font-size: clamp(24px, 3vw, 34px);
	line-height: 1.2;
	margin: 0 0 14px;
	text-align: center;
}

.fp-plan-form .nf-form-fields-required {
	font-size: 13px;
	margin-bottom: 8px;
	opacity: .75;
}

.fp-plan-form nf-fields-wrap {
	align-items: start; /* a field's error text grows its own cell downwards; the row's inputs stay level */
	display: grid;
	gap: 12px 14px;
	grid-template-columns: repeat(12, minmax(0, 1fr));
}

.fp-plan-form nf-fields-wrap > nf-field {
	display: block;
	grid-column: span 12;
	min-width: 0;
}

.fp-plan-form nf-fields-wrap > nf-field:nth-of-type(-n+4) {
	grid-column: span 3;
}

.fp-plan-form nf-fields-wrap > nf-field:nth-of-type(5),
.fp-plan-form nf-fields-wrap > nf-field:nth-of-type(6),
.fp-plan-form nf-fields-wrap > nf-field:nth-of-type(10),
.fp-plan-form nf-fields-wrap > nf-field:nth-of-type(11) {
	grid-column: span 6;
}

.fp-plan-form nf-fields-wrap > nf-field:nth-of-type(7),
.fp-plan-form nf-fields-wrap > nf-field:nth-of-type(8),
.fp-plan-form nf-fields-wrap > nf-field:nth-of-type(9) {
	grid-column: span 4;
}

.fp-plan-form .nf-field-container {
	margin-bottom: 0 !important;
}

.fp-plan-form .nf-field-label {
	margin-bottom: 4px !important;
}

.fp-plan-form .nf-field-label label,
.fp-plan-form .nf-field-label label span,
.fp-plan-form .nf-field-label .nf-label-span {
	font-size: 14px !important;
	font-weight: 700;
	line-height: 1.25 !important;
	margin: 0 !important;
}

.fp-plan-form .nf-field-element input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
.fp-plan-form .nf-field-element select,
.fp-plan-form .nf-field-element textarea {
	background: #fff !important;
	border: 1px solid #c9d3cd !important;
	border-radius: 14px !important;
	box-shadow: none !important;
	font-size: 15px !important;
	height: 44px !important;
	line-height: 1.3 !important;
	padding: 8px 14px !important;
	width: 100% !important;
}

.fp-plan-form .nf-field-element textarea {
	height: 96px !important;
	resize: vertical;
}

.fp-plan-form .nf-field-element input:focus,
.fp-plan-form .nf-field-element select:focus,
.fp-plan-form .nf-field-element textarea:focus {
	border-color: #2a5446 !important;
	outline: 2px solid rgba(42, 84, 70, .18);
	outline-offset: 1px;
}

/* Ninja Forms draws the select's arrow on a box behind a see-through select */
.fp-plan-form .list-select-wrap .nf-field-element > div,
.fp-plan-form .list-select-wrap > div div {
	background: #fff !important;
	border: 0 !important;
	border-radius: 14px !important;
}

.fp-plan-form .list-select-wrap select {
	background: transparent !important;
	position: relative;
}

.fp-plan-form .list-select-wrap .nf-field-element > div::after,
.fp-plan-form .list-select-wrap > div div::after {
	line-height: 44px !important;
}

/* Consent checkbox and its text on one line */
.fp-plan-form .checkbox-container .nf-field-label label {
	font-weight: 400;
}

.fp-plan-form .nf-after-field .nf-error-msg,
.fp-plan-form .nf-input-limit {
	font-size: 12px;
	margin: 2px 0 0;
}

.fp-plan-form .submit-container {
	text-align: center;
}

@media (max-width: 700px) {
	.fp-plan-form nf-fields-wrap {
		gap: 10px 10px;
	}

	.fp-plan-form nf-fields-wrap > nf-field:nth-of-type(-n+4) {
		grid-column: span 6;
	}

	.fp-plan-form nf-fields-wrap > nf-field:nth-of-type(n+5) {
		grid-column: span 12;
	}
}

/* The arrow box behind the select: exactly the select's size */
.fp-plan-form .list-select-wrap .nf-field-element > div,
.fp-plan-form .list-select-wrap > div div {
	bottom: auto !important;
	height: 44px !important;
	top: 0 !important;
}

/* Consent: checkbox and its text side by side */
.fp-plan-form .checkbox-container .field-wrap {
	align-items: flex-start;
	display: flex !important;
	gap: 10px;
}

.fp-plan-form .checkbox-container .nf-field-element {
	flex: none;
	order: -1;
	width: auto !important;
}

.fp-plan-form .checkbox-container .nf-field-label {
	flex: 1;
	margin: 0 !important;
	padding: 0 !important;
	width: auto !important;
}

.fp-plan-form .checkbox-container .nf-field-label label,
.fp-plan-form .checkbox-container .nf-field-label label * {
	font-size: 13px !important;
	font-weight: 400;
	line-height: 1.4 !important;
}

.fp-plan-form .checkbox-container .nf-field-label label::before,
.fp-plan-form .checkbox-container .nf-field-label label::after {
	display: none !important; /* Ninja's drawn checkbox; the real one is shown instead */
}

/* The box itself is the site's own checkbox (assets/css/fp-ui.css, scope .fp-plan-form):
   Ninja's default is drawn differently per browser and showed no tick in Firefox. */
.fp-plan-form .checkbox-container input[type="checkbox"] {
	left: auto !important;
	margin: 0 !important;
	opacity: 1 !important;
	position: relative !important;
	top: 0 !important;
}

/* Send button: the site's pill */
.fp-plan-form .submit-container input[type="submit"],
.fp-plan-form .submit-container input[type="button"] {
	background: linear-gradient(90deg, #2a5446, #2f9e44) !important;
	border: 0 !important;
	border-radius: 999px !important;
	color: #fff !important;
	font-weight: 700;
	height: auto !important;
	letter-spacing: .04em;
	padding: 14px 36px !important;
}

/* Validation: a red border and a small message under the field, instead of Ninja's red "!" block
   (which sat on top of the rounded field) */
.fp-plan-form .nf-error .nf-field-element::after,
.fp-plan-form .nf-pass .nf-field-element::after,
.fp-plan-form .nf-error.list-select-wrap .nf-field-element > div::after {
	background: none !important;
	color: #4a4a4a !important;
}

.fp-plan-form .nf-error:not(.list-select-wrap) .nf-field-element::after,
.fp-plan-form .nf-pass:not(.list-select-wrap) .nf-field-element::after {
	content: none !important;
	display: none !important;
}

/* Same :not() chain as the base field rule, so this wins over its border colour */
.fp-plan-form .field-wrap.nf-error .nf-field-element input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
.fp-plan-form .field-wrap.nf-error .nf-field-element select,
.fp-plan-form .field-wrap.nf-error .nf-field-element textarea {
	border-color: #d92d20 !important;
}

.fp-plan-form .nf-error .nf-field-element > div {
	box-shadow: none !important;
}

.fp-plan-form .nf-error-wrap,
.fp-plan-form .nf-after-field .nf-error-msg {
	color: #d92d20 !important;
	font-size: 12px !important;
	line-height: 1.3 !important;
	margin: 3px 0 0 !important;
	padding: 0 2px !important;
}

.fp-plan-form .nf-after-field,
.fp-plan-form .nf-after-field .nf-error-wrap:empty {
	margin: 0 !important;
	min-height: 0 !important;
}
