/**
 * Checkbox appearance for every Gravity Forms form on the site.
 *
 * Originally built for the Areas of Practice form from its Figma mockup (dark
 * teal fill, white tick, 12px row gap), then applied site-wide at the
 * client's request so checkboxes read the same on every form. The AOP card
 * styles in ota-aop-cards.css only override what differs, and share the ink
 * and teal tokens defined here (hence the --ota-aop-* names).
 *
 * Gravity Forms' own ready-class column rules (gf_list_2col and friends)
 * carry higher specificity than the flex layout below, so multi-column
 * choice lists keep their columns.
 */

.gform_wrapper {
	--ota-aop-ink: #003038;
	--ota-aop-teal: #005361;
	--ota-aop-check: rgba(0, 48, 56, 0.35);
}

/* Checkbox field labels render as headings, matching the 20px bold ink
   titles of the Areas of Practice cards so grouped checkbox lists read the
   same on every form. The doubled-up class outweighs Gravity Forms' own
   .gravity-theme label rule regardless of stylesheet order. */
.gform_wrapper .gfield.gfield--type-checkbox .gfield_label {
	color: var(--ota-aop-ink);
	font-size: 20px;
	line-height: 1.2;
	font-weight: 700;
	letter-spacing: -0.2px;
	margin-bottom: 18px;
}

/* The heading-sized labels and larger boxes need more air below each
   checkbox field than the form's default row spacing gives. */
.gform_wrapper .gfield.gfield--type-checkbox {
	margin-bottom: 30px;
}

.gform_wrapper input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	width: 20px;
	height: 20px;
	margin: 0;
	border: 1.5px solid var(--ota-aop-check);
	border-radius: 6px;
	background: #fff;
	cursor: pointer;
	position: relative;
	flex-shrink: 0;
}

.gform_wrapper input[type="checkbox"]:checked {
	background: var(--ota-aop-ink);
	border-color: var(--ota-aop-ink);
}

/* CSS-drawn tick: a rotated border corner, no SVG asset needed. */
.gform_wrapper input[type="checkbox"]:checked::after {
	content: "";
	position: absolute;
	left: 5px;
	top: 1px;
	width: 6px;
	height: 11px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.gform_wrapper input[type="checkbox"]:focus-visible {
	outline: 2px solid var(--ota-aop-teal);
	outline-offset: 2px;
}

/* Gravity Forms stacks the choices with no separation, which reads as tight
   next to the AOP cards. Match the 12px row gap of the sub-area grid. */
.gform_wrapper .gfield_checkbox {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* Gravity Forms leaves the box and its label as inline-block siblings, which
   sits the tick box on the text baseline. The AOP sub-area rows centre the
   two; match that on the plain checkbox lists. */
.gform_wrapper .gfield_checkbox .gchoice {
	display: flex;
	align-items: center;
	gap: 12px;
}

.gform_wrapper .gfield_checkbox .gchoice label {
	margin: 0;
	cursor: pointer;
}

/* Email subscription options carry a description on its own line under the
   label (Subscription_Descriptions). The row wraps so the description sits
   below, lined up with the label text past the 20px box and 12px gap. */
.gform_wrapper .gfield_checkbox .gchoice.ota-subscription-choice {
	flex-wrap: wrap;
	row-gap: 2px;
}

.gform_wrapper .gfield_checkbox .gchoice.ota-subscription-choice label {
	color: var(--ota-aop-ink);
	font-weight: 600;
}

.gform_wrapper .ota-subscription-choice__description {
	flex-basis: 100%;
	padding-left: 32px;
	color: #6b7280;
	font-size: 14px;
	line-height: 1.4;
}

/* The Connections Magazine format select's description opens with a heading
   sized like the form's section headings, "Your Email Subscriptions" and
   "Marketing emails" (Subscription_Descriptions). */
.gform_wrapper .ota-magazine-format__heading {
	display: block;
	margin-bottom: 18px;
	color: var(--ota-aop-ink);
	font-size: 20px;
	font-weight: 700;
	line-height: 24px;
	letter-spacing: -0.2px;
}
