/* stylelint-disable selector-class-pattern -- this file styles Gravity Forms'
   own repeater markup (.gfield_repeater_cell), which is not BEM-named and not
   under our control. */

.gffrends-owner-type__options {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

/* Hide business fields until the JS reveals them for a business owner, to avoid
   a flash on load. The JS then sets display:contents/none inline (which wins),
   so the cell keeps Gravity Forms' own layout when shown. */
.gfield_repeater_cell:has(.gffrends-business-field) {
  display: none;
}

/* Same flash-prevention for the foreign SSN cell — JS reveals it per-row when
   the "no Finnish HETU" checkbox is ticked. The HETU cell stays visible by
   default (the common case), so it doesn't need a corresponding rule. */
.gfield_repeater_cell:has(.gffrends-foreign-field) {
  display: none;
}

/* The is-foreign subfield is a `<input type="hidden">` that GF auto-tags with
   .gform_hidden (display:none on the whole wrapper). We need the wrapper
   visible so the JS-injected checkbox below can render; the hidden input
   itself stays invisible by being type=hidden. */
.gfield.gffrends-is-foreign-field {
  display: block !important;
}

.gffrends-foreign-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}
