/* Lead Form — Gravity Forms tweaks. Other fields inherit the global GF styling. */

/* Hide the "* indicates required fields" legend. Gravity Forms has no clean
   per-form toggle for this, so it's removed via CSS (matches the contact-form block). */
.le-lead-form-block .gform_wrapper .gform_required_legend {
	display: none;
}

/* File upload box — matches the other fields and spans to the form edge. The
   button sits flush at the left and, being opaque, covers its own area so the box
   reads only to the RIGHT of the button (filename area). */
.le-lead-form-block .gform_wrapper .gfield input[type="file"] {
	width: 100%;
	border: 1px solid var(--color-border);
	border-radius: 0.5rem;
	background-color: var(--color-almost-white);
	color: var(--color-primary);
	font-family: var(--font-body);
	font-size: var(--text-sm);
	/* No left/top/bottom padding so the button sits flush in the corner; overflow
	   clips the button's corners to the field's rounding. Right padding keeps the
	   filename off the field edge. */
	padding: 0 0.875rem 0 0;
	overflow: hidden;
}

/* Focus — inset ring so it isn't clipped by overflow:hidden; keeps focus visible. */
.le-lead-form-block .gform_wrapper .gfield input[type="file"]:focus {
	outline: none;
	border-color: var(--color-secondary);
	box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--color-secondary) 30%, transparent);
}

/* "Choose File" button — branded, fills the field height; corners clipped by the field. */
.le-lead-form-block .gform_wrapper .gfield input[type="file"]::file-selector-button {
	margin-right: 0.875rem;
	border: 0;
	border-radius: 0;
	background-color: var(--color-primary);
	color: #fff;
	font-family: var(--font-heading);
	font-size: var(--text-xs);
	font-weight: var(--font-weight-semibold);
	padding: 0.75rem 1rem;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

/* Hover — invert the fill to the accent (amber → --color-secondary), text stays
   white. Opaque, so the field box never shows behind the button. */
.le-lead-form-block .gform_wrapper .gfield input[type="file"]::file-selector-button:hover {
	background-color: var(--color-secondary);
	color: #fff;
}

/* Drag-and-drop uploader (multi-file), if used — match the surface + border tokens. */
.le-lead-form-block .gform_wrapper .gform_drop_area {
	border: 1px dashed var(--color-border);
	border-radius: 0.5rem;
	background-color: var(--color-almost-white);
	color: var(--color-primary);
}

/* Required asterisk — match the label text color instead of Gravity Forms' default. */
.le-lead-form-block .gform_wrapper .gfield_required {
	color: inherit !important;
}

/* Labels — loosen the line-height so descenders (e.g. the "y" in "Country") aren't
   clipped. The global `!text-xs` rule sets a tight 1rem line-height. Covers field
   labels and the address field's sub-labels. */
.le-lead-form-block .gform_wrapper .gfield_label,
.le-lead-form-block .gform_wrapper .gform-field-label {
	line-height: 1.4 !important;
	overflow: visible;
}

/* Select fields (e.g. the address Country dropdown) — the global `!text-sm` forces
   a 1.25rem line-height that's too tight for a <select>, clipping the value's
   descenders (the "y" in "Country"). Give it a taller line box and trim the
   vertical padding so the overall field height still matches the text inputs. */
.le-lead-form-block .gform_wrapper .gfield select {
	line-height: 1.5rem !important;
	padding-top: 0.5rem !important;
	padding-bottom: 0.5rem !important;
}
