/* Forms (EmDash forms plugin, rendered by src/components/GForm.astro inside the Form block).
   Recreates the look of Gravity Forms' "Orbital" theme the WordPress site used, without
   GF's framework CSS. Scoped to .jh-form. */
.jh-form {
	--f-text: #112337;
	--f-muted: #585e6a;
	--f-border: #686e77;
	--f-primary: #204ce5;
	--f-primary-dark: #001ab3;
	--f-error: #c02b0a;
	--f-shadow: 0 1px 4px rgba(18, 25, 97, 0.08);
	font-family: "Source Sans Pro", sans-serif;
	color: var(--f-text);
	margin-bottom: 1.5em;
}
.jh-form .gform_title { margin-bottom: 20px; }
.jh-form .gform_fields { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 40px 16px; }
.jh-form .gfield { grid-column: 1 / -1; margin: 0; min-width: 0; }
.jh-form .gfield--width-half { grid-column: span 6; }
.jh-form .gform_validation_container { display: none !important; }
.jh-form .gfield_label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; font-size: 18px; font-weight: 500; line-height: 1.43; color: var(--f-text); margin: 0 0 8px; padding: 0; }
.jh-form .gfield_required_text { font-size: 12px; font-weight: 500; color: var(--f-error); }
.jh-form .gfield_required_asterisk { color: var(--f-error); }
.jh-form .gfield_description { font-size: 14px; color: var(--f-muted); margin-top: 8px; }
.jh-form input:not([type=checkbox]):not([type=radio]):not([type=hidden]), .jh-form textarea, .jh-form select {
	box-sizing: border-box; display: block; width: 100%; min-height: 38px; padding: 0 12px;
	font: 400 14px/1.5 "Source Sans Pro", sans-serif; color: var(--f-text);
	background: #fff; border: 1px solid var(--f-border); border-radius: 3px; box-shadow: var(--f-shadow);
}
.jh-form textarea { padding: 12px; min-height: 192px; resize: vertical; }
.jh-form textarea.large { min-height: 288px; }
.jh-form :is(input, textarea, select, button):focus-visible { outline: 2px solid var(--f-primary); outline-offset: 2px; }
.jh-form .gform-grid-row { display: flex; flex-wrap: wrap; gap: 12px 16px; }
.jh-form .gform-grid-row > .gform-grid-col { flex: 1 1 0; min-width: 160px; }
.jh-form .gform-field-label--type-sub { display: block; margin-top: 8px; font-size: 18px; color: var(--f-muted); }
.jh-form .gfield_checkbox, .jh-form .gfield_radio { display: grid; gap: 16px; }
.jh-form .gchoice { display: grid; grid-template-columns: minmax(20px, max-content) auto; align-items: start; column-gap: 10px; }
.jh-form .gfield-choice-input, .jh-form .gsurvey-likert input, .jh-form .gfield_consent_input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--f-primary); }
.jh-form .gform-field-label--type-inline { font-size: 18px; line-height: 1.43; color: var(--f-text); }
/* Likert (rating grid) */
.jh-form .gsurvey-likert { width: 100%; border-collapse: collapse; table-layout: fixed; text-align: center; }
.jh-form .gsurvey-likert th { font-size: 14px; font-weight: 500; padding: 8px 0; color: var(--f-text); }
.jh-form .gsurvey-likert tbody tr:nth-child(odd) { background: rgba(17, 35, 55, 0.08); }
.jh-form .gsurvey-likert td { padding: 8px 0; }
.jh-form .gsurvey-likert-row-label { text-align: start; font-size: 14px; font-weight: 500; padding: 8px 0 8px 12px !important; }
.jh-form .gsurvey-likert td:first-child, .jh-form .gsurvey-likert th:first-child { width: 20%; }
@media (max-width: 640px) {
	.jh-form .gfield--width-half { grid-column: 1 / -1; }
	.jh-form .gsurvey-likert thead { display: none; }
	.jh-form .gsurvey-likert, .jh-form .gsurvey-likert tbody, .jh-form .gsurvey-likert tr { display: block; }
	.jh-form .gsurvey-likert tr { padding: 8px 12px; }
	.jh-form .gsurvey-likert td { display: flex; gap: 10px; align-items: center; padding: 4px 0; }
	.jh-form .gsurvey-likert-row-label { padding: 0 !important; font-weight: 600; }
	.jh-form .gsurvey-likert-choice::after { content: attr(data-label); font-size: 14px; }
}
/* Progress bar (multi-page) */
.jh-form .gf_progressbar_wrapper { margin-bottom: 40px; }
.jh-form .gf_progressbar_title { font-size: 14px; font-weight: 600; line-height: 1; color: var(--f-muted); margin: 0 0 16px; }
.jh-form .gf_progressbar { height: 10px; border-radius: 100px; background: rgba(17, 35, 55, 0.1); overflow: hidden; }
.jh-form .gf_progressbar_percentage { height: 10px; border-radius: 100px; background: var(--f-primary); transition: width 0.3s; }
.jh-form .gf_progressbar_percentage span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
/* Buttons */
.jh-form .gform_footer, .jh-form .gform_page_footer { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.jh-form .gform_footer .button, .jh-form .gform_page_footer .button {
	display: inline-flex; align-items: center; min-height: 38px; padding: 0 16px; cursor: pointer;
	font: 500 14px/1 "Source Sans Pro", sans-serif; color: #fff; background: var(--f-primary);
	border: 1px solid transparent; border-radius: 3px; box-shadow: var(--f-shadow);
}
.jh-form .gform_footer .button:hover, .jh-form .gform_page_footer .button:hover { background: var(--f-primary-dark); }
.jh-form .gform_button { font-size: 18px; }
.jh-form .gform_previous_button { color: var(--f-text) !important; background: #fff !important; border-color: var(--f-border) !important; }
.jh-form .gform_previous_button:hover { background: #f5f5f5 !important; }
/* Plugin states */
.jh-form [hidden] { display: none !important; }
.jh-form fieldset.gfield-group { border: 0; padding: 0; margin: 0; min-width: 0; }
.jh-form fieldset.gfield-group > legend { padding: 0; }
.jh-form .ec-gf-error { display: block; color: var(--f-error); font-size: 14px; margin-top: 6px; }
.jh-form .ec-gf-error:empty, .jh-form .ec-form-status:empty { display: none; }
.jh-form .ec-form-status--error { color: var(--f-error); margin-top: 16px; }
.jh-form form.gf-confirmed > :not(.ec-form-status) { display: none !important; }
.jh-form .ec-form-status:focus { outline: none; }
