/* Formidable Forms, styled to match the checkout (Formidable's own stylesheet is off: inc-forms.php). */

.frm_forms { margin: 1.5em 0 0; }
.frm_forms form { margin: 0; }
.frm_forms fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }

/* Things Formidable hides with its own stylesheet */
.frm_forms .frm_screen_reader { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.frm_forms .frm_hidden, .frm_forms .frm_none_container > .frm_primary_label, .frm_forms .frm_verify, .frm_forms .frm_hidden_container > .frm_primary_label { display: none !important; }

/* Layout: Formidable's 12-column classes */
.frm_forms .frm_fields_container, .frm_forms .frm_combo_inputs_container { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px 16px; }
.frm_forms .frm_combo_inputs_container { gap: 12px 16px; }
.frm_forms .frm_form_field { grid-column: span 12; min-width: 0; margin: 0; }
.frm_forms .frm2 { grid-column: span 2; }
.frm_forms .frm3, .frm_forms .frm_fourth { grid-column: span 3; }
.frm_forms .frm4, .frm_forms .frm_third { grid-column: span 4; }
.frm_forms .frm6, .frm_forms .frm_half { grid-column: span 6; }
.frm_forms .frm8, .frm_forms .frm_two_thirds { grid-column: span 8; }
.frm_forms .frm9, .frm_forms .frm_three_fourths { grid-column: span 9; }
.frm_forms .frm10 { grid-column: span 10; }

/* Labels (same as checkout) */
.frm_forms .frm_primary_label {
	display: block; margin: 0 0 8px; font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--tz-ink);
}
.frm_forms .frm_required { color: var(--wp--preset--color--danger); }
.frm_forms .frm_description { margin-top: 6px; font-size: 13px; line-height: 18px; color: var(--tz-muted); }

/* Fields: the theme's input style, full width */
.frm_forms input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="hidden"]), .frm_forms select, .frm_forms textarea {
	display: block; box-sizing: border-box; width: 100%; max-width: none; min-height: 48px; margin: 0;
}
.frm_forms textarea { min-height: 140px; padding: 12px; line-height: 1.5; resize: vertical; }
.frm_forms select { padding-right: 36px; }
.frm_forms ::placeholder, .frm_forms .frm-select-placeholder { color: #8c8276; opacity: 1; }
.frm_forms .frm_capitalize input { text-transform: capitalize; }

/* Tick boxes and options (e.g. consent) */
.frm_forms .frm_opt_container, .frm_forms .frm_checkbox, .frm_forms .frm_radio { margin: 0; }
.frm_forms .frm_checkbox label, .frm_forms .frm_radio label {
	display: flex; align-items: flex-start; gap: 12px; margin: 0; cursor: pointer;
	font-size: 14px; line-height: 21px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--tz-ink);
}
.frm_forms input[type="checkbox"], .frm_forms input[type="radio"] { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--tz-forest); }

/* Errors and messages */
.frm_forms .frm_blank_field input, .frm_forms .frm_blank_field select, .frm_forms .frm_blank_field textarea,
.frm_forms [aria-invalid="true"]:not([type="checkbox"]) { border-color: var(--wp--preset--color--danger) !important; }
.frm_forms .frm_error { margin-top: 6px; font-size: 13px; line-height: 18px; color: var(--wp--preset--color--danger); }
.frm_forms .frm_error_style, .frm_forms .frm_message, .frm_message {
	margin: 0 0 20px; padding: 14px 18px; font-size: 15px; line-height: 24px; border-left: 3px solid;
}
.frm_forms .frm_error_style { background: #f6e7e5; border-color: var(--wp--preset--color--danger); color: var(--tz-ink); }
.frm_forms .frm_message, .frm_message { background: var(--tz-stone); border-color: var(--tz-forest); color: var(--tz-ink); }
.frm_message p { margin: 0; }
/* Formidable moves focus to these messages so screen readers announce them; they aren't controls, so no focus ring. */
.frm_forms .frm_error_style:focus, .frm_forms .frm_message:focus, .frm_message:focus, .frm_forms [tabindex="-1"]:focus { outline: none; box-shadow: none; }

/* Submit: the site's button */
.frm_forms .frm_submit { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; margin: 4px 0 0; }
.frm_forms .frm_button_submit {
	display: inline-flex; align-items: center; justify-content: center; min-width: 180px; margin: 0; padding: 16px 28px; border: 0; border-radius: 2px; cursor: pointer;
	background: var(--tz-olive); color: var(--wp--preset--color--white);
	font-family: inherit; font-size: 13px; line-height: 16px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
	transition: background-color .2s ease;
}
.frm_forms .frm_button_submit:hover, .frm_forms .frm_button_submit:focus-visible { background: var(--tz-forest); }
.frm_forms .frm_loading_form .frm_button_submit, .frm_forms .frm_button_submit[disabled] { opacity: .6; cursor: progress; }

/* The privacy note sits just under the button */
.frm_forms + .tz-help__privacy, .frm_forms .tz-help__privacy { margin-top: 12px !important; }

@media (max-width: 600px) {
	.frm_forms .frm2, .frm_forms .frm3, .frm_forms .frm4, .frm_forms .frm6, .frm_forms .frm8, .frm_forms .frm9, .frm_forms .frm10,
	.frm_forms .frm_fourth, .frm_forms .frm_third, .frm_forms .frm_half, .frm_forms .frm_two_thirds, .frm_forms .frm_three_fourths { grid-column: span 12; }
	.frm_forms .frm_button_submit { width: 100%; }
}
